Agent skill
docs
Dispatch docs subagent to audit, generate, and validate documentation against the codebase.
Install this agent skill to your Project
npx add-skill https://github.com/automagik-dev/genie/tree/main/skills/docs
SKILL.md
/docs — Documentation Generation
Audit existing documentation, identify gaps, generate what's missing, and validate every claim against actual code. Can be invoked standalone or as part of /work.
When to Use
- Codebase has undocumented modules, APIs, or workflows
- Existing documentation is stale or references removed features
- A wish deliverable includes documentation
- After significant code changes that invalidate existing docs
- After
/workcompletes — suggest/docsto document what changed
Documentation Surfaces
Audit and maintain these doc types:
| Type | Location | Purpose |
|---|---|---|
| README | README.md, */README.md |
Project/module overview, setup, usage |
| CLAUDE.md | CLAUDE.md, */CLAUDE.md |
Project conventions, commands, gotchas for AI agents |
| API docs | docs/api/, inline JSDoc/TSDoc |
Endpoint contracts, request/response schemas |
| Architecture | docs/architecture.md, ARCHITECTURE.md |
System design, data flow, component relationships |
| Inline docs | JSDoc, TSDoc, docstrings | Function/class/module-level documentation |
CLAUDE.md is a first-class documentation surface. When the codebase changes significantly (new commands, changed conventions, removed features), flag CLAUDE.md for update. CLAUDE.md should always reflect the current state of the project.
Flow
- Audit existing docs: scan all documentation surfaces above — map what exists.
- Identify gaps: compare documentation against actual code — find what's missing, outdated, or wrong. Pay special attention to CLAUDE.md accuracy.
- Generate: write documentation to fill the gaps, matching project conventions.
- Validate against code: verify every claim — file paths exist, APIs match, behaviors are accurate.
- Report: return list of created/updated files with validation results.
Dispatch
# Spawn a docs subagent
genie agent spawn docs
Example
After shipping a new genie work dispatch fix, the orchestrator runs /docs to update documentation:
# 1. Spawn a docs subagent
genie agent spawn docs
# 2. Send the task
genie agent send 'Audit and update docs after PR #746 (initialPrompt added to dispatch). Check: README.md, CLAUDE.md, CO-ORCHESTRATION-GUIDE.md, skills/work/SKILL.md — verify dispatch examples match current code. Fix any stale references.' --to docs
The docs agent:
- Scans all doc surfaces for references to
genie work, dispatch,protocolRouter.sendMessage - Finds CO-ORCHESTRATION-GUIDE.md still references the old dispatch flow
- Updates the guide with the new
initialPromptpattern - Validates every file path and API reference exists in the codebase
- Reports: "Updated 1 file (CO-ORCHESTRATION-GUIDE.md). 3 files verified current. 0 dead references."
Rules
- Validate every claim against actual code — no fiction.
- No dead references — every path, function, and API mentioned must exist in the codebase.
- Match existing project conventions for documentation style and structure.
- Never document features that don't exist yet.
- Include validation evidence in the report — not just "docs written" but "docs written and verified."
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
genie
Single entry point for all genie operations — auto-routes natural language to the right skill, detects existing lifecycle state, and handles operational commands. Use when planning features, reporting bugs, managing teams, or asking about the system.
refine
Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode.
work
Execute an approved wish plan — orchestrate subagents per task group with fix loops, validation, and review handoff.
review
Validate plans, execution, or PRs against wish criteria — returns SHIP / FIX-FIRST / BLOCKED with severity-tagged gaps.
wish
Convert an idea into a structured wish plan with scope, acceptance criteria, and execution groups for /work.
learn
Diagnose and fix agent behavioral surfaces when the user corrects a mistake — connects to Claude native memory.
Didn't find tool you were looking for?