update-doc-references
БесплатноБез исполняемых скриптовНе проверенAnalyze source-file changes referenced by documentation, update affected docs when needed, and report documentation reference updates for a PR.
от AztecProtocol★ 458 звёзд на GitHubОб этом скилле
Update Documentation References
When source files referenced by documentation change, analyze the changes and update the affected documentation if needed.
The docs live in this repository's docs/, in two lines that each have their own copy of
every developer and operator page (docs/CLAUDE.md, "Two dev lines: change both"). Most of
the code they document is aztec-node's: main's pages describe aztec-node main at the commit
docs/aztec-node.json pins, read through a checkout of it (docs/.aztec-node/tree, or
$AZTEC_NODE_DIR), and the v6 line's pages (docs/lines/v6/) describe aztec-node v6 at
the commit docs/lines/v6/aztec-node.json pins, read through docs/lines/v6/.aztec-node/tree.
node docs/scripts/aztec_node.mts fetch keeps both. A page's frontmatter references names
paths from this repository's root: labs/<path in aztec-node> for Labs code, where the
labs/ prefix names the checkout of the page's line and never the labs/ submodule, and
plain paths for this repository's own files (docs/examples/..., docs/lines/v6/examples/...).
A reference ending in /* covers every file under that directory.
Workflow
Step 1: Parse the Prompt
The dispatcher is offline, so the skill runs by hand: it needs only the PR number and its repository, and Step 3 finds the pages the PR's files reach. A dispatch prompt gives:
- the PR number and its repository:
aztec-labs-eng/aztec-nodefor Labs code (the usual case),AztecProtocol/aztec-packagesfor this repository's own files - the PR title
- the changed references (format:
source_file -> doc1, doc2; ...) - the reply thread link, if the dispatch gives one (Step 7)
Step 2: Get the Changes
For a PR:
gh pr view <PR_NUMBER> --repo <REPO> --json title,body,baseRefName,files,url
gh pr diff <PR_NUMBER> --repo <REPO>
An aztec-node PR names paths from aztec-node's root: prefix them with labs/ to compare
them with references.
Each line's pages describe the code at that line's pin. The PR's base branch
(baseRefName: main or v6) says which line to start with, not which lines it reaches:
test its merge commit against every pin (an unmerged PR is in none):
cd "$(git rev-parse --show-toplevel)"
merge=$(gh pr view <PR_NUMBER> --repo aztec-labs-eng/aztec-node --json mergeCommit -q .mergeCommit.oid)
for pinfile in docs/aztec-node.json docs/lines/*/aztec-node.json; do
echo "$pinfile: $(gh api "repos/aztec-labs-eng/aztec-node/compare/$merge...$(node -p "require('./$pinfile').commit")" --jq .status)"
done
ahead or identical means that line's pin has the change, so its pages may need it. A line
whose pin lacks it gets no edit that quotes the new code: report what its pages will need
when its pin moves. Then compare the symbol or behaviour the pages document in both
checkouts, and edit each copy whose checkout has it (Step 5): a main PR can fix behaviour v6
shares, and a page that is wrong about code both lines have is wrong in both copies.
When the change is a move of a pin rather than a PR (node docs/scripts/aztec_node.mts [--line <line>] pin <tag>), the pages it reaches come from the line's two pin commits. Run
this once per line whose pin moved, after check passes:
cd "$(git rev-parse --show-toplevel)"
docs/scripts/pin_doc_references.sh # the v6 line's: docs/scripts/pin_doc_references.sh --line v6
It prints <reference> -> <page>, <page> for each labs/ reference whose files differ
between the line's pin at git merge-base origin/next HEAD and its pin now. Pass the old
commit as an argument when the base is another (a release cut does). That list is Step 3's
mapping. stderr names both commits and the checkout, so read one reference's change with:
git -C "$AZTEC_NODE_DIR" diff <old> <new> -- <reference without labs/ and /*>
AZTEC_NODE_DIR is the line's checkout: eval "$(node docs/scripts/aztec_node.mts [--line v6] env)" exports it. The pin file also names the toolchain: when bb, noir or l1Artifacts moved, say so in
the report, since the examples and the Solidity snippets follow them.
Step 3: Identify Affected Documentation
The prompt lists which source files changed and which docs reference them. Confirm the
mapping from the docs' frontmatter, from the repository root, once per line (the library
scans a line's docs-developers, docs-operate, docs-participate and docs, never the
versioned snapshots):
cd "$(git rev-parse --show-toplevel)"
source docs/scripts/lib/extract_doc_references.sh
map=$(mktemp) changed=$(mktemp)
gh pr view <PR_NUMBER> --repo aztec-labs-eng/aztec-node --json files -q '.files[].path' |
sed 's|^|labs/|' >"$changed"
for root in docs docs/lines/*; do
extract_references_mapping "$root" "$map"
changed_references "$map" "$changed"
done
Each line is <reference> -> <page>, <page>, as pin_doc_references.sh prints for a pin
move, which needs no other mapping. For a PR of this repository drop the sed. R
Установить update-doc-references в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл update-doc-references?
Analyze source-file changes referenced by documentation, update affected docs when needed, and report documentation reference updates for a PR.
Как установить скилл update-doc-references?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл update-doc-references запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic