docguard-fix

docguard-fix is a skill for Claude Code, Codex from raccioly/docguard. It costs 45 tokens per session (2,318 once invoked), scanned A, original, MIT.

A tool for repairing project documentation by researching the actual codebase and checking the result against documentation rules. It focuses on canonical documents, meaning the official versions a project relies on.

In plain words
What is it for?
Use it to fix one named document or all issues found by docguard diagnose. It can remove API entries that no longer match the project’s OpenAPI specification and repeat checks until the documentation passes.
Why use it?
It removes outdated, generic, or placeholder documentation and catches problems through repeated validation. It also creates a backup before overwriting a document.

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

Made for: Claude Code, Codex.

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 docguard-fix

README.md
[![agentmods](https://agentmods.dev/badge/skills/raccioly/docguard/docguard-fix.svg)](https://agentmods.dev/skills/raccioly/docguard/docguard-fix)
Your own site
<a href="https://agentmods.dev/skills/raccioly/docguard/docguard-fix"><img src="https://agentmods.dev/badge/skills/raccioly/docguard/docguard-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,318 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.02318
Opus 5 $0.00023 $0.01159
Sonnet 5 $0.00009 $0.00464
Haiku 4.5 $0.00005 $0.00232

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

Security

Grade A, and why

docguard-fix 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.

.agent/skills/docguard-fix/SKILL.md · 230 lines

How it starts

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

DocGuard Fix Skill

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty). If user specifies --doc <name>, focus on that single document. If no arguments, fix ALL issues found by docguard diagnose.

Goal

Research the actual codebase to generate or repair canonical documentation that passes DocGuard's 19-validator guard suite. This skill replaces generic templates with real, project-specific content and iterates until quality checks pass.

Operating Constraints

  • NEVER use placeholder content — every section must reference real files, real modules, real dependencies
  • ALWAYS back up before overwriting — use safeWrite() pattern or create .bak files
  • Maximum 3 validation iterations — if still failing after 3 rounds, report remaining issues and stop
  • Research before writing — understand the codebase first, then generate documentation

Execution Flow

Step 0: Apply Mechanical Fixes First (no AI needed)

npx docguard-cli fix --write 2>&1

Removes endpoints documented in docs-canonical/API-REFERENCE.md that the OpenAPI spec confirms no longer exist (table row + detail block). Only edits docguard:generated docs, idempotent, prints what changed. Don't hand-edit these.

Step 1: Diagnose Current State

Run the diagnostic to identify all issues (each tagged mechanical or agent):

npx docguard-cli diagnose 2>&1

Parse the output to build an issue inventory:

Issue ID Severity Category File Description Autofix?
I001 ERROR Structure SECURITY.md Missing file Yes
I002 WARN Freshness ARCHITECTURE.md 5 commits behind Yes
... ... ... ... ... ...

If $ARGUMENTS contains --doc <name>, filter to only issues affecting that document.

Step 2: Prioritize Fix Order

Sort issues by fix dependency and impact:

Read the full file on GitHub · 230 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 · 230 lines · 45 tokens per session scan A 3360a857df26

Subscribe to this mod's changes

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