docs-instrument

docs-instrument is a skill for Claude Code, Codex from grimoire-rs/grimoire. It costs 177 tokens per session (4,409 once invoked), scanned A, original, Apache-2.0.

A setup workflow that turns documentation quality rules into runnable checks for a repository. It wires those checks, configurations, fixtures, and continuous-integration gates together so documentation violations can fail verification.

In plain words
What is it for?
Use it to add or verify documentation checks, declaration retrofits, test fixtures, CI gates, and recorded warning baselines.
Why use it?
Documentation rules that are not run can quietly be ignored. This checks that each wired rule can detect a planted failure and that its referenced files and signals exist.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to add or verify documentation checks, declaration retrofits, test fixtures, CI gates, and recorded warning baselines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grimoire-rs/grimoire/docs-instrument
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.

Any agent
npx skills add grimoire-rs/grimoire --skill docs-instrument
Clone the repo
git clone --depth 1 https://github.com/grimoire-rs/grimoire

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 docs-instrument

README.md
[![agentmods](https://agentmods.dev/badge/skills/grimoire-rs/grimoire/docs-instrument/github.svg)](https://agentmods.dev/skills/grimoire-rs/grimoire/docs-instrument)
Your own site
<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/docs-instrument"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/docs-instrument/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docs-instrument

Your own site · 80×15
<a href="https://agentmods.dev/skills/grimoire-rs/grimoire/docs-instrument"><img src="https://agentmods.dev/badge/skills/grimoire-rs/grimoire/docs-instrument.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,409 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00177 $0.04409
Opus 5.5 $0.00071 $0.01764
Sonnet 5.5 $0.00035 $0.00882
Haiku 4.5 $0.00018 $0.00441

Measured 1mo ago against content hash a7514e8c3a95, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docs-instrument 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 1mo 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.

.agents/skills/docs-instrument/SKILL.md · 334 lines

How it starts

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

docs-instrument

A repository has adopted the docs-quality rule set. Most of its rules carry a runnable verification, and none of those verifications runs yet. This skill turns that rule set into a gate that actually fails.

Work in cost order. The declaration retrofit is first because eight other families read the declaration, and none of their checks can classify a page until it lands.

Stop condition

Stop when all five hold. Do not keep going, and do not add rules.

  1. Every checks/ script the repo wires up exits 0 with --self-test.
  2. Every wired check has been seen red once, on a planted violation you reverted.
  3. Every file path named in a runner target, a lint config or a rule row resolves on disk.
  4. The signal manifest names every signal, including the deferred ones and their preconditions.
  5. The whole-tree warning counts are recorded as the ratchet baseline.

A check that cannot go red is not coverage. A path that does not resolve is not a check. Both are the failure this whole gate exists to prevent.

Before you start

  • Read rules/docs-quality/checks.md. It carries one row per script: what it checks, how to run it, its exit codes and its fixtures. Every flag beyond the common four lives there. Never invent a script name or a flag.
  • Every Python check shares one interface: python3 checks/<name>.py [--root DIR] [PATH ...] [--format text|json] [--self-test]. Exit 0 is clean, 1 is findings, 2 is a usage error or missing input. Findings print as path:line: DOC-XXX-nn: message.
  • Find the generator config: mkdocs.yml, book.toml, .vitepress/config.*, docusaurus.config.*, astro.config.*, docs/conf.py. The answer decides most of the wiring. See references/wiring-by-generator.md.
  • Do not rewrite prose in this skill's work. Retrofits and configs only. A content fix belongs in its own change.

The procedure

Step 1. Build the published-file list

Every check reads this list. Getting it wrong is how a prose lint ends up reporting on research notes and agent config (DOC-PLAIN-23).

Read the full file on GitHub · 334 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 334 lines · 177 tokens per session scan A a7514e8c3a95

Subscribe to this mod's changes

docs-instrument is a skill published in the GitHub repository grimoire-rs/grimoire (14 stars, last pushed today), licensed Apache-2.0. It adds 177 tokens to every session and 4,409 once invoked, about $0.0007 per session on Opus 5.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-09-08.

Related

Other skills, from other repositories