Agent skill

docs

Dispatch docs subagent to audit, generate, and validate documentation against the codebase.

Stars 280
Forks 46

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 /work completes — suggest /docs to 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

  1. Audit existing docs: scan all documentation surfaces above — map what exists.
  2. Identify gaps: compare documentation against actual code — find what's missing, outdated, or wrong. Pay special attention to CLAUDE.md accuracy.
  3. Generate: write documentation to fill the gaps, matching project conventions.
  4. Validate against code: verify every claim — file paths exist, APIs match, behaviors are accurate.
  5. Report: return list of created/updated files with validation results.

Dispatch

bash
# Spawn a docs subagent
genie agent spawn docs

Example

After shipping a new genie work dispatch fix, the orchestrator runs /docs to update documentation:

bash
# 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:

  1. Scans all doc surfaces for references to genie work, dispatch, protocolRouter.sendMessage
  2. Finds CO-ORCHESTRATION-GUIDE.md still references the old dispatch flow
  3. Updates the guide with the new initialPrompt pattern
  4. Validates every file path and API reference exists in the codebase
  5. 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."

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results