by YurunChen
Living project docs for coding agents: keep guides, progress logs, change maps, and handoff context updated as your repo evolves.
# Add to your Claude Code skills
git clone https://github.com/YurunChen/repo-docs-skillsGuides for using ai agents skills like repo-docs-skills.
repo-docs-skills is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by YurunChen. Living project docs for coding agents: keep guides, progress logs, change maps, and handoff context updated as your repo evolves. It has 65 GitHub stars.
repo-docs-skills's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/YurunChen/repo-docs-skills" and add it to your Claude Code skills directory (see the Installation section above). repo-docs-skills ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
repo-docs-skills is primarily written in Python. It is open-source under YurunChen on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh repo-docs-skills against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
repo-docs explains a repository to a human reader.
Do not make a tree tour. Build a reader model: what problem the repo solves, one real behavior it performs, the concepts behind that behavior, where source truth lives, and how to verify the understanding.
Keep the routing narrow. SKILL.md defines the contract; topic files carry the detailed rules. If a detail appears in two places, keep it in the topic file and leave a pointer here.
| File | Role |
|---|---|
SKILL.md |
Entry: mission, principles, output contract, build/sync summary, verification |
REFERENCE.md |
Router to topic files—open only when detail is needed |
WRITING.md |
Explanation design, voice, evidence discovery |
PAGE_RULES.md |
Reader paths, page types, output shape, navigation |
SCOPE_MODES.md |
Seed, large/monorepo scope, specialized repos |
SYNC_RULES.md |
Question loop, change sync, widened content alignment |
QUALITY_RULES.md |
Evidence labels, source truth, quality bar |
EXAMPLES.md |
Finished-page tone and output-shape examples |
scripts/validate_repo_docs.py |
Structure, links, sync anchors, freshness checks |
validate_repo_docs.py |
Compatibility wrapper for older invocations |
repo-docs-zh/SKILL.md |
Chinese language overlay |
references/source-map.md only when repeated grouped locators would clutter pages.modules/, exact lookup material in references/, term disambiguation in glossary.md, guide history in change-log.md.Use the smallest package that teaches the repo honestly.
README.md, walkthroughs/one-real-run.md, modules/, references/, glossary.md, change-log.md.README.md, walkthroughs/one-real-run.md, change-log.md; use for small repos with little durable terminology.README.md, change-log.md, glossary.md, references/decisions.md; label facts as Confirmed, Planned, or Unknown.| Page | Job |
|---|---|
README.md |
Orient the reader and point to the first useful path. |
walkthroughs/one-real-run.md |
Follow one real behavior end to end with numbered ## Step N: behavior headings. |
modules/<concept>.md |
Explain one durable concept named by the walkthrough. |
references/*.md |
Hold exact lookup tables: commands, schemas, artifacts, metrics, tools, grouped source maps. |
glossary.md |
Three columns only: `Term |
change-log.md |
Meaningful guide changes and sync anchors. |
README.md and walkthroughs/one-real-run.md first.glossary.md and change-log.md.AGENTS.md, AGENTS.override.md, CLAUDE.md, GEMINI.md, or .cursor/rules/*.md; patch the ones that clearly govern coding agents for this repo. If none exists, create AGENTS.md. The rule must say that future repo questions and behavior-changing edits should check repo-docs/, patch stale guide pages in the same turn when needed, and record meaningful guide work in repo-docs/change-log.md.For large repos or monorepos, scope the guide to one subsystem or workflow and say what is not covered.
Build is not finished until the next coding agent can maintain the guide without rediscovering the policy. The project agent instruction Markdown is the handoff point: it should point to repo-docs/README.md, name the main walkthrough, and tell future agents to run an Understanding Sync check when repo questions or behavior-changing edits appear.
When Build creates or updates repo-docs/, search the project for agent instruction Markdown before creating anything new. Look for common project files such as AGENTS.md, AGENTS.override.md, CLAUDE.md, GEMINI.md, and .cursor/rules/*.md, plus any nearby Markdown file whose filename or heading clearly says it is for coding agents.
Patch existing agent instruction files that already govern the repo or the package being documented. Do not create extra tool-specific files just to mirror the rule. If no such file exists, create AGENTS.md at the project root.
For nested packages, patch the nearest project agent instruction Markdown that governs the generated repo-docs/ package. If the guide is created at the repository root, use the root file.
The rule should say:
repo-docs/; start with repo-docs/README.md.repo-docs/walkthroughs/one-real-run.md when that file exists.repo-docs/change-log.md with verification and Synced through <sha> when git is available.Default block to write:
## Repo docs
The living project guide is in `repo-docs/`. Start with `repo-docs/README.md`; when `repo-docs/walkthroughs/one-real-run.md` exists, use it as the main behavior trace.
Before answering repo architecture, onboarding, or "how does this work" questions, read the relevant guide pages and inspect the current source behind the answer. If the guide is missing, stale, or wrong, update the smallest owning page in the same turn before answering.
When code, config, data, scripts, tests, or behavior changes, run an Understanding Sync check before finishing. Patch only the guide pages that would otherwise mislead the next reader. Record meaningful guide updates in `repo-docs/change-log.md` with verification and `Synced through <sha>` when git is available.
Keep this root rule short. Do not copy the guide into AGENTS.md or CLAUDE.md; those files route future agents back to repo-docs/.
repo-docs/ is maintained during the user ↔ coding agent conversation, not in a separate offline pass. Except Build, Seed, and Cleanup, run Understanding Sync each turn when repo-docs/ exists. Modes name common situations—not detached jobs. Detail: SCOPE_MODES.md, SYNC_RULES.md.
| Mode | Use when | What to do |
|---|---|---|
| Seed | No real source/runtime/test/data contract yet | Status-labeled project memory; do not describe plans as implemented |
| Build | First repo docs or onboarding material | One real workflow; wire root agent file; run validator; deliver |
| Sync | Interaction or repo state shows the guide may be stale | Run Understanding sync; patch only stale pages |
| Cleanup / removal | User asks to delete generated repo docs | Remove the package and stale root pointers |
| Question refinement | A repo question shows the guide built the wrong model | Smallest stable patch, anchor in change-log.md, answer with a link |
When repo-docs/ exists, ask: what would a new reader misunderstand if they read the guide today?
Patch the smallest owning page when this turn changed behavior-bearing source, data, config, scripts, or tests; a user correction revealed a stable understanding gap; or validator warnings show stale links, missing sync anchors, or likely drift.
Do not patch for one-off debug state, local environment quirks, or personal preference unless the user asks to preserve it.
Every material sync updates repo-docs/change-log.md with the trigger, changed pages, verification, and Synced through <sha> when git is available.
Use this loop during coding-agent interaction:
AGENTS.md / CLAUDE.mdUse WRITING.md for voice and explanation rules. The short version:
Evidence status: Confirmed unless noted.Before delivery, confirm:
repo-docs/README.md and reach the main walkthrough.walkthroughs/one-real-run.md follows one real behavior with numbered steps.Plain model, Code model, and Read next when they exist.references/, not in the main narrative.Repo docs sync rule, or AGENTS.md was created.change-log.md records meaningful guide work and includes Synced through <sha> when git is available.Before finishing, check structure, local links, source links, narrative flow, module ownership, and reference-page lookup behavior.
Run:
python scripts/validate_repo_docs.py <path-to-repo-docs> --repo-root <repo-root>
First build: tell the user what the reader can now do, where to start, the key pages, scope, validator result, and root agent-file status. Keep durable history in change-log.md, not in chat.
Cleanup: if the user asks to remove repo docs, delete the generated docs package and stale root-agent pointers. Do not recreate docs in the same turn unless explicitly asked.
Widened sync closeout: when the user explicitly asks to sync, tidy, hand off, or repair stale docs, follow SYNC_RULES.md and summarize by changed layer—not a substitute for per-turn Understanding sync.
New: walkthrough-first repo docs, root-level
repo-docs/output, Chinese docs support, and Seed mode for empty repos. If Repo-Docs helps you keep up with an agent-built project, a GitHub star 🌟 helps more builders find it.
repo-docs-zh.repo-docs/walkthroughs/one-real-run.md.Vibe coding makes code appear quickly. Files change, decisions move, and the reason behind a design can stay behind in chat. After a few sessions, the repo may still run, but the user can no longer see the full shape of what was built.
repo-docs is a small agent skill for reducing that gap. It asks the coding
agent to keep living repo docs as work happens, starting from one real
walkthrough: what the user can observe, how the code/data/state move, what
changed, why it changed, what is decided, what is only planned, and what still
needs verification.
Repo-Docs starts with one thing the repo really does. It follows that behavior end to end, names the few ideas that matter, then points to the code and checks that prove the path. A reader should understand the behavior before memorizing paths.
The explanation stays in the tree. Docs land in repo-docs/ as plain Markdown:
a walkthrough, concept pages, a glossary, and lookup tables. The next person
should be able to open the repo cold and keep going.
Docs move with the code. When the repo shifts, or a question shows the write-up is behind reality, the skill patches the smallest page that fixes the misunderstanding in the same conversation.
Questions improve the guide. If the answer is not in the docs yet, the skill
reads source, updates the right page, and replies with the page that now owns
that understanding. For Chinese-first teams or personal projects,
repo-docs-zh writes a more Chinese-native guide: Chinese carries the
explanation, while source terms stay as lookup anchors.
A normal coding-agent session becomes a documentation loop:
flowchart LR
A["User asks or agent changes repo"] --> B["Understanding sync check"]
B --> C["Update README and walkthrough"]
B --> D["Update change-log"]
B --> E["Patch modules / glossary / references"]
B --> F["Update AGENTS.md / CLAUDE.md"]
C --> G["User can read the current project"]
D --> G
E --> G
F --> G
After a milestone, Repo-Docs leaves the repo easier to continue:
| File | What it preserves |
|---|---|
repo-docs/README.md |
Current project explanation |
repo-docs/walkthroughs/one-real-run.md |
One real behavior path from entry to output |
repo-docs/modules/ |
Deeper explanation of concepts the walkthrough names |
repo-docs/references/ |
Exact names, fields, commands, and contracts |
repo-docs/glossary.md |
Plain meanings for repeated project terms |
repo-docs/change-log.md |
What changed, why, sync anchors, and how it was verified |
AGENTS.md / CLAUDE.md |
Rules for the next coding agent |
There are two common ways to install the skill.
Give this project link to your coding agent:
Install the repo-docs skill from this project:
https://github.com/YurunChen/repo-docs-skills
Make both repo-docs and repo-docs-zh available in my agent skill directory.
From the source repository root, copy the skill files into your agent skill directory:
mkdir -p ~/.agents/skills/repo-docs/scripts
cp SKILL.md REFERENCE.md WRITING.md PAGE_RULES.md SCOPE_MODES.md SYNC_RULES.md QUALITY_RULES.md EXAMPLES.md ~/.agents/skills/repo-docs/
cp scripts/validate_repo_docs.py ~/.agents/skills/repo-docs/scripts/
cp validate_repo_docs.py ~/.agents/skills/repo-docs/
mkdir -p ~/.agents/skills/repo-docs-zh
cp repo-docs-zh/SKILL.md ~/.agents/skills/repo-docs-zh/SKILL.md
Then invoke it naturally:
Use the repo-docs skill to create docs for this repository.
python scripts/validate_repo_docs.py /path/to/repo-docs --repo-root /path/to/repo
Use --lite or --seed for smaller shapes. --repo-root checks source locators and post-anchor drift.
Except Build, Seed, and Cleanup, the default is an Understanding sync check each turn when repo-docs/ exists.
| Mode | Use it when | Output focus |
|---|---|---|
| Seed | The project is new or nearly empty | Goals, decisions, planned work, unknowns |
| Build | The repo needs its first docs | One real walkthrough, concept pages, references |
| Sync | The interaction shows the guide may be stale | Patch the reader model in the same thread |
| Cleanup / removal | The user asks to delete generated docs | Remove docs and stale root pointers |
| Question refinement | A repo question shows the guide built the wrong model | Smallest stable patch, then answer with a link |
Use this once when a project needs its first repo docs:
Use the repo-docs skill to create docs for this repository.
After that, keep working naturally. When repo-docs/ exists, the agent runs an
understanding sync check each turn—patching the guide in the same thread when code
changes or a question shows a stale reader model. Explicit sync, tidy, or handoff
requests widen scope per SYNC_RULES.md.
Standard (default for non-Seed repos):
repo-docs/
README.md
walkthroughs/
one-real-run.md
modules/
references/
glossary.md
change-log.md
Lite (small repos with little durable terminology):
repo-docs/
README.md
walkthroughs/
one-real-run.md
change-log.md
Seed (until real runtime evidence exists):
repo-docs/
README.md
change-log.md
glossary.md
references/
decisions.md
Triggered when a reader problem needs them: additional walkthroughs, flows.md
(relationship map only—not a retelling of one-real-run.md), evidence-ledger.md.
repo-docs keeps three project-knowledge layers in sync during normal work:
| Layer | Audience | Responsibility |
|---|---|---|
README.md and repo-docs/ |
Users, teammates, future agents | Architecture, walkthroughs, onboarding, operations, examples, contracts, references |
Root AGENTS.md / CLAUDE.md |
Future agents inside the repo | Hard boundaries, commands, environment rules, red lines, repo-docs policy |
| Agent memory, when available | The agent across sessions | User preferences, recent lessons, cross-project pointers |
Docs become the authority for current project understanding. Memory stays thin and pointer-oriented.
<skills-dir>/
├── repo-docs/
│ ├── README.md
│ ├── README_CN.md
│ ├── SKILL.md
│ ├── REFERENCE.md
│ ├── WRITING.md
│ ├── PAGE_RULES.md
│ ├── SCOPE_MODES.md
│ ├── SYNC_RULES.md
│ ├── QUALITY_RULES.md
│ ├── EXAMPLES.md
│ ├── validate_repo_docs.py
│ └── scripts/
│ └── validate_repo_docs.py
└── repo-docs-zh/
└── SKILL.md
File roles: Document Contract.
A good repo-docs/ docs package is useful after the chat ends. A newcomer should be
able to read it and explain the repo in their own words, trace one real
workflow from observable entry to output, identify the important contracts, and
verify that understanding with a named test or command.
Mark confidence quietly: one page-level note at the end of narrative pages
(Evidence status: Confirmed unless noted.). Use Confirmed, Inferred,
Planned, and Unknown only where confidence differs.
For seed projects, planned work must stay visibly separate from implemented facts.
If Repo-Docs helps you keep up with the code your agents create, a GitHub star 🌟 helps others find it.