docs-sync
БесплатноЗапускает вложенные скриптыНе проверенDetect and close drift between code and the Docusaurus site in `website/`. Use when the user asks to sync docs with code, audit docs drift, or after…
от abapify★ 20 звёзд на GitHubОб этом скилле
docs-sync
Three-level pipeline for keeping website/ in sync with the code. Each level
runs independently — do not skip level 1 before running the later ones.
1. check-structure (deterministic, no LLM) → find structural drift
2. generate-stubs (template, no LLM) → create missing doc files from code facts
3. refresh-content (agentic, diff-scoped) → suggest updates to existing pages [not implemented yet]
Nx targets (on the adt-cli-docs project):
bunx nx docs-check adt-cli-docs # level 1 — fails CI on drift
bunx nx docs-stubs adt-cli-docs # level 2 — materialises missing pages and patches sidebars.ts
Why this shape
Most of website/docs/ is a 1-to-1 projection of the code:
| Docs path | Code source |
|---|---|
website/docs/sdk/packages/*.md |
packages/* |
website/docs/cli/*.md |
packages/adt-cli/src/lib/commands/* |
website/docs/mcp/tools/*.md |
server.tool('name', …) in adt-mcp |
website/docs/sdk/contracts/*.md |
packages/adt-contracts/src/adt/* |
website/sidebars.ts |
Index of all of the above |
For this 80% of the docs, drift is a set-difference problem, not an LLM problem. Level 1 computes that difference in a few milliseconds with no model calls and no false positives. Run it first, always.
The remaining 20% (guides/, architecture/, plugins/writing-*) is genuine
prose that requires human judgement — level 3 handles that, but only as an
advisor that flags sections for review. It does not rewrite prose.
Level 1 — check-structure (implemented)
bun .agents/skills/docs-sync/scripts/check-structure.ts
Exit code 0 if clean, 1 if drift. Emits a machine-readable-ish report with:
missing in docs— exists in code, absent from docs/sidebarorphan in docs— exists in docs/sidebar, absent from code
Detection rules:
- Packages: every dir under
packages/must havewebsite/docs/sdk/packages/<name>.mdand an entry undersdkPackagesinsidebars.ts. - MCP tools: every tool name registered in
packages/adt-mcp/src/lib/tools/(both directserver.tool('name', …)and indirecttoolName: 'name'wrappers) must havewebsite/docs/mcp/tools/<name>.mdand an entry undermcpToolsinsidebars.ts. - Sidebar ↔ files: every doc id quoted in
sidebars.tsmust resolve to an.md/.mdxfile, and every doc file must be referenced fromsidebars.ts(exceptgenerated-indexcategories).
Not yet covered (known gaps):
- CLI commands (name mapping is fuzzy —
cli/cts-transportin sidebar vscommands/cts/in code). Needs an alias table before it can be automated without false positives. - Contracts (
sdk/contracts/*). Mapping is one-to-many per domain dir; needs a convention decision first.
When extending, add new rules to scripts/check-structure.ts only if the
mapping is unambiguous. Fuzzy mappings belong in level 3.
Level 2 — generate-stubs (implemented)
bun .agents/skills/docs-sync/scripts/generate-stubs.ts # dry-run
bun .agents/skills/docs-sync/scripts/generate-stubs.ts --write # apply
# or: bunx nx docs-stubs adt-cli-docs
For each missing in docs item from level 1, creates a stub file populated
from code facts only:
- Package: title/description from
package.json, links to the package source andAGENTS.md/README.mdif present. - MCP tool: title and description from the
server.tool(name, description, …)call itself. Input schema extracted from the third argument — both object literals ({ ...connectionShape, foo: z.string() }) and bare identifiers referencing shared shapes (sessionOrConnectionShape) are supported. Fields keep their.optional()and.describe(…)annotations. - Sidebar: new ids are inserted into
sdkPackages/mcpToolsinwebsite/sidebars.ts, then the array is re-sorted alphabetically (keeping*/overviewfirst).
Stubs carry zero hallucinated facts. When extraction is ambiguous — for example a schema expression that is neither a recognised shared shape nor an object literal — the stub links to the source instead of guessing.
Known limits of the Zod extractor (regex-based, no TS AST):
- Types beyond
string/number/boolean/array/object/enumfall back tounknown. - Complex refinements (
z.string().min(1).regex(…)) are reported as the base type; the extra constraints are not shown. - Conditional schemas (
z.union,z.discriminatedUnion) are not supported yet — add a branch inzodTypeOfif needed.
When the extractor cannot determine the shape, it emits
See [source](…) for the full Zod schema. instead of a fake block. This is
intentional — do not teach the extractor to guess.
Level 3 — refresh-content (planned, not ye
Установить docs-sync в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл docs-sync?
Detect and close drift between code and the Docusaurus site in `website/`. Use when the user asks to sync docs with code, audit docs drift, or after adding/removing packages, CLI commands, or MCP tools. Trigger words - sync docs, docs drift, update docs, website out of date, missing docs page.
Как установить скилл docs-sync?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docs-sync запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic