Command Palette

Search for a command to run...

Назад к скиллам
скилл № 32889

docs-instrument

Documentation verification gate for a repository that adopted the docs-quality rule set, covering the checks, configs, fixtures, harnesses and reader signals…

БесплатноБез исполняемых скриптов
ocx-shот ocx-sh★ 20 звёзд на GitHub

Установить docs-instrument в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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).

The list is git ls-files under the directory holding the generator config, plus repo-root README.md and CHANGELOG.md. Assert it excludes .agents, .claude, .serena, .worktrees, node_modules, dist, target and any build output directory.

A repository with a committed docs tree and no generator config still needs a list. Name that directory once, in the runner. The DOC-NAV family then reports not applicable and exits 0, because a tree with no site carries no sidebar and no search box (DOC-NAV-01).

Output. One shell function or task variable in the runner that prints the list. Schema in references/rollout.md.

Step 2. Retrofit the page declaration

checks/doc_declaration.py reads a doc_type and doc_tier comment inside the first 12 lines, using the comment opener of the file's markup family. It never reads a path (DOC-TYPE-02). Expect a 100 percent failure rate on the first run.

  1. Run python3 checks/doc_declaration.py --root . --seed. It proposes a type per page from the nav config or the page heading. Nav-label seeding measured 94.3 percent accurate over 122 pages (wave2-declaration-key.md section 10), against 68.1 percent for a path classifier.
  2. Review every seeded value. Read the content for the pages the seed could not place, which is roughly a third of a flat tree.
  3. Add doc_tier on tutorial, how-to and landing pages only. The other six types take a type line alone (DOC-DISC-13).
  4. Land it as one commit that changes nothing but declaration lines.

Traps that destroy files, all measured (wave2-declaration-key.md):

  • Never write the declaration as YAML frontmatter. mdBook renders it as a visible fake heading and indexes it (DOC-TYPE-28).
  • Never place the comment above existing frontmatter. It destroys the frontmatter on all three tested generators (DOC-TYPE-29).
  • Use {/* */} in MDX. An HTML comment is a hard build error there, and Docusaurus applies MDX parsing to plain .md unless markdown.format is set to detect (DOC-TYPE-30).

Output. One retrofit commit, and checks/doc_declaration.py exiting 0 over the file list. Commit shape in references/rollout.md.

Step 3. Wire the checks into the existing runner

Use the task runner or test runner the repo already has. Do not add a second one.

Wire the scripts the rule set names: prose.py, page_type.py, landing_check.py, nav_depth.py, doc_examples.py, links_raw.py. They all import strip_prose.py, which strips front matter, declaration comments, fenced code, code spans, link targets, images, tables, HTML, admonition markers and include directives. Never hand a check raw file text.

Every one of them runs twice, and this is the rule that decides whether the gate survives its first week:

  • Once over the changed files, at error severi
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/reader-signals.md
  • references/rollout.md
  • references/tested-examples-by-language.md
  • references/wiring-by-generator.md

FAQ

Что делает скилл docs-instrument?

Documentation verification gate for a repository that adopted the docs-quality rule set, covering the checks, configs, fixtures, harnesses and reader signals that make those rules enforceable. Use when someone asks to wire up docs checks or a docs CI gate, add doc_type and doc_tier declarations, retrofit a page declaration, set up markdownlint or Vale for prose, check docs links with lychee or a strict build, test documentation examples or code fences, add a doc-example harness, record terminal casts, capture zero-result searches, measure time to first working result, add a docs issue template, a feedback widget or privacy-preserving analytics, add a Lighthouse ratchet for a docs site, or land a new docs lint without turning every open pull request red. Not for deciding which pages to write or what the use-case tiers are, which is the docs-plan skill.

Как установить скилл docs-instrument?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docs-instrument запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить docs-instrument с