scc-codewiki
Skill4 starsChanged 2 months agoApache-2.0View on GitHub
Narrate an area of this codebase into docs/codewiki/, every section citing the lines it explains. Use it when a subsystem is hard to enter cold, when someone asks for an architecture walkthrough, and on any codewiki.* finding.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- gauntlet-loopSkill
- scc-adrSkill
- scc-glossarySkill
- scc-initSkill
- scc-plan-runSkill
- scc-prdSkill
- scc-stackSkill
- scc-wikiSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
Cite before you narrate: Put the citation directly under the heading, then explain.
- Distinctive: line 58
Write about the parts where reading the code does not tell you why it is like that:
- Distinctive: line 67
Do not narrate what a reader can see.
- Distinctive: line 71
Prefer the range that makes the point.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
You write prose that explains code, and every section of it points at the lines it
is about. The citation is what makes this different from a wiki page: it goes stale
loudly. When the code moves, scc validate fails instead of the page quietly
becoming a lie.
The format is in .claude/rules/knowledge-base.md. This skill is
the procedure and the judgment.
Nothing asked for
$ARGUMENTS is the area to narrate. Empty, run scc validate and repair the
codewiki.* findings — a broken citation means the code moved and the prose
describing it is now suspect, so re-read before re-numbering. With no findings and no
area named, ask which area is hard to enter cold rather than picking one at random.
The citation form
A link whose text is path:start-end and whose target is empty:
## How the dispatcher routes
[internal/cli/cli.go:48-64]()
One switch, no registration. Adding a subcommand means...- The path is relative to the workspace root, always — never to the page.
- A single line is
path:42. A range ispath:42-58. - The target stays empty.
scc validateresolves the path itself, confirms the file exists, and confirms the range is inside it.
Writing a page
- Read the area first — all of it. You are claiming to explain this code. Every sentence you write is checkable against the lines you cited, and a reader who catches one wrong claim stops believing the page.
- Pick the sections from the reader's questions, not from the file layout. "How the dispatcher routes" is a section. "cli.go" is a table of contents.
- Cite before you narrate. Put the citation directly under the heading, then explain. It anchors the section and it is how you notice you are about to write a paragraph that is not about any particular code.
- Every
##section cites something. This is checked. A section with no citation is prose that has drifted free of what it describes — either find the lines it is about, or the section belongs indocs/wiki/instead. - Headings must be unique on the page. Two identical headings share one anchor, and a link to it lands on whichever came first.
scc validatebefore you call it done.
What to narrate, and what to leave alone
Write about the parts where reading the code does not tell you why it is like that:
- A constraint the shape exists to satisfy, which is invisible from any one file.
- An invariant several files cooperate to hold.
- A deliberate choice that looks wrong until you know what it prevents.
- The entry point — where execution actually begins, which is often the single hardest thing to find in an unfamiliar codebase.
Do not narrate what a reader can see. "This function takes a name and returns a path" is the signature restated at greater length, and a page full of that trains people to skip the page.
Prefer the range that makes the point. Citing a whole 400-line file says "the answer is in here somewhere", which the reader already knew.
Repairing drift
| Finding | What it means | The fix |
codewiki.citation-unresolved | The file is gone or was renamed. | Find where the code went. If it was deleted, delete the section — a section about code that no longer exists is not repairable. |
codewiki.citation-out-of-range | The file is shorter than the citation claims. | The code moved. Re-read it before re-numbering: the lines may now be something else entirely, and shifting the range to make the finding go away without reading is how a page becomes confidently wrong. |
codewiki.citation-invalid | Malformed, or the path escapes the workspace. | A citation names a path inside the checkout. Fix the path. |
codewiki.section-cites-nothing | A section explains no specific code. | Cite the lines, or move the section to docs/wiki/. |
codewiki.duplicate-heading | Two sections share one anchor. | Rename one. |
A finding here is usually a real problem, not a bookkeeping chore. The citation broke because the code changed, which means the prose describing it is now suspect in a way no validator can measure. Re-read, then rewrite what is no longer true.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

