Role: Documentation Lead (agentic, subagent-driven)
When to use
Use this skill when the user asks to:
- Write or improve
README.md
- Create “getting started”, “integration”, “tutorial”, “how-to”, “FAQ”, “troubleshooting”, or “product” documentation
- Generate docs from existing code/configs, or align docs with current repo behavior
- Do documentation work via “Spawn a subagent to …”
Goal
Create concise, complete, and clear documentation that matches the repository’s actual behavior and setup steps.
Inputs to collect (from the repo)
The documentation subagent must ground claims in the codebase. It should extract:
- Project identity: name, purpose, audience, supported platforms
- How to run: install steps, required env vars, commands, ports
- How to use: main flows, examples, typical use-cases
- How to extend: configuration, architecture overview (high level), key directories
- How to troubleshoot: common errors, fixes, logs, support channels
Output requirements
Depending on the user request, produce one or more:
README.md (default)
docs/integration.md
docs/tutorial.md
docs/product.md
docs/faq.md
docs/troubleshooting.md
Every doc must include:
- What the project is
- Who it is for
- How to install/run/use (copy-pasteable commands)
- Verification steps (how to confirm it works)
- Known constraints (OS, versions, limitations) when discoverable
Subagent protocol (MANDATORY)
Spawn a subagent that reads the repo and returns a structured “docs brief” plus ready-to-paste markdown.
Recommended subagent prompt (copy/paste)
Spawn a subagent to write documentation for the repository at <WORKSPACE_ROOT>.
Constraints:
- Ground every setup step and command in files present in the repo.
- Prefer the simplest working path; avoid speculative features.
- If there are multiple runtimes (Node/Python/etc.), document the one actually used by this repo.
- Use consistent terminology and minimal jargon.
Tasks:
- Identify how the project is installed, configured, run, and tested (from package files, scripts, Makefiles, CI, examples).
- List required environment variables and defaults (from
.env.example, config files, code).
- Draft:
README.md with: Overview, Features, Requirements, Quickstart, Configuration, Usage, Development, Troubleshooting, License.
- If the repo is a skill-collection/library: include install + usage examples, and a table of modules/skills.
- Return:
- A “Docs Brief” section (facts, assumptions, open questions as TODOs).
- Final markdown content ready to commit.
Deliverable format:
## Docs Brief (bullets)
## Proposed README.md (full markdown)
## Optional Additional Docs (only if needed)
Quality bar checklist
- Commands run from correct directories and use existing scripts.
- No references to files that do not exist.
- Examples compile logically with repo conventions.
- Sections are skimmable: short paragraphs, bullet lists, consistent headings.
1---2name: document3description: Spawn a subagent to produce high-quality project documentation (README, integration guide, tutorials, product docs) from the current repo state.4---56# Role: Documentation Lead (agentic, subagent-driven)78## When to use9Use this skill when the user asks to:10- Write or improve `README.md`11- Create “getting started”, “integration”, “tutorial”, “how-to”, “FAQ”, “troubleshooting”, or “product” documentation12- Generate docs from existing code/configs, or align docs with current repo behavior13- Do documentation work via “Spawn a subagent to …”1415## Goal16Create **concise, complete, and clear** documentation that matches the repository’s actual behavior and setup steps.1718## Inputs to collect (from the repo)19The documentation subagent must ground claims in the codebase. It should extract:20- **Project identity**: name, purpose, audience, supported platforms21- **How to run**: install steps, required env vars, commands, ports22- **How to use**: main flows, examples, typical use-cases23- **How to extend**: configuration, architecture overview (high level), key directories24- **How to troubleshoot**: common errors, fixes, logs, support channels2526## Output requirements27Depending on the user request, produce one or more:28- `README.md` (default)29- `docs/integration.md`30- `docs/tutorial.md`31- `docs/product.md`32- `docs/faq.md`33- `docs/troubleshooting.md`3435Every doc must include:36- **What** the project is37- **Who** it is for38- **How** to install/run/use (copy-pasteable commands)39- **Verification** steps (how to confirm it works)40- **Known constraints** (OS, versions, limitations) when discoverable4142## Subagent protocol (MANDATORY)43Spawn a subagent that reads the repo and returns a structured “docs brief” plus ready-to-paste markdown.4445### Recommended subagent prompt (copy/paste)46Spawn a subagent to write documentation for the repository at `<WORKSPACE_ROOT>`.4748Constraints:49- Ground every setup step and command in files present in the repo.50- Prefer the simplest working path; avoid speculative features.51- If there are multiple runtimes (Node/Python/etc.), document the one actually used by this repo.52- Use consistent terminology and minimal jargon.5354Tasks:551) Identify how the project is installed, configured, run, and tested (from package files, scripts, Makefiles, CI, examples).562) List required environment variables and defaults (from `.env.example`, config files, code).573) Draft:58 - `README.md` with: Overview, Features, Requirements, Quickstart, Configuration, Usage, Development, Troubleshooting, License.59 - If the repo is a skill-collection/library: include install + usage examples, and a table of modules/skills.604) Return:61 - A “Docs Brief” section (facts, assumptions, open questions as TODOs).62 - Final markdown content ready to commit.6364Deliverable format:65- `## Docs Brief` (bullets)66- `## Proposed README.md` (full markdown)67- `## Optional Additional Docs` (only if needed)6869## Quality bar checklist70- Commands run from correct directories and use existing scripts.71- No references to files that do not exist.72- Examples compile logically with repo conventions.73- Sections are skimmable: short paragraphs, bullet lists, consistent headings.