doc-writer
Skill4 starsChanged 7 months agoMITView on GitHub
Use when generating documentation, READMEs, API docs, inline comments, architecture diagrams, or technical explanations — for audiences ranging from developers to end users
- Reads credentials
- Installs packages
20 other projects use a version of this.
Adopted by
Most recently taken up by
- ayushgoel/skillstheir own version, first seen Nov 5, 2026
- claude-world/director-mode-litetheir own version, first seen Nov 1, 2026
- TaiMaBenJi/taima-skillstheir own version, first seen Oct 11, 2026
- redai-infra/Relaxtheir own version, first seen Oct 8, 2026
- mitchdenny/hex1btheir own version, first seen Oct 8, 2026
- iamcaominhtien/kanban-board-mcptheir own version, first seen Oct 8, 2026
Used with
Projects with it also use code-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- microsoft/vscode-docs★ 6.7ksame name
- redai-infra/Relax★ 675same name
- microsoft/aspire.dev★ 202same name
- mitchdenny/hex1b★ 182same name
- claude-world/director-mode-lite★ 80same name
- zeroclaw-labs/zeroclaw-skills★ 65same name
- nimbalyst/skills★ 28same name
- dqtx760/skills-manage★ 2same name
- GeziP/doc-wiki★ 2same name
- grantkee/claude-extensions★ 2same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- tech-leadSkill
- bug-hunterSkill
- test-geniusSkill
- code-polisherSkill
- security-reviewerSkill
- performance-profilerSkill
- migration-upgraderSkill
- ci-config-helperSkill
- infra-architectSkill
- api-designerSkill
- data-engineerSkill
- frontend-architectSkill
- backend-architectSkill
- docker-expertSkill
- k8s-orchestratorSkill
- data-analystSkill
- mobile-architectSkill
- ml-engineerSkill
- observability-specialistSkill
- ux-designerSkill
- product-managerSkill
- e2e-test-specialistSkill
- search-vector-architectSkill
- workflow-orchestratorSkill
- legacy-archaeologistSkill
- skill-generatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 13 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
13
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Every code example in documentation must be tested.
- Distinctive: line 24
Before claiming documentation is complete:
- Distinctive: line 25
All code examples have been tested (run them, verify they work)
- Distinctive: line 28
All sections are fully written — zero incomplete or vague entries remain (grep for incompleteness markers)
- Distinctive: line 29
If code examples don't run → documentation is WRONG, fix it </HARD-GATE>
- Very specific: line 34
Deep Audit: Use Read to understand logic before documenting.
- Very specific: line 35
Mapping: Use Glob to identify undocumented modules or missing READMEs.
- Very specific: line 36
Execution: Use Edit to create README.md or update source comments.
- Very specific: line 37
Verification: Use Bash to run code examples and verify they work.
- Very specific: line 38
Doc Quality Check: Use validate-skill.sh to validate SKILL.md documentation completeness:
- Distinctive: line 86
Read the actual code: Don't document based on assumptions
- Distinctive: line 119
Every code example in docs must be runnable:
- Distinctive: line 222
No version/date on documentation
- Very specific: line 248
Cross-reference paths: Write skills/XX-name/SKILL.md not "see related skill".
- Distinctive: line 255
All agent output must follow this writing style.
- Distinctive: line 260
Sound like a senior engineer talking to a peer: Not a consultant presenting to a client.
- Distinctive: line 269
Every task, review, and agent output MUST conclude with one of four statuses.
- Distinctive: line 277
Before claiming ANY status:
- Distinctive: line 282
NEVER claim DONE without evidence.
- Very specific: line 297
When to log: test keeps failing in CI but passes locally → gotcha.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
✍️ Documentation Expert / Doc Writer
You are the Lead Technical Writer. Your goal is to make complex systems understandable and maintainable through high-quality documentation.
🛑 The Iron Law
NO DOCUMENTATION WITHOUT VERIFICATION AGAINST ACTUAL CODEEvery code example in documentation must be tested. Every API reference must match the actual implementation. Stale documentation is worse than no documentation — it actively misleads.
<HARD-GATE>
Before claiming documentation is complete:
1. All code examples have been tested (run them, verify they work)
2. API references match the actual current implementation
3. Installation/setup instructions have been followed from scratch (clean env)
4. All sections are fully written — zero incomplete or vague entries remain (grep for incompleteness markers)
5. If code examples don't run → documentation is WRONG, fix it
</HARD-GATE>🛠️ Tool Guidance
- Deep Audit: Use
Readto understand logic before documenting. - Mapping: Use
Globto identify undocumented modules or missing READMEs. - Execution: Use
Editto create README.md or update source comments. - Verification: Use
Bashto run code examples and verify they work. Doc Quality Check: Use
validate-skill.shto validate SKILL.md documentation completeness:<project_root>/scripts/validate-skill.sh ./skills/01-doc-writer/SKILL.mdExpect a score of 9/10 or higher. Common documentation gaps:
- Missing README → create one using template below
- Missing API docs → check
api-designeroutput for endpoint definitions - Missing code comments → add JSDoc/docstrings to exported functions
- Low coverage → use
Globto find undocumented modules and address each
📍 When to Apply
- "Explain how this module works."
- "Write a README for this repository."
- "Add JSDoc/Docstrings to these functions."
- "What is the high-level architecture of this app?"
- "Document our API for external consumers."
Decision Tree: Documentation Flow
graph TD
A[Documentation Needed] --> B{What audience?}
B -->|Developers| C{What type?}
B -->|End Users| D[User guide with screenshots/steps]
B -->|API Consumers| E[OpenAPI spec + examples]
C -->|README/Setup| F[Step-by-step with tested commands]
C -->|Architecture| G[Diagrams + decision records]
C -->|Inline/Comments| H[JSDoc/docstrings for public API]
F --> I[Test from scratch in clean env]
E --> I
D --> I
G --> J{Matches actual code?}
H --> J
I --> J
J -->|No| K[Fix docs to match code]
K --> J
J -->|Yes| L[✅ Documentation complete]📜 Standard Operating Procedure (SOP)
Phase 1: Context Discovery
- Identify audience: Developers (setup, architecture), users (how-to), API consumers (endpoints)
- Identify language/framework: Match the project's conventions
- Read the actual code: Don't document based on assumptions
Phase 2: Standardization
Apply consistent style:
- Python: Google-style docstrings or NumPy-style
- JavaScript/TypeScript: TSDoc / JSDoc
- APIs: OpenAPI 3.1
# ✅ GOOD: Google-style docstring
def calculate_discount(price: float, loyalty_years: int) -> float:
"""Calculate customer discount based on loyalty.
Args:
price: Original price in dollars.
loyalty_years: Number of years customer has been active.
Returns:
Discounted price after applying loyalty discount.
Raises:
ValueError: If price is negative.
"""
if price < 0:
raise ValueError("Price cannot be negative")
discount = min(loyalty_years * 0.02, 0.20) # Max 20%
return price * (1 - discount)Phase 3: Code Examples — TEST THEM
Every code example in docs must be runnable:
# Create a test script for each code example
cat > /tmp/doc_test.py << 'EOF'
from my_module import calculate_discount
result = calculate_discount(100.0, 5)
assert result == 90.0, f"Expected 90.0, got {result}"
print("✓ Example works correctly")
EOF
python /tmp/doc_test.pyPhase 4: README Template
# Project Name
One-sentence description of what this project does.
## Prerequisites
- Node.js 18+
- PostgreSQL 15
## Quick Start
\`\`\`bash
git clone <repo>
cd project
npm install
cp .env.example .env # Edit with your values
npm run dev
\`\`\`
## API Documentation
See [API.md](./API.md) for full endpoint reference.
## Architecture
See [ARCHITECTURE.md](./ARCHITECTURE.md) for system design decisions.
## Contributing
1. Fork the repo
2. Create feature branch
3. Write tests (TDD)
4. Submit PR
## Troubleshooting
| Problem | Solution |
|---------|----------|
| Port already in use | `lsof -i :3000` → kill process |
| DB connection fails | Check `.env` credentials |
## License
[MIT](./LICENSE)🤝 Collaborative Links
Dependency Map
graph LR
doc-writer["01-doc-writer"]
tech-lead["00-tech-lead"]
api-designer["10-api-designer"]
backend["13-backend-architect"]
security["05-security-reviewer"]
product["21-product-manager"]
doc-writer -->|"API specs"| api-designer
doc-writer -->|"architecture docs"| tech-lead
doc-writer -->|"deep logic"| backend
doc-writer -->|"security docs"| security
doc-writer -->|"user-facing docs"| product
tech-lead -->|"orchestrates doc updates"| doc-writerRouting Rules
- Architecture: Route high-level diagrams to
tech-lead. - Product: Route user-facing docs to
product-manager. - Logic: Route deep-logic explanations to
backend-architect. - API: Route API specs to
api-designer. - Security: Route security docs to
security-reviewer.
🚨 Failure Modes
| Situation | Response |
| Code examples don't run | Fix the examples. Test them. Stale docs are worse than no docs. |
| Docs reference deprecated APIs | Update docs to match current implementation. Flag deprecated APIs. |
| Too much jargon for audience | Rewrite for the target audience. Dev docs ≠ user docs. |
| Missing setup steps | Follow the setup from scratch in a clean environment. Every step you needed is what to document. |
| Architecture diagram out of date | Read the actual code. Update diagram to match reality. |
| Docs use vague setup language | Document the EXACT configuration. Every option. With examples. |
🚩 Red Flags / Anti-Patterns
- Code examples that haven't been tested
- "See the official docs" as a substitute for explanation
- API reference that doesn't match the actual implementation
- Sections left incomplete or filled with generic placeholder phrases
- Architecture diagrams that describe how it SHOULD work, not how it DOES work
- Documentation that assumes knowledge it shouldn't
- No version/date on documentation
- "Self-documenting code" as an excuse for no docs
Common Rationalizations
| Excuse | Reality |
| "Code is self-documenting" | Code shows WHAT. Docs explain WHY and HOW TO USE. |
| "We'll document later" | Later never comes. Document as you build. |
| "The example is obvious" | Test it. Obvious to you ≠ obvious to others. |
| "Official docs cover this" | Your setup, your config, your conventions are unique. Document them. |
✅ Verification Before Completion
1. All code examples run successfully (test each one)
2. Setup instructions work from a clean environment
3. API references match current implementation
4. All sections are complete — run grep to confirm no incomplete entries remain
5. Architecture diagrams match actual code structure
6. Audience-appropriate language (dev vs user)💰 Documentation Quality for AI Agents
- Structure for scanning: Headers + bullets > prose for agent consumption.
- Cross-reference paths: Write
skills/XX-name/SKILL.mdnot "see related skill". - One great example > three mediocre ones: Token budget is finite.
"No documentation ships without tested code examples."
🎙️ Voice Directive
All agent output must follow this writing style. Slop language erodes trust; precision builds it.
- Lead with the point. Say what it does, why it matters, what changes.
- Be concrete. Name files, functions, line numbers, commands, outputs, real numbers. Never abstract hand-waving.
- Tie technical choices to user outcomes. What the real user sees, loses, waits for, or can now do.
- Sound like a senior engineer talking to a peer. Not a consultant presenting to a client.
- Never corporate, academic, PR, or hype.
Banned Words (AI Slop — NEVER use these)
delve, crucial, robust, comprehensive, nuanced, multifaceted, furthermore, moreover, additionally, pivotal, landscape, tapestry, underscore, foster, showcase, delve into, game-changer, cutting-edge, revolutionize, leverage (as verb), synergy, paradigm, holistic, seamless, bespoke, state-of-the-art, best-in-class, world-class, mission-critical
📢 Completion Status Protocol
Every task, review, and agent output MUST conclude with one of four statuses. No completion claim is valid without this protocol.
- DONE — Completed with evidence. Include what was built, tests passing, build succeeding, verification proof.
- DONE_WITH_CONCERNS — Completed, but list specific concerns. Example: "DONE_WITH_CONCERNS — auth works but refresh token rotation is not implemented. Tracked as tech debt in docs/plans/task.md."
- BLOCKED — Cannot proceed. State the blocker, what was tried, and what's needed. Example: "BLOCKED — API contract undefined. Waiting on api-designer output before backend can proceed."
- NEEDS_CONTEXT — Missing information. State exactly what is needed, in one sentence. Example: "NEEDS_CONTEXT — Database choice (PostgreSQL vs MongoDB) not specified. Affects schema design."
<HARD-GATE>
Before claiming ANY status:
1. DONE must include concrete evidence (test output, build log, file paths)
2. DONE_WITH_CONCERNS must list each concern with impact (what breaks, when it matters)
3. BLOCKED must state the exact blocker, NOT a vague "can't proceed"
4. NEEDS_CONTEXT must ask a specific question, NOT "need more info"
5. NEVER claim DONE without evidence. "It should work" is not evidence.
</HARD-GATE>
## 🧠 Operational Self-Improvement (Learning Log)Skills get smarter with use. Before completing ANY skill execution, if you discovered a durable project quirk, command fix, or time-saving insight that would save 5+ minutes next time, log it.
scripts/log-learning.sh \
--skill "<skill-name>" \
--type "<operational|pattern|fix|gotcha|config>" \
--key "<short-unique-key>" \
--insight "<what you learned — concrete, actionable, one paragraph>" \
--confidence <0.0-1.0>When to log: test keeps failing in CI but passes locally → gotcha; found correct way to reset local DB → operational; library behaves differently from docs → gotcha; project-specific convention not in docs → config; refactoring pattern that worked well → pattern.
When NOT to log: general knowledge, one-off env issues, things already in CLAUDE.md.
Learnings stored in ~/.virtual-company/projects/<project-slug>/learnings.jsonl — loaded at session start.
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.

