agentleFS
protonspyprotonspy/spec-claude-code/.claude/skills/scc-codewiki/SKILL.md

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.

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
  1. Distinctive:

    Cite before you narrate: Put the citation directly under the heading, then explain.

    line 46
  2. Distinctive:

    Write about the parts where reading the code does not tell you why it is like that:

    line 58
  3. Distinctive:

    Do not narrate what a reader can see.

    line 67
  4. Distinctive:

    Prefer the range that makes the point.

    line 71

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 is path:42-58.
  • The target stays empty. scc validate resolves the path itself, confirms the file exists, and confirms the range is inside it.

Writing a page

  1. 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.
  2. 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.
  3. 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.
  4. 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 in docs/wiki/ instead.
  5. Headings must be unique on the page. Two identical headings share one anchor, and a link to it lands on whichever came first.
  6. scc validate before 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

FindingWhat it meansThe fix
codewiki.citation-unresolvedThe 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-rangeThe 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-invalidMalformed, or the path escapes the workspace.A citation names a path inside the checkout. Fix the path.
codewiki.section-cites-nothingA section explains no specific code.Cite the lines, or move the section to docs/wiki/.
codewiki.duplicate-headingTwo 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.