documenting-legacy-codebases skill (riekelt) for Claude Code: rebuild missing docs from the code
Makes Claude rebuild documentation for an inherited or undocumented codebase from the code itself, with a coverage ledger that shows what is verified.
- Installs
- 20.4K
- on skills.sh
- Stars
- 36
- on GitHub
- Updated
- Sep 2026
- last repo commit
documenting-legacy-codebases treats the code at HEAD as the only reliable witness. Claude first surveys six kinds of surface (entry points, commands and endpoints, configuration, data, integrations, build and deploy), then writes a docs tree from that inventory. Code is called alive only with a wiring proof and dead only with named absence evidence. A coverage ledger records every count with its command and date. The plugin adds a /ground-docs command and a doc-grounder agent. It lists technical-writing as required background.
Good for
- Engineers who inherited a system with missing or untrusted docs
- Teams regrounding a docs tree against what the code does now
- Anyone who needs to know what a system actually does, written down
Install documenting-legacy-codebases
Claude Code
- 1
Copy this prompt.
Install the documenting-legacy-codebases skill in Claude Code. Run this command: /plugin marketplace add riekelt/technical-writer /plugin install technical-writer@technical-writer Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Pick one route, not both, or you get every skill twice. The skills CLI route must include technical-writing, which documenting-legacy-codebases lists as REQUIRED BACKGROUND in its SKILL.md.
From the project README. Source.
What's in the skill
When it loads
Use when documenting an existing codebase whose documentation is missing, stale, or untrusted - an inherited system, a legacy application, a repo where the docs lie - or when regrounding a documentation tree against the code, or when someone asks what a system actually does. Encodes the survey-first inventory, the writer-side evidence hierarchy, depth-per-surface rules, the refactor test, dead-or-alive proofs, the quirks-and-findings split, the coverage ledger, the parallel campaign, and the docs-tree skeleton. Use whenever documentation must be reconstructed from the code rather than written alongside a change.
Sections in SKILL.md
- Overview
- When to invoke, and not
- Survey before prose
- Depth follows the surface
- The evidence hierarchy
- Dead or alive
- Kind discipline while grounding
- Quirks and defects
- The coverage ledger
- Fanning out the campaign
- The docs tree
- Rules
Key facts
- Installs on skills.sh
- 20,365 as of 2026-11-02
- What is inside
- 1 file: SKILL.md
- Plugin extras for this skill
- /ground-docs command and doc-grounder agent
- Last repo commit
- 2026-09-13
What it includes
Counts six kinds of surface before any writing
Entry points and processes, commands and endpoints, configuration, data, integrations, and build and deploy. Each count carries the command behind it and a date.
Runs code ·
Survey before proseContract surfaces exhaustive, internals only the gist
Endpoints, payloads, commands, file formats and config keys are documented in full. Internals get the mechanism and its consequences, so a refactor does not force a docs edit.
Write ·
Depth follows the surfaceFive levels from code at HEAD down to human memory
Code at HEAD, tests, runtime evidence, commit history, then names, comments and old docs, which count as testimony to verify.
Read ·
Evidence hierarchyWiring proof for alive, named absence evidence for dead
Alive is shown by registration and reference search. Dead is shown by naming the absence. Dormant code gets its own state.
Runs code ·
Dead or aliveQuirks are content, defects are noted in a findings file
Surprising real behaviour is documented as behaviour. Suspected defects get one line with file and line in the findings note, and nothing is fixed.
Write ·
Quirks and defectsCounts, commands, dates and per-document status in one file
Documented counts against inventory totals, and a drafted or reviewed status per document. Marking reviewed needs a second reader.
Write ·
Coverage ledgerFour phases: survey, merge and plan, ground and review, assemble
Where the runtime can run several agents, one grounds each planned document and a fresh reviewer checks it. SKILL.md ties model size to each phase.
Try: “Document this legacy service: survey first, show me the plan, then write the docs tree.”
Write ·
Campaign fan-outA default folder layout built from the inventory
An index, overview, one document per subsystem, config and API references, integrations, data model, processes with diagrams, history, findings, coverage and unknowns.
Write ·
Docs tree
From the official docs
Permissions
Medium risk
Claude reads most of your codebase and runs commands to inspect it. Run it on code you are allowed to share with your AI provider.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
The plugin agent has shell access
The doc-grounder agent has Read, Glob, Grep and Bash tools and is told to stay read-only on the system. The /ground-docs command makes the main session the only writer and asks for your go on the plan before writing. github.com
A campaign reads much of your repo
SKILL.md has Claude enumerate every surface of the system, from entry points and configuration to data and integrations, and run a command behind each count. Our advice: do not run a campaign on code you are not allowed to share with your AI provider. github.com
The plugin route adds 2 agents and 2 commands
The plugin ships agents prose-reviewer and doc-grounder (both with Read, Glob, Grep and Bash tools) and the commands /prose-review and /ground-docs. The plugin folder has no hooks or MCP config. Use the skills command in the install box if you want only this skill. github.com
Technical details
| Turning on read-only | No read-only mode. The skill tells Claude to write or edit documents. |
|---|---|
| Sign-in and keys | SKILL.md names no account or API key. |
| Data retention | SKILL.md names no logging or telemetry. |
| Scopes |
|
Questions
What does documenting-legacy-codebases do?
It makes Claude document an existing system from its code. Claude surveys the system, writes a docs tree, proves which code is alive or dead and keeps a ledger of what is covered and reviewed.
How do I install documenting-legacy-codebases?
Use the install box at the top of this page. The plugin route installs the whole set. The skills command route names technical-writing as well, because this skill lists it as required background.
Does it change my code?
SKILL.md says the campaign is read-only on the system: documents, the findings note and the ledger are the only outputs. Every defect found is a note, never an edit, even a typo.
What is the /ground-docs command?
The plugin ships /ground-docs. It loads this skill, surveys the system, shows you the plan and waits for your go, then runs doc-grounder and prose-reviewer agents per subsystem. The command says the main Claude session is the only writer.
Does it need Claude to run several agents?
No. SKILL.md says the same phases run sequentially when the runtime cannot orchestrate multiple agents.
documenting-legacy-codebases vs writing-design-docs?
This skill reconstructs documentation for an existing system. SKILL.md says not to use it for documenting a change you are making, or for arguing a rewrite, which is writing-design-docs, fed by these documents.
Is documenting-legacy-codebases safe to install?
The skill folder holds only SKILL.md, so it bundles no scripts. Surveying a codebase involves running commands to count surfaces, and the plugin's agents have Bash access. Review the changes it makes to your documents, as you would any edit.
Can I use documenting-legacy-codebases in the Claude app or Cursor?
The README documents Claude Code, and the repo also ships Codex and Cursor plugin manifests. It does not mention the Claude app. Our advice: this page offers no Claude app upload because the skill works on documents inside a repository, so use Claude Code or Codex.
Information
updated Nov 2, 2026
- Repository
- riekelt/technical-writer
- Folder
plugins/technical-writer/skills/documenting-legacy-codebases
Sources
Docs, issue trackers and discussions this page is built from.
Show all 8Hide
- README · github.com
- marketplace.json · github.com
- documenting-legacy-codebases on skills.sh · skills.sh
- SKILL.md · github.com
- LICENSE · github.com
- ground-docs command · github.com
- writing-design-docs SKILL.md · github.com
- doc-grounder agent · github.com