|
| 1 | +--- |
| 2 | +name: neat-freak |
| 3 | +description: > |
| 4 | + End-of-session knowledge cleanup with strict documentation hygiene. Reconcile |
| 5 | + project docs, agent instructions, and durable memory against the current code |
| 6 | + so the project stays accurate for future agents and human maintainers. Trigger |
| 7 | + when the user asks to sync, tidy, clean up docs, update memory, prepare a |
| 8 | + handoff, finish a milestone, or make the project easy for a new maintainer to |
| 9 | + pick up. |
| 10 | +--- |
| 11 | + |
| 12 | +# Knowledge Base Neat-Freak |
| 13 | + |
| 14 | +You are a knowledge-base editor, not a changelog recorder. Your job is to keep |
| 15 | +project knowledge clean, accurate, consolidated, and useful to someone arriving |
| 16 | +with no context. |
| 17 | + |
| 18 | +Use English only in responses, project documentation, and agent-facing notes |
| 19 | +unless the user explicitly requests a non-English artifact. |
| 20 | + |
| 21 | +## Upstream Attribution |
| 22 | + |
| 23 | +This repo-local skill is adapted from the upstream `neat-freak` skill in |
| 24 | +KKKKhazix's `khazix-skills` repository: |
| 25 | + |
| 26 | +- https://github.com/KKKKhazix/khazix-skills/blob/main/neat-freak/SKILL.md |
| 27 | + |
| 28 | +The local version has been rewritten for this repository's constraints: |
| 29 | + |
| 30 | +- English-only project communication and documentation. |
| 31 | +- Codex-oriented project and global instruction paths. |
| 32 | +- A self-check for citing an official document, upstream GitHub repository, or |
| 33 | + relevant community discussion when project instructions require source-backed |
| 34 | + technical approach guidance. |
| 35 | + |
| 36 | +## Knowledge Layers |
| 37 | + |
| 38 | +Keep the audience boundaries clear: |
| 39 | + |
| 40 | +- Durable agent memory or global instructions: cross-project user preferences, |
| 41 | + non-obvious long-lived facts, and reusable references. |
| 42 | +- Project `AGENTS.md`, `CLAUDE.md`, or equivalent: project-specific agent |
| 43 | + constraints, structure, commands, tooling, and red lines. |
| 44 | +- Project `README.md` and `docs/`: human-facing onboarding, integration, |
| 45 | + architecture, operations, and handoff material. |
| 46 | + |
| 47 | +Do not paste the same content everywhere. Update each layer for its audience. |
| 48 | + |
| 49 | +## Workflow |
| 50 | + |
| 51 | +### 1. Inventory |
| 52 | + |
| 53 | +Perform a mechanical inventory before deciding what to edit: |
| 54 | + |
| 55 | +1. List agent memory or global instruction files if the platform has them. |
| 56 | + For Codex, check `~/.codex/AGENTS.md`, project `AGENTS.md`, and repo-local |
| 57 | + `.codex/skills/`. |
| 58 | +2. For each project touched in the conversation: |
| 59 | + - `ls <project-root>/` |
| 60 | + - `ls <project-root>/docs/ 2>/dev/null` |
| 61 | + - `find <project-root> -maxdepth 2 -name "*.md" -not -path "*/node_modules/*" -not -path "*/.git/*"` |
| 62 | + - Read `README.md`, `AGENTS.md` or `CLAUDE.md`, and every `docs/*.md`. |
| 63 | +3. Search for additional Markdown files deeper in the repo when relevant. |
| 64 | +4. Review the conversation for facts that changed. |
| 65 | + |
| 66 | +Maintain an internal list marking every discovered file as reviewed, changed, or |
| 67 | +intentionally unchanged. |
| 68 | + |
| 69 | +### 2. Identify Impact |
| 70 | + |
| 71 | +Think in terms of impact, not just the latest diff: |
| 72 | + |
| 73 | +- New API, route, or protocol: update project agent notes, integration docs, and |
| 74 | + architecture docs. |
| 75 | +- New or renamed environment variable: update project agent notes, runbooks, and |
| 76 | + downstream setup docs. |
| 77 | +- New user flow or major feature: update README commands or usage, architecture, |
| 78 | + and handoff notes if present. |
| 79 | +- Cross-project protocol or SDK changes: update both the producer and consumer |
| 80 | + project documentation. |
| 81 | +- Stale memory: update or delete it rather than appending a competing note. |
| 82 | + |
| 83 | +Use `references/sync-matrix.md` when uncertain. |
| 84 | + |
| 85 | +### 3. Edit |
| 86 | + |
| 87 | +Actually modify files. A plan is not enough. |
| 88 | + |
| 89 | +Editing principles: |
| 90 | + |
| 91 | +- Merge updates into existing sections instead of appending duplicate notes. |
| 92 | +- Delete stale temporary plans and superseded decisions. |
| 93 | +- Prefer precise, compact wording over broad narrative. |
| 94 | +- Use absolute dates such as `2026-04-29`; do not use relative time phrases |
| 95 | + like "today" or "recently". |
| 96 | +- Keep project docs useful to a first-time reader with limited time. |
| 97 | +- Be very conservative with global instructions; project facts belong in the |
| 98 | + project. |
| 99 | + |
| 100 | +### 4. Self-Check |
| 101 | + |
| 102 | +Before the final response, verify: |
| 103 | + |
| 104 | +- Every file from the inventory was reviewed or intentionally skipped. |
| 105 | +- Project instructions mention only paths, commands, and tools that exist. |
| 106 | +- README run/build commands match the repository tooling. |
| 107 | +- New APIs or protocols appear in both usage-facing and architecture-facing |
| 108 | + docs when those docs exist. |
| 109 | +- Technical approach guidance cites at least one relevant source when required |
| 110 | + by project instructions. |
| 111 | +- Cross-project effects were checked. |
| 112 | +- No relative time phrases remain. |
| 113 | +- No unintended local absolute paths remain in docs. |
| 114 | +- No non-English text remains unless explicitly requested by the user. |
| 115 | + |
| 116 | +Useful checks: |
| 117 | + |
| 118 | +```sh |
| 119 | +rg -n 'today|yesterday|recently|last week' -g '*.md' -g '!node_modules/**' -g '!.git/**' |
| 120 | +rg -n '/Users|/private|/var/folders|/tmp/' -g '*.md' -g '!node_modules/**' -g '!.git/**' |
| 121 | +rg -n '[\p{Han}]' -g '*.md' -g '!node_modules/**' -g '!.git/**' |
| 122 | +git diff --check |
| 123 | +``` |
| 124 | + |
| 125 | +### 5. Summarize |
| 126 | + |
| 127 | +After editing, summarize only actual changes: |
| 128 | + |
| 129 | +- Memory or global instruction changes, if any. |
| 130 | +- Project documentation changes, grouped by project. |
| 131 | +- Unhandled items, with the reason they were not handled. |
| 132 | + |
| 133 | +Keep the final response concise and in English. |
| 134 | + |
| 135 | +## References |
| 136 | + |
| 137 | +- `references/sync-matrix.md`: mapping from change types to documentation |
| 138 | + surfaces. |
| 139 | +- `references/agent-paths.md`: common agent memory, instruction, and skill |
| 140 | + paths. |
0 commit comments