skills/docs/SKILL.md
Unified documentation skill. Generates human-readable docs (READMEs, guides, API references, getting-started), LLM-optimized agent/API docs, and regenerates CLAUDE.md. Triggers: "write docs", "document this", "README", "API reference", "getting-started", "LLM docs", "agent docs", "CLAUDE.md". For single-directive CLAUDE.md growth, use `/prove:remember` instead.
npx skillsauth add mjmorales/claude-prove docsInstall 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.
Dispatches by subcommand. Follows references/interaction-patterns.md for all AskUserQuestion usage.
| Subcommand | Purpose |
|------------|---------|
| human [subject] | Human-readable docs — delegates to technical-writer agent |
| agent [subject] | LLM-optimized agent/API/module docs |
| both [subject] (default) | Auto-docs: resolve scope, run both audiences |
| claude-md generate | Full CLAUDE.md generation via claude-prove claude-md CLI |
Parse first token of $ARGUMENTS as subcommand. If absent, default to both with empty subject (session context).
For single-directive growth of CLAUDE.md outside the prove-managed block, defer to /prove:remember <directive> — it owns optimize + certify + safe-insertion.
humanDelegate to technical-writer subagent. One-pass gather, one-pass delegate.
AskUserQuestion header "Subject" if ambiguous (include "Research & proceed" with <=3 options):
| Subject | Indicators | Key Sections | |---------|------------|--------------| | Project | Root dir, package.json, multiple components | Quick start, usage, architecture, config | | API | HTTP handlers, REST/GraphQL endpoints | Endpoints, request/response, errors, examples | | Module | Package exports, public interfaces | Install, API surface, examples | | Script | Executable file, CLI flags | Usage, flags table, examples | | Workflow | Multi-step process, multiple tools | Prerequisites, steps, troubleshooting |
AskUserQuestion header "Audience" if ambiguous:
| Audience | Tone | Depth | Assumes | |----------|------|-------|---------| | Contributor | Casual, direct | Deep on internals | Tech stack familiarity | | Consumer | Precise, professional | Interface-level only | No internal knowledge | | Operator | Practical, task-oriented | Config and operations | Infra/deployment experience | | End user | Friendly, no jargon | Surface-level | Minimal technical background |
Invoke technical-writer agent with:
Document [SUBJECT_TYPE]: [SUBJECT_NAME]
Audience: [AUDIENCE_TYPE]
Source: [FILE_PATH]:[LINE_RANGE]
Context:
[MINIMAL RELEVANT CODE/CONFIG]
Requirements:
- Output: [project-readme | api-reference | module-docs | script-docs | workflow-guide]
- Audience: [contributor | consumer | operator | end-user]
- Include: [subject-specific sections the template does not cover by default]
- Format: Markdown, no YAML frontmatter unless docs system requires it
foo/bar/...)AskUserQuestion header "Quality": "Approve" / "Revise".
agentGenerate machine-parseable, LLM-consumable documentation. Delegate to technical-writer with agent-doc output flag.
AskUserQuestion header "Subject" if ambiguous:
| Subject | Indicators | Required Contracts |
|---------|------------|-------------------|
| Agent | .md in agents dir, tools: frontmatter | Triggers, input contract, output contract, workflow steps (numbered), tool permissions |
| API | HTTP handlers, REST/GraphQL endpoints | Request schema (params, body, headers), response schema (success + error), validation rules, error codes |
| Module | Package exports, public interfaces | Public interface (exports only), parameter types/constraints, return types, side effects (I/O, state) |
| Code | Functions, classes, complex logic | Types, behavior, edge cases |
Document [SUBJECT_TYPE]: [SUBJECT_NAME]
Source: [FILE_PATH]:[LINE_RANGE]
Context:
[MINIMAL RELEVANT CODE/CONFIG]
Requirements:
- Output: [agent-doc | api-doc | module-doc]
- Include: [specific contracts from table above]
- Format: YAML frontmatter + structured markdown
name, type.../foo/bar)AskUserQuestion header "Quality": "Approve" / "Revise".
both (default)Resolve scope, classify subjects, run agent docs first (define contracts), then human docs.
| Input | Resolution | |-------|------------| | No argument | Session context: files created, modified, or discussed in the current session | | Topic name | Grep/Glob for matching files/packages/modules | | Directory path | All exported/public code in that directory | | File path(s) | Those specific files |
Session priority: new files > significantly modified > new agents/skills/commands > scripts. Skip: test files, lock files, build artifacts, self-documenting configs.
If ambiguous: AskUserQuestion header "Scope": "This session" / "Directory" / "Specific files".
| Subject Type | Indicators | Human Docs | Agent Docs |
|-------------|------------|------------|------------|
| Agent (agents/.md) | tools:/model: frontmatter | No | Yes |
| Skill (skills//SKILL.md) | name: frontmatter, workflow | Yes | Yes |
| Command (commands/.md) | description: frontmatter | Yes | No |
| Script (scripts/.sh) | Executable, CLI flags | Yes | Only if agents invoke it |
| Package/Module (src/, lib/) | Exports, public API | Yes | Yes |
| Config (.json, .yaml) | Schema, options | Yes | Only if agents read it |
AskUserQuestion header "Doc Types":
If human docs selected and audience non-obvious: AskUserQuestion header "Audience": "Contributor" / "Consumer" / "Operator".
AskUserQuestion header "Output":
Order: agent docs first (establish contracts), human docs second (can reference them). Within each type: core modules before consumers. Dispatch to human and agent subcommand workflows above.
Present summary table (subject, human/agent, path, file count).
AskUserQuestion header "Review": "Approve all" / "Revise" / "Discard".
claude-md generateFull CLAUDE.md regeneration. Scans codebase (tech stack, conventions, structure), reads .claude/.prove.json, composes deterministic output.
$PLUGIN = absolute path to this plugin's root (parent of skills/)$CWD = user's cwd (target project, not plugin dir)claude-prove claude-md generate --project-root $CWD --plugin-dir $PLUGIN| Command | Purpose |
|---------|---------|
| claude-md scan --project-root $CWD --plugin-dir $PLUGIN | Scanner only, JSON output |
| claude-md subagent-context --project-root $CWD --plugin-dir $PLUGIN | Compact context for subagent injection |
Safe to re-run — the CLI owns the file.
| Anti-Pattern | Instead |
|--------------|---------|
| Reading entire files | Grep target, read specific lines |
| Interleaving gathering and writing | Complete all reads before delegating |
| Omitting audience from human prompt | Always include Audience: |
| Verbose examples with inline commentary (agent docs) | Minimal working examples |
| Line-by-line code explanation (agent docs) | Document behavior and contracts |
| Writing raw user directive to CLAUDE.md | Route through /prove:remember (optimize + certify + safe-insert) |
Delegate to commit skill. Example messages:
docs(docs): add README for cafi tooldocs(docs): document validation-agent interfacedocs(docs): regenerate CLAUDE.mdtesting
Anchor session context into prove primitives before compaction and rehydrate from them after. Built-in compaction summarizes by recency and drops the claude-prove state an agent needs to reorient; this skill externalizes volatile context into durable anchors (scrum tasks, decisions, run-state, a compact-anchors pointer file) pre-compact, then runs a deterministic reorientation sequence post-compact. Use before a manual /compact, when context is about to auto-compact, or immediately after a compaction. Triggers on "smart compact", "prepare for compaction", "anchor before compact", "context is getting long", "rehydrate", "reorient after compact".
tools
Apply model-driven CONTENT reshaping to stored run artifacts that sit behind the current schema, on explicit operator invocation only. Triggers on "migrate runs", "migrate run artifacts", "run content migration", "reshape run artifacts", "bring runs to current schema". You are the driver: the `run-state migrate-runs` CLI mechanically detects which artifacts are behind and emits a plan naming each one plus its migration-instruction file; you read the instructions and reshape the prose/findings, gated by the operator. The deterministic `schema migrate` handles structural column moves; this skill covers only the content reshaping beyond them. Never run as a background or resident loop — only when the operator asks.
tools
Synthesize the 7-section risk-forward Review Brief from a run's reasoning log. Triggers on "reasoning brief", "review brief", "synthesize the brief", "generate the brief", "brief the run", "brief for review", "story brief". You are the driver: the `acb brief` CLI renders a mechanical preservation-safe backbone and proves preservation; you synthesize the narrative prose (summary + changes), single-pass or multipass over episode chunks, then gate it through Stage-1 (mechanical, blocking) and Stage-2 (prose judge, advisory).
tools
Prune stale cached versions of the prove plugin from Claude Code's plugin cache. Use when superseded versions pile up under plugins/cache and agents read stale skills/references from them, or when reclaiming plugin-cache disk space. Triggers on "clean up cached plugin versions", "prune the plugin cache", "remove old prove versions", "stale plugin cache".