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.
npx agentmods add skills/chen3feng/agent-skills/doc-code-consistency-checknpx skills add chen3feng/agent-skills --skill doc-code-consistency-checkgit clone --depth 1 https://github.com/chen3feng/agent-skillsWrote 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.
[](https://agentmods.dev/skills/chen3feng/agent-skills/doc-code-consistency-check)<a href="https://agentmods.dev/skills/chen3feng/agent-skills/doc-code-consistency-check"><img src="https://agentmods.dev/badge/skills/chen3feng/agent-skills/doc-code-consistency-check.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00026 | $0.00683 |
| Opus 5 | $0.00013 | $0.00342 |
| Sonnet 5 | $0.00005 | $0.00137 |
| Haiku 4.5 | $0.00003 | $0.00068 |
Grade A, and why
doc-code-consistency-check 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.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Doc–code consistency check
When to use
The user asks you to review or tidy up documentation (README, tutorials, help text) for a project whose code you can also read. Especially when they say "the docs look wrong" or "check whether the docs match the code".
Problem
Docs drift. Common observed drifts in real repos:
- A CLI flag was renamed in code but the README still shows the old one.
- A function described as "returns X" actually returns X-or-None.
- A "supported versions" list that nobody updated after a bump.
- Chinese and English versions of the same doc disagreeing with each other (and both possibly disagreeing with the code).
If you edit the docs to be self-consistent without re-reading the code, you often cement the wrong behavior.
Solution
Before changing a single word of a doc, do this loop:
- List the concrete claims the doc makes — flags, options, return types, default values, error behavior, supported platforms.
- Grep the code for each claim. Cross-reference against tests where possible.
- Categorize each discrepancy:
- (a) Doc wrong, code right → update the doc (this is most common).
- (b) Code wrong, doc right → ask the user; do not silently "fix" the doc.
- (c) Both wrong → surface it; don't guess.
- For multilingual docs (
README.md+README-zh.md), diff them after step 3 so both stay in sync. - Write a short changelog of what you changed in the doc and why, based on the code evidence. This lets the user audit quickly.
Example
Symptom: README says _check_python accepts a version string like
"3.11".
Bad fix: silently change the README to "3.11.0" because that's what
"looks right".
Good fix:
grep -n "_check_python" -r src/
# read the function, note it calls shutil.which("python3") and parses
# sys.version_info, no version string is accepted
Then update the README to describe what the code actually does, and mention the mismatch in the PR description so the maintainer can decide if the code should change instead.
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.
- 4d ago First seen · 82 lines · 26 tokens per session scan A 872a21fe0c52
doc-code-consistency-check is a skill published in the GitHub repository chen3feng/agent-skills (5 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 26 tokens to every session and 683 once invoked, about $0.0001 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-31.
Other skills, from other repositories
workflow-review
Critically review a Stencila workflow and suggest improvements. Use when asked to review, audit, critique, evaluate, or improve a workflow directory or WORKFLOW.md file. Covers frontmatter validation, DOT pipeline quality, workflow structure, agent selection quality, discovery metadata, ephemeral workflow conventions…
openclaw-dev
OpenClaw Dev Agent — OpenClaw-only docs-aware development assistant. For OpenCoven/coven PR creation, redirect to skills/pr-agent, the Coven PR Readiness Agent.
ai-loop
Runs a bounded spec-build-review development loop with explicit scope, stop conditions, and human approval gates for risky or ambiguous work.
code-review
Reviews diffs by severity to produce actionable feedback.
pr-workflow
Prepares branches and PRs for clean, reviewable merges.
receiving-code-review
Processes review feedback until the change is approved.