docguard-sync

A guide for keeping selected documentation sections aligned with the code. It refreshes marked code-derived sections and identifies human-written sections that may need review.

In plain words
What is it for?
Use it after code changes to review endpoints, entities, screens, technology choices, environment variables, and related prose in the canonical documentation.
Why use it?
It reduces outdated documentation by comparing the docs with the current code and previewing changes before they are applied.

Skill for Claude CodeCodex

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 skills/raccioly/docguard/docguard-sync
Any agent
npx skills add raccioly/docguard --skill docguard-sync
Clone the repo
git clone --depth 1 https://github.com/raccioly/docguard

Made for: Claude Code, Codex.

Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,079 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.00045 $0.01079
Opus 5 $0.00023 $0.00540
Sonnet 5 $0.00009 $0.00216
Haiku 4.5 $0.00005 $0.00108

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

Security

Grade A, and why

docguard-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 3d 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.

.agent/skills/docguard-sync/SKILL.md · 113 lines

How it starts

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

DocGuard Sync Skill

User Input

$ARGUMENTS

You MUST consider the user input. If --since <ref> is provided, include the git diff context in your reasoning when reviewing prose sections.

Goal

When code changes, re-derive the code-truth surface (endpoints, entities, screens, tech stack, env vars), refresh the matching <!-- docguard:section source=code --> blocks in canonical docs in place, and review/refresh the human-written prose in the same docs so it still describes reality.

Operating Constraints

  • Mechanical refreshes do not need you. DocGuard does them itself. Your job is the prose sections flagged as "review" — where the human writing may no longer match the new code reality.
  • Never edit anything outside the marked source=human sections in generated docs. The markers protect human writing; respect them.
  • Use the dry run first to see what will change before applying.

Execution Flow

Step 1 — Preview what's stale

npx --yes docguard-cli@latest sync 2>&1

Reads:

  • / lines: code-truth sections that drifted (you don't need to write these).
  • 🤖 Prose to review lines: human-written sections whose surrounding code changed — these are yours.

Step 2 — Apply the mechanical refresh

npx --yes docguard-cli@latest sync --write 2>&1

Re-derives every code-truth section from the current code and rewrites only those markers. Idempotent — running again is a no-op when up to date.

Step 3 — Review the flagged prose

For each 🤖 Prose to review entry:

  1. Open the doc (e.g. docs-canonical/API-REFERENCE.md).
  2. Locate the <!-- docguard:section id=<id> source=human --> block.
  3. Read the surrounding source=code section first — that's the new truth (e.g. the refreshed endpoint list, the refreshed screens table).
  4. Update the human prose so it still accurately describes that truth. Examples of what to update:
    • The API overview's endpoint count, or its description of the surface area.
    • The Architecture overview when new components/services appeared.
    • The Screens flows when new screens were added/removed/renamed.
  5. Stay inside the source=human markers — don't touch the code sections.

Read the full file on GitHub · 113 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. 3d ago First seen · 113 lines · 45 tokens per session scan A 7a3a5a49e756

Subscribe to this mod's changes

docguard-sync is a skill published in the GitHub repository raccioly/docguard (27 stars, last pushed 5d ago), licensed MIT. It adds 45 tokens to every session and 1,079 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.

Related

Other skills, from other repositories

EU AI Act Documentation

What compliance documentation to produce under the EU AI Act — Annex IV technical documentation, EU declaration of conformity, risk-management file, data-governance records, and GPAI training-data summary — and how to structure it.

niels-emmer/myace · 49 tokens

golden-rss

Use when testing the rss golden build.

yusufkaraaslan/Skill_Seekers · 12 tokens

decided-import

Reformat ONE existing document (a decision, requirement, design, roadmap, or prompt) into ONE valid RAC (requirements-as-code) artifact, with a mandatory human-review step before any file is written and decided validate as the deterministic close. Use when a user wants to add or import a single existing decision or…

asdecided/core · 98 tokens

architectural-decisions

Use when encountering questions about WHY code is built a certain way, when about to make architectural changes (new patterns, restructuring, choosing between approaches), or when the user asks about design rationale in a Repowise-indexed codebase (.repowise/ directory exists). Also activates when commit messages or…

repowise-dev/repowise · 87 tokens

pre-modification-check

Use before modifying, refactoring, moving, or deleting files in a Repowise-indexed repository, especially shared utilities, core modules, public APIs, or files the user did not explicitly identify.

repowise-dev/repowise · 45 tokens

automated-test-planning

Produce a standalone test plan by analyzing code for test coverage gaps and edge cases. Use when you need to create, generate, or draft a test plan for a branch, need to analyze test coverage, or need to identify what tests to write for specific files or directories. Does not produce a plain-language plan for a person…

testdouble/han · 146 tokens