KKKKhazix/khazix-skills / neat-freak
neat-freak
Unverified干完活的知识收尾:把项目文档、CLAUDE.md/AGENTS.md 等规则文件、Agent 记忆和会话留下的临时文件,对齐到代码和线上的真实现状,让下一个会话或接手的人读到的是唯一、正确的现役答案。触发:用户点名 "neat-freak"、"洁癖"、"/neat",或明确的知识收尾意图——开发后同步文档与记忆、CLAUDE.md/记忆过期或冲突、交接前清场、审计规则是否被遵守("把文档和记忆整理一下"、"docs 和代码对不上了")。不触发:纯写代码/重构/调试、整理数据或文稿(JSON、周报、changelog)、没有项目知识语境的裸"整理"。
references/governance.md
View on GitHub# 核对规则有没有被遵守
规则的内容来自现场的规则文件。这份参考只讲怎么把规则提取出来、怎么核对、核对出问题怎么处理。系统、用户和项目规则给的授权边界,比本 Skill 优先。
## 先确定实际生效的规则链
不同平台读的文件不一样,不要假设都从项目根读同一个文件:
1. 认清当前是哪个 Agent,工作目录在哪。
2. 从项目根到工作目录,找这个平台会读的规则文件、覆盖文件和按路径生效的规则。
3. 再看用户级和组织级的规则。
4. 记下加载顺序和谁覆盖谁。同一个目录里只算平台实际会加载的那份。
5. 项目声明 CLAUDE.md 和 AGENTS.md 必须同源的,核对软链或导入是否到位。没有声明的,只报告两份内容可能分叉的风险,不替项目决定以哪份为准。
各平台读哪些文件见 [agent-paths.md](agent-paths.md)。
## 找出能机械核对的约定
读规则链时,挑出能转成检查命令的要求,记下原文出处。
| 类别 | 规则长什么样 | 拿什么核对 |
|---|---|---|
| 命名 | 「目录必须 kebab-case」 | 同级目录的名字清单,规则里的例外条款 |
| 必备文件 | 「每个项目必须有 X」 | 文件是否存在,最基本的内容在不在 |
| 同源 | 「A 软链到 B」「只编辑 B」 | `readlink`、真实路径、导入语句、平台的加载诊断 |
| 安全红线 | 「密钥不进代码」「ignore 必须含 X」 | 已跟踪的文件、ignore 规则、密钥扫描 |
| 目录纪律 | 「根目录不放零散文件」 | 根目录的条目和允许的清单 |
| 说法属实 | 「启动命令、URL、服务名必须真实」 | package 和配置文件、服务本身或线上探测 |
| 发布流程 | 「上线核实后才清理」 | 部署记录、待清理对象清单、用户的清理授权 |
「结论先行」这类行为偏好也要遵守,但它没法机械核对,不算审计结果,除非项目有可验证的模板或检查。
## 核对到多大范围
- **用户只说当前项目**:审当前项目的内容。上级规则和旁边项目的名字只读。
- **改动跨项目**:审实际受影响的上游和下游文档,先说明为什么要扩大。
- **用户明确说整个 workspace**:逐个项目查文件是否齐全、是否同源、规则是否被遵守;要不要读全文按风险决定。
- **全局配置**:默认只读,查死引用、矛盾和加载顺序的问题。项目细节不写进全局。
## 发现问题怎么处理
先照现场规则办。现场没有更具体的规定,用下面的默认分级。
**可以直接修**,要同时满足:在请求范围内,安全,可逆,没有外部副作用,并且当前规则允许自动修。例如:
- 现场明确要求的软链或导入缺了;
- `.gitignore` 缺了规则明文要求的敏感文件模式;
- 文档里明显的笔误,已确认不存在的死链接;
- 同一事实的过期摘要,而且当前代码或线上状态能唯一裁决。
**先报告,等用户决定**:
- 目录或项目改名,删除文件或目录;
- 两份规则文件内容不同,又定不了以哪份为准;
- 规则和长期的实际做法不一致,不清楚该改规则还是改做法;
- 修改范围外的项目、全局配置或别人的工作区;
- 停服务、动权限或密钥、不可逆的迁移、对外发消息等现场规则列出的风险动作;
- 唯一的证据在没合并或有未提交内容的工作树里,清理会把它弄丢。
**只报告,不动**:
- 用户明确说只是「看看」「审计」「出个报告」;
- 问题在请求范围之外;
- 平台生成的文件,禁止直接修改;
- 事实核实不了,或者需要外部系统的权限。
## 规则本身写得好不好
顺带检查:
- **死引用**:规则里的路径、命令、服务、项目还在不在。涉及另一台设备上的路径、拿不准时不直接删。
- **矛盾**:上下级规则、覆盖文件、Skill 和实际做法有没有互相打架。
- **没法执行**:大量「保持整洁」「注意安全」,却没有判断标准。
- **重复**:同一条红线在全局、项目和 Skill 里各抄一份,以后会各改各的。
- **过长**:核心规则被历史叙述淹没。先删、先迁走,不再加新的小节。
- **只有文字约束**:同一种违规第三次出现,说明光写不够。按现场授权,建议或实现一个检查、hook 或测试。
## 怎么报告
每条没有自动修的问题写清:
- 证据和规则出处;
- 在哪个范围;
- 对用户或协作有什么影响;
- 建议怎么做;
- 这次为什么没有直接改。
不用「发现 N 个问题」代替具体内容,也不把范围外的问题混进「项目已清洁」的结论里。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file). | Stars: 198k | Updated | Claude CodeCodex | Unverified | Install |
| doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |