skills/docgen/SKILL.md
Use when generating documentation, writing API docs, documenting modules or components, creating README content, building reference guides, or documenting many files with explicit coverage tracking.
npx skillsauth add cofin/flow docgenInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematic documentation generation with progress tracking and completeness guarantees. Analyzes code file-by-file, ensures nothing is skipped, and produces structured output per component.
Docgen complements flow-docs — it provides the systematic analysis engine for flow-docs' five-phase workflow. It can also be used standalone for ad-hoc documentation tasks when you need structured, complete documentation without a full flow-docs run.
The core guarantee: every file in scope gets documented. Progress is tracked explicitly ([3/12 files documented]) so you always know what's been covered and what remains.
Identify what needs documenting: single file, directory, module, or entire package. Be specific — "the auth module" means every file in that directory.
Enumerate every file to document with its path. This is the completeness checklist — no file gets dropped silently. Count them: this is your denominator.
For each file in the manifest:
references/component-template.md:
[3/12 files documented]After all files are documented:
Produce the final documentation:
// increments counter by 1 on counter++ adds no value. Explain the reason behind the logic.Before declaring documentation complete, verify:
Documenting src/auth/:
Manifest: 4 files — middleware.ts, session.ts, guards.ts, index.ts
[1/4] middleware.ts — Authentication middleware. Extracts JWT from Authorization header, validates with session.verify(), attaches user to request context. Exports: authMiddleware().
[2/4] session.ts — Session management. Creates/verifies JWTs using jsonwebtoken. Token lifetime: 24h. Exports: createSession(), verify().
[3/4] guards.ts — Route guards. requireAdmin() checks user.role === 'admin'. requireAuth() checks session exists. Both use authMiddleware output.
[4/4] index.ts — Re-exports: authMiddleware, requireAdmin, requireAuth, createSession.
Cross-reference: guards.ts depends on middleware.ts output. middleware.ts depends on session.ts. index.ts is the public API surface.
testing
Use when syncing Beads state to markdown, checking Flow status, refreshing context docs, validating task markers, or reporting ready/blocked Flow work.
testing
Use when initializing Flow in a repo, configuring .agents, installing or checking Beads bd, setting local-only sync policy, or creating first project context files.
data-ai
Use when drafting PRDs, researching, planning, refining, revising, or creating .agents/specs/<flow_id>/spec.md worksheets for Flow.
testing
Use when implementing Flow tasks from Beads or spec.md, claiming ready work, applying TDD, recording task notes, committing, and syncing after task state changes.