| name | docs |
| description | Manage project documentation structure. Use when the user explicitly asks to
initialize, research, add, change, delete, or scan project documentation files.
Trigger ONLY on: "initialize docs", "update docs", "project docs", "scan docs",
"docs init", "docs research", "docs add", "docs scan".
|
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion, Agent |
Docs Skill
Manage project documentation stored in README.md and ./docs/*.md files.
Documentation Hierarchy
| Priority | Location | Purpose |
|---|
| 1 | README.md | Project overview, quick start, feature index |
| 2 | ./docs/*.md | Detailed feature/module documentation |
| 3 | ./docs/api/*.md | API reference documentation |
| 4 | ./docs/guides/*.md | Tutorials and how-to guides |
| 5 | CLAUDE.md | AI coding guidelines (separate from user docs) |
Default assumption: README.md is the index, details go in ./docs/*.md.
Critical Rules
- NEVER guess - If information is not explicitly found, return "NO RESULTS"
- Always research first - Before add/change/delete, check for existing similar content
- Ask before destructive operations - Confirm before deleting or major reorganization
- Keep README concise - It's an index, move details to ./docs/
Actions
INIT Documentation
Initialize documentation structure using templates.
Process:
- Check if README.md exists
- Check if ./docs/ directory with .md files exists
- If docs exist:
- Present summary of existing docs
- Ask: "Extend existing docs" or "Reorganize" or "Create new (preserve old)"
- If reorganize: extract details from README to ./docs/*.md files
- If no docs:
- Ask: "Empty templates" or "Scan codebase first" or "Interactive"
- If scan: run discovery first, then create populated templates
- Create README.md from template (see references/README_TEMPLATE.md)
- Create ./docs/ structure as needed
- Ensure all ./docs/*.md files are linked from README.md
Template usage:
- README.md: overview + feature index with links
- ./docs/.md: detailed documentation per feature/module
RESEARCH Documentation
Search documentation and codebase for information.
CRITICAL CONSTRAINT:
MUST only return information explicitly found in documentation or codebase.
FORBIDDEN to guess or infer. If no explicit information found, return:
"NO RESULTS for
"
Process:
- Search README.md for query matches using Grep
- Search ./docs/*.md for query matches using Grep
- Search codebase (source files, configs, comments)
- Compile findings with source citations (file:line format)
- If absolutely no results: return "NO RESULTS for "
- NEVER fabricate or assume information
Output: If found, provide summary + sources table (file, line, excerpt).
If not found, output "NO RESULTS for " with locations searched and alternative suggestions.
ADD Documentation
Add new documentation.
Process:
- ALWAYS check for duplicates first (see references/DUPLICATE_CHECK.md)
- Scan existing docs for similar topics using semantic matching
- If potential duplicate found:
- Present existing doc with overlap details
- Ask: "Merge with existing" or "Create separate" or "Cancel"
- Determine appropriate location:
- README.md: for overview/quick-start additions
- ./docs/.md: for detailed feature documentation
- ./docs/api/.md: for API reference
- ./docs/guides/.md: for tutorials
- Create from template (see references/FEATURE_DOC_TEMPLATE.md)
- Update README.md feature index if new ./docs/ file created
- Report what was created and where
Duplicate detection:
- Title similarity (fuzzy match)
- Content overlap (key terms)
- Same code symbols referenced
CHANGE Documentation
Modify existing documentation.
Process:
- Search for documentation matching the query
- Present all matching docs with context (file, section, preview)
- Ask user to confirm which to modify
- Accept the modification (full replacement or guided edit)
- Apply change preserving markdown structure
- Update cross-references if titles change
- Report before/after summary
Matching strategies:
- Exact file name match
- Section header match
- Content keyword search
- Fuzzy match for partial queries
DELETE Documentation
Remove documentation.
Process:
- Search for documentation matching the query
- Present matching docs with full context:
- File path and size
- Preview of content
- Links from other docs (cross-references)
- Ask user to confirm deletion
- Remove file or section
- Clean up cross-references in README.md
- If ./docs/.md deleted, update README.md feature index
- Report what was deleted
SCAN Codebase
Scan codebase and suggest documentation updates.
Process:
- Detect undocumented features:
- Public functions/classes without doc comments
- API endpoints not in docs
- Configuration options not documented
- Modules without ./docs/*.md files
- Detect outdated documentation:
- Code symbols that no longer exist
- Version references that are outdated
- Commands that have changed
- Produce scan report with recommendations:
- Missing documentation (priority ranked)
- Outdated documentation (specific issues)
- Suggested new ./docs/*.md files
- Offer to create/update documentation based on findings
Output: Summary (total docs, coverage %, issue count), tables of missing and outdated docs with priority/actions, list of suggested actions.
Reference Files
references/README_TEMPLATE.md - Industry-standard README template
references/FEATURE_DOC_TEMPLATE.md - Template for ./docs/*.md files
references/DUPLICATE_CHECK.md - Duplicate detection protocol
Best Practices
- Keep README.md concise: It's an index, not the full documentation
- Cross-reference liberally: Link between docs using relative paths
- Update with code: Docs should evolve with the codebase
- Be specific: "Click Submit button" > "Submit the form"
- Include examples: Code snippets, commands, screenshots
- Research before changing: Always check for existing similar content
- Never guess: Return "NO RESULTS" rather than fabricating information