documenting-code
This verifies that documentation remains consistent with code by checking requirements, user stories, and API contracts against project standards.
Install
mkdir -p .claude/skills/documenting-code && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6102" && unzip -o skill.zip -d .claude/skills/documenting-code && rm skill.zipInstalls to .claude/skills/documenting-code
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Maintain project documentation synchronized with code. Keep feature specs, API contracts, and README current with init-project standards. Use when updating docs after code changes, adding new features, or ensuring documentation completeness.Key capabilities
- →Synchronize feature specs with code changes
- →Validate traceability between user stories and features
- →Update API contracts and system design documentation
- →Verify init-project standard compliance
- →Generate project management validation reports
How it works
The skill uses predefined templates and validation scripts to ensure that feature IDs, user stories, and API contracts remain aligned with the current codebase.
Inputs & outputs
When to use documenting-code
- →Update API documentation after changing endpoints
- →Ensure feature specs match code changes
- →Validate README against project requirements
About this skill
Documenting Code
Standards Reference
All documentation follows init-project conventions:
- IDs: F-## (features), US-### (user stories) - unique and traceable across docs
- Files:
docs/feature-specs/F-##-slug.yaml,docs/user-stories/US-###-slug.yaml - Front-matter: Required
title,status,last_updatedfields - Traceability: Every F-## links to PRD, every US-### links to F-##
Reference /file-templates/init-project/CLAUDE.md for full conventions.
Documentation Inventory
Required docs (from init-project template):
docs/product-requirements.yaml- Project goals, scope, features, success metricsdocs/feature-specs/F-##-*.yaml- One per F-## featuredocs/user-stories/US-###-*.yaml- One per user storydocs/user-flows/*.yaml- Primary user flowsdocs/api-contracts.yaml- API endpointsdocs/system-design.yaml- Architecturedocs/data-plan.yaml- Metrics and data storagedocs/design-spec.yaml- UI/UX specifications
Workflow
1. Check Current State
Before making changes, understand what exists:
- Read
docs/product-requirements.yamlfor feature list and current status - Check
docs/feature-specs/for existing feature documentation - Review
docs/api-contracts.yamlfor API coverage - Scan for broken links, outdated examples, or missing documentation
2. Update Documentation
For feature changes:
- Update corresponding
docs/feature-specs/F-##-*.yamlwith new requirements - Add/update API endpoints in
docs/api-contracts.yaml - Update
docs/product-requirements.yamlif scope changed - Add JSDoc comments in code for complex logic
For new features:
- Create
docs/feature-specs/F-##-slug.yamlfollowing init-project template - Add F-## entry to PRD feature table
- Create API endpoint entries in
docs/api-contracts.yamlif applicable - Create user stories in
docs/user-stories/US-###-slug.yamlif needed
3. Verify Standards Compliance
Checklist before finalizing:
- All F-## IDs in PRD have corresponding feature specs
- All US-### stories link to valid F-## features
- API contracts match feature spec endpoints
- Code examples work and are current
- Links between docs are valid
- Front-matter includes required fields (
title,status,last_updated) - IDs are properly linked across documents
4. Update README
Keep main README current:
- Update feature list to match PRD F-## features
- Refresh installation/setup instructions if changed
- Update API reference links
- Add new usage examples as needed
- Verify all links work
Project Management Commands
Update specific documentation:
/manage-project/update/update-feature # Update feature specs
/manage-project/add/add-api # Add API endpoints
/manage-project/update/update-design # Update system design
/manage-project/update/update-requirements # Update success metrics
Validation commands:
/manage-project/validate/check-consistency # Verify all IDs linked correctly
/manage-project/validate/check-coverage # Verify no orphaned docs
/manage-project/validate/check-api-alignment # Verify API alignment
Bash utilities (from docs/ directory):
./check-project.sh # Full validation
./list-features.sh # Show all features
./list-stories.sh # Show all stories
./list-apis.sh # Show all API endpoints
Quick Fixes
- Broken links: Update with correct paths and verify
- Outdated examples: Test code samples and update
- Missing feature docs: Create
F-##-slug.yamlfollowing template - API changes: Update
api-contracts.yamland corresponding feature specs - Status updates: Mark features as completed after implementation
When to Escalate
- Missing required docs from init-project template
- Broken traceability (orphaned IDs)
- Documentation conflicts with implementation
- User complaints about outdated docs
When not to use it
- →Projects not following init-project conventions
- →Updating documentation without corresponding code changes
Prerequisites
Limitations
- →Requires manual verification of code examples
- →Dependent on init-project file structure
How it compares
It enforces strict traceability and front-matter standards rather than allowing free-form documentation updates.
Compared to similar skills
documenting-code side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| documenting-code (this skill) | 1 | 8mo | Review | Beginner |
| documentation-review | 11 | 4mo | No flags | Beginner |
| docs-review | 10 | 7mo | No flags | Beginner |
| workthrough | 10 | 8mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by CaptainCrouton89
View all by CaptainCrouton89 →You might also like
documentation-review
stacklok
Reviews documentation for factual accuracy
docs-review
metabase
Review documentation changes for compliance with the Metabase writing style guide. Use when reviewing pull requests, files, or diffs containing documentation markdown files.
workthrough
bear2u
Automatically document all development work and code modifications in a structured workthrough format. Use this skill after completing any development task, bug fix, feature implementation, or code refactoring to create comprehensive documentation.
claude-md-improver
anthropics
Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".
anti-slop
rand
Comprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language, code, and design. Use when reviewing or improving content quality, preventing generic AI patterns, cleaning up existing content, or enforcing quality standards in writing, code, or design work.
agent-md-refactor
davila7
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.