docs-sync — Claude Code command: verify documentation matches code
docs-sync is a Claude Code command that compares documentation with recent code changes and flags inconsistencies. It catches outdated examples, incorrect API signatures, and mismatched parameter types.
no license ★ 6,091 updated 2026-01-06
.claude/commands/docs-sync.mdWhat docs-sync does
docs-sync scans Git commits from the past month, identifies changed files, and locates related documentation in /docs/, README files near the code, and TSDoc comments. It then verifies that code examples are still valid, function descriptions match the implementation, and property types are current.
The command relies on Git to fetch the list of modified files via git log and cross-references them with documentation. Output is a checklist of what needs updating. Unlike a general docs search, it reports only genuine errors and avoids suggesting documentation for its own sake.
What it helps with
- spot outdated code examples after refactoring
- catch misalignment between API implementation and its description
- verify parameter types in docs match the actual function signature
- compile a list of documentation to refresh following code updates
Example prompts for the agent
- Check if documentation is in sync with recent code changes
- What do I need to update in the docs after these changes?
- Compare the docs against the latest code modifications
How to install docs-sync
Manually: put the files in place
.claude/commands/docs-sync.mdCall it with /docs-sync. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/docs-sync.mdCall it with /prompts:docs-sync. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/docs-sync.prompt.mdManually: put the files in place
.gemini/commands/docs-sync.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about docs-sync
How do I install docs-sync in Claude Code?
Place the docs-sync.md file in your project's .claude/commands/ directory.
What does docs-sync do?
It identifies TypeScript code changed in the past month, locates corresponding documentation, and reports inaccuracies. Output is a checklist of docs that need revision.
Which files does docs-sync check?
It examines TypeScript files (*.ts, *.tsx), then searches for documentation in /docs/, README files near changed code, and TSDoc comments within the source files themselves.