docs-sync

docs-sync is a command for coding agents from Filip-Podstavec/claude-leverage. It costs 32 tokens per session (844 once invoked), scanned A, original, MIT.

A documentation review workflow that checks how recent code changes may affect project documentation and the changelog. A separate helper reads the changes and suggests updates for the main session to apply.

In plain words
What is it for?
Use it after commits or branch changes to review README files, inline documentation, and changelog entries. It can also focus only on the changelog.
Why use it?
It helps prevent documentation from falling behind the code. It also separates the review of existing documentation from the actual edits.

Command

Part of the claude-leverage plugin — 16 skills, 5 commands, 14 agents, 4 hooks shipped together

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/filip-podstavec/claude-leverage/docs-sync
Clone the repo
git clone --depth 1 https://github.com/Filip-Podstavec/claude-leverage

Or install claude-leverage, the plugin that ships this one along with the rest of its 16 skills, 5 commands, 14 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docs-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/filip-podstavec/claude-leverage/docs-sync.svg)](https://agentmods.dev/commands/filip-podstavec/claude-leverage/docs-sync)
Your own site
<a href="https://agentmods.dev/commands/filip-podstavec/claude-leverage/docs-sync"><img src="https://agentmods.dev/badge/commands/filip-podstavec/claude-leverage/docs-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 844 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.00032 $0.00844
Opus 5 $0.00016 $0.00422
Sonnet 5 $0.00006 $0.00169
Haiku 4.5 $0.00003 $0.00084

Measured 4d ago against content hash 71d02b6396cc, 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 4d 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.

bench/archive-token-savings-thesis/commands/docs-sync.md · 58 lines

How it starts

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

Context

Branch: !git branch --show-current Status: !git status --short Last commit: !git log -1 --oneline Last commit shortstat: !git diff HEAD~1 --shortstat 2>/dev/null || echo "no previous commit" Branch diff vs main shortstat: !git diff main...HEAD --shortstat 2>/dev/null || git diff origin/main...HEAD --shortstat 2>/dev/null || echo "n/a" CHANGELOG present: !ls CHANGELOG.md 2>/dev/null && echo "yes" || echo "no"

Your role

You are orchestrating a documentation-sync workflow:

  • Phase 1: a Sonnet-based subagent reads the diff and existing docs, returns prose-direction suggestions with confidence labels.
  • Phase 2: you (the main session) apply approved updates using Edit/Write.

You do NOT analyze the docs yourself in the main session. The subagent does that. Your job is to delegate, summarize, get user direction, and then apply edits.

Workflow

  1. Determine diff scope:

    • If $ARGUMENTS contains a commit range or branch (e.g., HEAD~3..HEAD or feature-branch), pass that to the subagent.
    • If $ARGUMENTS contains --changelog-only, tell the subagent to skip README/inline doc analysis and focus only on CHANGELOG.
    • Otherwise let the subagent default to git diff HEAD~1 (last commit).
  2. Invoke the docs-updater subagent with the scope. Wait for its structured report.

  3. If the subagent reports "No Update Needed": relay that to the user briefly and stop. Do not propose unsolicited improvements.

  4. If updates are needed: present the report's "Documentation Updates Needed" and "CHANGELOG Entry" sections to the user. Each suggestion has a confidence: high|low field - call those out explicitly so the user knows which are obvious wins versus judgment calls.

  5. Ask for direction. Offer these options:

    • Apply all high-confidence items, ask per low-confidence item
    • Apply all (including low-confidence)
    • Apply only specific items (user picks)
    • Skip - user will handle docs manually

    Wait for explicit confirmation. Never apply edits preemptively.

Read the full file on GitHub · 58 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. 4d ago First seen · 58 lines · 32 tokens per session scan A 71d02b6396cc

Subscribe to this mod's changes

docs-sync is a command published in the GitHub repository Filip-Podstavec/claude-leverage (68 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 844 once invoked, about $0.0002 per session on Opus 5. 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.