Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docs-refresh

БесплатноБез исполняемых скриптовНе проверен

Refresh plugin catalog docs (README, PLUGIN-MAP, d2 diagram) so per-plugin skill/agent counts match disk. Use when fixing count drift or after adding skills.

laurigatesот laurigates★ 61 звезда на GitHub

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

/docs-refresh

Refresh this repo's top-level catalog docs so the stated plugin/skill/agent counts and the plugin set match what is actually on disk. The detector is scripts/check-docs-index.sh; this skill is the fixer that consumes its report.

When to Use This Skill

Use this skill when... Use something else when...
Per-plugin counts in the README headline / PLUGIN-MAP / the d2 diagram drifted A plugin needs adding/removing — follow /marketplace-authoring § Plugin Lifecycle first, then run this
check-docs-index.sh reports doc_count_drift / diagram_count_drift / diagram_svg_stale / readme_row_dangling You need a generic project's docs synced — that's documentation-plugin:docs-sync (wrong layout for this repo)
The PR gate Check docs-index drift failed in CI Editing rule-index or marketplace set — the audit reports those, but fix them at their source

Context

  • Audit: !bash scripts/check-docs-index.sh
  • README last touched: !git log --max-count=1 --format='%h %ci' -- README.md

Execution

Execute this refresh:

Step 1: Read the drift

Run bash scripts/check-docs-index.sh (shown in Context). Each ISSUES: line names the exact file, line, and the disk-vs-stated count. STATUS=OK with ISSUE_COUNT=0 means nothing to do — stop and report clean.

Step 2: Apply count fixes

For every doc_count_drift / diagram_count_drift issue, Edit the stated count to the disk count:

  • docs/CATALOG.md — never hand-edited; just catalog regenerates it from marketplace.json and the plugin dirs (CI: Check catalog is current).
  • docs/PLUGIN-MAP.md — the | <plugin> | N | ... | tier-table rows.
  • docs/diagrams/plugin-relationships.d2 — the label: "<name>\nN skills" node labels. The .svg is generated and never hand-edited; re-render it in Step 4.

Step 2b: Apply name-level fixes

Two ERROR-severity issue types are name drift, not count drift — no /docs-refresh arithmetic repairs them:

Issue type What it means Fix
diagram_svg_stale / diagram_svg_node_missing The committed .svg renders a per-plugin label the .d2 no longer states Re-render (Step 4). Never hand-edit the .svg to agree — Check 6 compares label text only and cannot tell a hand-patch from a render
readme_row_dangling A plugin README row advertises /<ns>:<name> with no matching skill directory Delete the row if the skill never existed, or correct it to the real invocation path. Resolution is exact, so a row that is a shorthand for a longer directory is a real finding — fix the row, not the check

Step 3: Light content pass

  1. git log --oneline <README-last-touched-sha>..HEAD -- '*/.claude-plugin/plugin.json' — if any new *-plugin directory landed, it must be added to PLUGIN-MAP, marketplace.json (which just catalog reads), and release config (see /marketplace-authoring § Plugin Lifecycle). Surface this rather than guessing a category.
  2. Update the rounded total in README's intro line (NNN+ skills) to the next round number at or below TOTAL_SKILLS from the audit.

Step 4: Re-render the diagram

If the d2 changed: d2 docs/diagrams/plugin-relationships.d2 docs/diagrams/plugin-relationships.svg, or just render-diagrams, which refuses a d2 whose version differs from the one the .svg records and falls back to the cloud-session install under tmp/d2/. Commit the .d2 and .svg together — always in the same commit. Check 6 is ERROR severity, so a .d2 edit pushed without its re-rendered .svg fails the always-on Check docs-index drift gate; that is deliberate (#2453, where the .svg sat stale behind STATUS=OK).

If d2 is not installed, install it rather than hand-editing the .svg. The .svg is only ever re-rendered by d2; Check 6 compares label text and cannot tell a hand-patch from a render, so a hand-edit passes the gate while leaving the file out of step with what d2 would produce.

Install the version the committed .svg was rendered with, read off its own data-d2-version="..." attribute (v0.9.0 as of #3487), so the diff is the label change and not whole-file renderer churn:

grep -o 'data-d2-version="[^"]*"' docs/diagrams/plugin-relationships.svg

Cloud sessions

Claude Code cloud sessions do not ship d2, and both mise/aqua and https://d2lang.com/install.sh resolve the release through api.github.com, which answers 403 there. Download the release asset from github.com instead and run the binary from the extracted tree (substitute the version from the .svg):

mkdir -p tmp/d2
curl -fsSL -o tmp/d2/d2-v0.9.0-linux-amd64.tar.gz https://github.com/terrastruct/d2/releases/download/v0.9.0/d2-v0.9.0-linux-amd64.tar.gz
curl -fsSL -o tmp/d2/SHA256SUMS https://github.com/terrastruct/d2/releases/download/v0.9.0/SHA256SUMS
(cd tmp/d2 && sha256sum --ignore-missing -c SHA256SU
Полный SKILL.md на GitHub

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

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

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

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

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

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

Bash(bash scripts/check-docs-index.sh *)
Bash(d2 *)
Bash(tmp/d2/*)
Bash(curl -fsSL *)
Bash(tar -xzf *)
Bash(mkdir -p tmp/d2)
Bash(grep -o *)
Bash(just render-diagrams)
Bash(git log *)
Bash(git rev-parse *)
Read
Edit
Grep
Glob
TodoWrite

FAQ

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

Refresh plugin catalog docs (README, PLUGIN-MAP, d2 diagram) so per-plugin skill/agent counts match disk. Use when fixing count drift or after adding skills.

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

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

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

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

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

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