Command Palette

Search for a command to run...

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

Build Docs

Run mkdocs build with strict validation to ensure documentation builds cleanly and all links are valid.

БесплатноБез исполняемых скриптов
CERTCCот CERTCC★ 22 звезды на GitHub

Установить Build Docs в Claude Code и Claude Desktop

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

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

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

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

Skill: Build Docs with mkdocs in Strict Mode

Purpose

Validate that documentation builds cleanly without real warnings or broken links using mkdocs build --strict. This ensures the documentation site is correct before committing changes to docs/ directory files.

When the docs/ directory is modified, mkdocs build --strict MUST pass with zero real warnings before code is staged for commit. CI enforces the same constraint: both docs-build-check.yml and deploy_site.yml build through .github/actions/build-site, which runs a plain mkdocs build --strict (DOCBW-03-009, DOCBW-06-004). CI suppresses nothing, so a warning this script forgives below still fails CI; the suppression list exists only for the griffe false positives, which are absent from the current build.

Note: This skill automatically suppresses false-positive warnings from griffe that result from Python decorators being misinterpreted as bibliography citations (e.g., @dataclass, @main.command, @prefix). Real documentation errors are still reported and must be fixed.

Inputs

  • repo_root (string, default .): repository root where the command should be executed.

Outputs

  • build_status (string): machine- and human-readable summary printed to stdout/stderr (exit status indicates success/failure). A successful build prints "Successfully built docs!" and exits with code 0. A build with real warnings exits with code 1 and prints the warning count.

Procedure

  1. From the repository root, run the build script:
uv run python .agents/skills/shared/run-heavy.py .github/scripts/mkdocs-build-strict.sh
  1. Inspect the output. Any broken links, missing anchors, or other real issues are printed as WARNING lines to stdout. False-positive warnings from griffe decorators are automatically suppressed.

  2. Fix all reported real issues in the docs/ files and re-run the command until it exits with code 0.

  3. Serve the released drafts' frozen pages into site/spec/, as CI's serve-frozen-drafts action does between the build and the checks below (DOCBW-08-028, DOCBW-08-035):

register=$(mktemp)
PYTHONPATH='' uv run drafts-register show > "$register"
python3 -I .github/scripts/serve_frozen_drafts.py \
  --register "$register" --site site --repo CERTCC/Vultron

The build never writes site/spec/ (DOCBW-08-034), but the Revision Log links each released draft's frozen copy at spec/draft-N/. Without this step, docs-links reports every such link as unresolved. The script reads the drafts' release assets through gh, so it needs gh authenticated. Run it once per build: a second run fails DOCBW-08-034 on the pages its first run served, so rebuild with the first step before running it again.

  1. Check the publication axis against the built site, with the frozen drafts served into it:
PYTHONPATH='' uv run docs-withheld
PYTHONPATH='' uv run docs-legacy-urls

docs-withheld fails when an artifact the project declared withheld produced files in site/ (DOCBW-03-005). docs-legacy-urls fails when a URL an earlier publish served no longer resolves as a page or a redirect (DOCBW-03-008). The fix for a moved page is a redirect_maps entry in mkdocs.yml. A page withdrawn on purpose gets a declaration in vultron/metadata/docs/withheld.py instead. Both checks read the built tree, so they only mean anything after the build and the frozen-drafts step succeeded. Both the pull-request workflow and deploy_site.yml run them through the check-site-publication action, so a failure here is a failure that would have blocked the deploy.

The same action also runs PYTHONPATH='' uv run docs-legacy-urls --require-recorded (DOCBW-03-012). It needs no site/: it fails when a page the checked-out commit builds is missing from vultron/metadata/docs/legacy_urls_baseline.txt. A new page — _-prefixed fragments included — goes live at the next deploy, so it is due in the baseline in the pull request that adds it. The fix is to commit the page, run uv run docs-legacy-urls --snapshot HEAD, and commit the updated baseline on the same branch.

  1. Check the reference axis against the same build:
PYTHONPATH='' uv run docs-links

This resolves every internal href/src on every page in site/ and fails on any that points at a file the build did not produce, printing each as <page>: <reference> (DOCBW-03-007). It covers what --strict cannot: links printed by markdown-exec blocks, links to withheld pages, and pages nothing links to. Both workflows run it, unconditionally, through the same check-site-publication action.

  1. Stage changes only after every command above exits cleanly with zero code.

Constraints / Rules

  • Run the build script only when files in docs/ are modified.
  • All documentation MUST build cleanly; no real warnings are acceptable in strict
Полный SKILL.md на GitHub

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

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

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

FAQ

Что делает скилл Build Docs?

Run mkdocs build with strict validation to ensure documentation builds cleanly and all links are valid.

Как установить скилл Build Docs?

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

Скилл Build Docs запускает скрипты?

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

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

Сравнить Build Docs с