docs-sync

A command that checks whether project documentation still matches recent code changes and suggests specific updates.

In plain words
What is it for?
Use it after commits or while working on changes to identify affected README files, guides, reference pages, and examples.
Why use it?
It helps catch documentation that became inaccurate after files, schemas, commands, or other code changed.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sanmak/specops/docs-sync
Clone the repo
git clone --depth 1 https://github.com/sanmak/specops

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,636 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.02636
Opus 5 $0.00000 $0.01318
Sonnet 5 $0.00000 $0.00527
Haiku 4.5 $0.00000 $0.00264

Measured 2d ago against content hash 3ae0f32827ab, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/docs-sync.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Check for stale documentation after code changes and propose updates for approval.

Instructions

Follow these steps precisely. This command detects documentation that has fallen out of sync with the codebase and proposes targeted fixes.

Step 1: Determine change scope

Identify what has changed in the codebase. Use $ARGUMENTS if provided as a custom git range (e.g., HEAD~3..HEAD or a branch name). Otherwise, default to the last commit plus any uncommitted changes.

# Last commit changes
git diff --name-only HEAD~1..HEAD

# Uncommitted changes (staged + unstaged)
git diff --name-only HEAD

# Detect renames and deletions specifically
git diff --diff-filter=RD --name-only HEAD~1..HEAD

Combine all results into a single deduplicated list of changed files.

Step 2: Match against dependency map

For each changed file, check which documentation may be affected using this mapping:

Source files changed Docs to check
.claude/commands/*.md CLAUDE.md (Custom Slash Commands table), docs/COMMANDS.md
schema.json docs/REFERENCE.md (config options), README.md (Configuration section), example configs examples/*.json
spec-schema.json, index-schema.json docs/REFERENCE.md (spec structure), example specs examples/specs/
core/workflow.md README.md (How It Works), docs/REFERENCE.md (Workflow Phases), CLAUDE.md (Architecture)
core/review-workflow.md docs/TEAM_GUIDE.md, README.md (Team Review Workflow)
core/safety.md CLAUDE.md (Security-Sensitive Files), SECURITY.md
core/verticals.md README.md (Vertical Adaptation), docs/REFERENCE.md
core/interview.md docs/COMMANDS.md (Interview Mode)
core/init.md QUICKSTART.md, docs/COMMANDS.md
platforms/*/platform.json README.md (Platforms table), docs/STRUCTURE.md, CLAUDE.md (Platform Capabilities)
New platform directory under platforms/ README.md, CLAUDE.md (Adding a New Platform), docs/STRUCTURE.md, CONTRIBUTING.md
generator/generate.py, generator/validate.py CLAUDE.md (Key Commands, Validation), docs/STRUCTURE.md
scripts/*.sh CLAUDE.md (Key Commands), QUICKSTART.md
hooks/* CLAUDE.md (Security-Sensitive Files)
core/templates/*.md docs/REFERENCE.md (Spec Templates), example specs
setup.sh, scripts/remote-install.sh QUICKSTART.md (Installation), README.md (Quick Start)
.github/workflows/*.yml CLAUDE.md (CI Notes), CONTRIBUTING.md
core/config-handling.md docs/REFERENCE.md (Configuration Options)
core/custom-templates.md docs/REFERENCE.md (Spec Templates)
core/data-handling.md CLAUDE.md (Security-Sensitive Files)
core/dependency-safety.md CLAUDE.md (Security-Sensitive Files, core modules list), docs/REFERENCE.md (Configuration Options), docs/STRUCTURE.md
core/dependency-introduction.md CLAUDE.md (core modules list), docs/STRUCTURE.md
core/evaluation.md CLAUDE.md (core modules list), docs/REFERENCE.md (Configuration Options), docs/STRUCTURE.md
core/learnings.md CLAUDE.md (core modules list), docs/REFERENCE.md (Configuration Options), docs/STRUCTURE.md, docs/COMMANDS.md (Learn)
core/error-handling.md docs/REFERENCE.md
core/feedback.md docs/COMMANDS.md (Send Feedback)
core/from-plan.md docs/COMMANDS.md (From Plan)
core/memory.md docs/COMMANDS.md (Local Memory), docs/REFERENCE.md
core/metrics.md docs/REFERENCE.md (Usage Metrics), docs/TOKEN-USAGE.md
core/run-logging.md docs/REFERENCE.md (Configuration Options)
core/plan-validation.md docs/REFERENCE.md (Configuration Options)
core/git-checkpointing.md docs/REFERENCE.md (Configuration Options)
core/pipeline.md docs/COMMANDS.md (Pipeline Mode), docs/REFERENCE.md
core/reconciliation.md docs/COMMANDS.md (Drift Detection)
core/repo-map.md docs/COMMANDS.md (Repo Map), docs/REFERENCE.md
core/simplicity.md CLAUDE.md (Simplicity Principle)
core/steering.md docs/COMMANDS.md (Steering Files), docs/STEERING_GUIDE.md
core/task-delegation.md docs/REFERENCE.md (Configuration Options)
core/task-tracking.md docs/REFERENCE.md
core/tool-abstraction.md CLAUDE.md (Tool Abstraction)
core/writing-quality.md CLAUDE.md, README.md (Writing and Engineering Philosophy)
core/engineering-discipline.md CLAUDE.md, README.md (Writing and Engineering Philosophy), docs/STRUCTURE.md
core/update.md docs/COMMANDS.md (Update)
core/view.md docs/COMMANDS.md (View/List)
core/decomposition.md docs/COMMANDS.md (Initiative Management), docs/REFERENCE.md (Spec Structure), docs/STRUCTURE.md, docs/DIAGRAMS.md, README.md (Multi-Spec Features), CLAUDE.md (Architecture)
core/initiative-orchestration.md docs/COMMANDS.md (Initiative Management), docs/REFERENCE.md, docs/STRUCTURE.md, docs/DIAGRAMS.md, CLAUDE.md (Architecture)
core/dispatcher.md CLAUDE.md (Architecture), docs/STRUCTURE.md, README.md (Context-Aware Dispatch)
core/mode-manifest.json CLAUDE.md (Architecture, Mode Architecture — update mode count), docs/STRUCTURE.md
initiative-schema.json docs/REFERENCE.md (Spec Structure), docs/STRUCTURE.md
New core/*.md (not in table) docs/STRUCTURE.md, determine target docs from module content

Read the full file on GitHub · 197 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 197 lines · 0 tokens per session scan A 3ae0f32827ab

Subscribe to this mod's changes

docs-sync is a command published in the GitHub repository sanmak/specops (49 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,636 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.