DO

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.zip

Installs 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.
241 chars✓ has a “when” trigger
Beginner

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

You give it
Code changes or new feature requirements
You get back
Updated project documentation and consistency report

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_updated fields
  • 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 metrics
  • docs/feature-specs/F-##-*.yaml - One per F-## feature
  • docs/user-stories/US-###-*.yaml - One per user story
  • docs/user-flows/*.yaml - Primary user flows
  • docs/api-contracts.yaml - API endpoints
  • docs/system-design.yaml - Architecture
  • docs/data-plan.yaml - Metrics and data storage
  • docs/design-spec.yaml - UI/UX specifications

Workflow

1. Check Current State

Before making changes, understand what exists:

  • Read docs/product-requirements.yaml for feature list and current status
  • Check docs/feature-specs/ for existing feature documentation
  • Review docs/api-contracts.yaml for API coverage
  • Scan for broken links, outdated examples, or missing documentation

2. Update Documentation

For feature changes:

  • Update corresponding docs/feature-specs/F-##-*.yaml with new requirements
  • Add/update API endpoints in docs/api-contracts.yaml
  • Update docs/product-requirements.yaml if scope changed
  • Add JSDoc comments in code for complex logic

For new features:

  • Create docs/feature-specs/F-##-slug.yaml following init-project template
  • Add F-## entry to PRD feature table
  • Create API endpoint entries in docs/api-contracts.yaml if applicable
  • Create user stories in docs/user-stories/US-###-slug.yaml if 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.yaml following template
  • API changes: Update api-contracts.yaml and 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

init-project documentation template

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.

SkillInstallsUpdatedSafetyDifficulty
documenting-code (this skill)18moReviewBeginner
documentation-review114moNo flagsBeginner
docs-review107moNo flagsBeginner
workthrough108moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

More by CaptainCrouton89

View all by CaptainCrouton89

reviewing-code

CaptainCrouton89

Systematically evaluate code changes for security, correctness, performance, and spec alignment. Use when reviewing PRs, assessing code quality, or verifying implementation against requirements.

21105

railway-cli-management

CaptainCrouton89

Deploy, manage services, view logs, and configure Railway infrastructure. Use when deploying to Railway, managing environment variables, viewing deployment logs, scaling services, or managing volumes.

9139

writing-like-user

CaptainCrouton89

Emulate the user's personal writing voice and style patterns. Use when the user asks to write content in their voice, draft documents, compose messages, or requests "write this like me" or "in my style."

687

gathering-requirements

CaptainCrouton89

Systematically clarify user needs, preferences, and constraints before planning or implementation. Classifies work type, investigates existing systems, discovers edge cases and integration points, resolves assumptions, and creates detailed specifications. Use when building features, enhancements, or integrations where requirements need clarification.

31

auditing-security

CaptainCrouton89

Identify and remediate vulnerabilities through systematic code analysis. Use when performing security assessments, pre-deployment reviews, compliance validation (OWASP, PCI-DSS, GDPR), investigating known vulnerabilities, or post-incident analysis.

10

executing-work-in-parallel

CaptainCrouton89

Coordinate concurrent task execution through agent delegation. Plan independent work, manage dependencies, and execute multiple agents simultaneously. Use when handling multiple unrelated tasks, research investigations, or layer-based implementations that can run concurrently.

12

Search skills

Search the agent skills registry