sdk-reference-docs
БесплатноБез исполняемых скриптовНе проверенHow the SDK reference docs pipeline works — regenerating references for the Python/TypeScript/Go/Ruby SDKs, adding a new SDK language, and known gotchas. Use…
от hatchet-dev★ 8 377 звёзд на GitHubОб этом скилле
📝 SELF-UPDATING DOCUMENT: Verify against the actual codebase and update this file when it drifts.
Overview
The SDK reference sections under frontend/docs/content/docs/reference/{python,typescript,go,ruby} are generated from SDK source — doc comments and docstrings are the source of truth. Never hand-edit generated .mdx; the next regeneration overwrites it. To change reference content, edit the doc comment/docstring in the SDK and regenerate.
Commands
task generate-sdk-docs # all four languages (also part of `task generate`)
task generate-sdk-docs-python # sdks/python/docs/generate.sh
task generate-sdk-docs-typescript # sdks/typescript/docs/generate.sh
task generate-sdk-docs-go # (cd sdks/go && go run ./docs/generator)
task generate-sdk-docs-ruby # sdks/ruby/docs/generate.sh
All four pipelines are fully deterministic; no AI/LLM is involved anywhere and no API keys are needed.
CI: .github/workflows/gen-sdk-docs.yml runs on pushes to main touching sdks/** or pkg/worker/** (the Go generator also reads pkg/worker for the Context interfaces). It detects which SDKs changed, regenerates only those, opens a PR labeled autogenerated-sdk-docs, and requests auto-squash-merge. workflow_dispatch only runs from main. Optional SDK_DOCS_PR_TOKEN secret (PAT/App token) makes generated PRs trigger normal CI.
Per-language pipelines
| Language | Pipeline | Notes |
|---|---|---|
| Python | mkdocs (mkdocstrings, markdown-export plugin) → deterministic converter → mdx |
Feature-client md stubs are auto-created from Hatchet client introspection. Doc prose lives in docstrings; the converter is verbatim-faithful. |
| TypeScript | typedoc (custom theme docs/markdown-theme.mjs) → docs/generate.ts |
entryPoints derived by globbing src/v1/client/features/*.ts — new feature clients need zero config. |
| Go | sdks/go/docs/generator (stdlib go/doc) |
Feature clients auto-discovered from Client methods returning *features.X. Also parses pkg/worker. |
| Ruby | sdks/ruby/docs/generate.rb (YARD registry + RBS sigs) |
Static parse — no SDK gem install needed. New public methods on core classes auto-append. |
Ownership rules
- Generators own: every
.mdxin their section +feature-clients/meta.json. - Section
meta.json(e.g.python/meta.json) is merged, not overwritten: existing order and separator strings (e.g.---Python Specifics---) are preserved; new pages auto-append; dead entries are removed. - Hand-authored pages exist only in Python (asyncio, pydantic, lifespans, dependency-injection, dataclasses) — generators never touch them.
reference/meta.json(top-level) is hand-maintained. Nothing generates it. So isreference/index.mdx.- Generators hard-fail if an emitted page is unreachable from a meta.json.
- Each generator also emits
<lang>/index.mdx(the section overview) from the shared hand-maintained mappingfrontend/docs/reference-map.json, which pairs each canonical feature-client concept with per-language page slugs and its user-guide page. Generators hard-fail on an emitted feature-client page with no mapping entry, a mapping slug matching no emitted page, or a guide path that does not exist. Adding a feature client to any SDK therefore requires adding (or extending) itsreference-map.jsonentry.
Gotchas (learned the hard way)
- fumadocs dropdown: a
root: truefolder only appears in the section dropdown if it has an index page or a direct page child. The Reference folder now has a hand-maintainedindex.mdx, andapp/(docs)/layout.tsxstill adds a fallback tab bound with$folder(for active-state detection), deduped by URL, pointing at/reference. The per-language sections also have generated index pages, so/reference/<lang>serves an overview rather than redirecting to the client page. - Never put
{/* */}JSX comments in this repo's MDX — the prettier pass rewrites*to_inside them, producing invalid MDX that 500s the whole docs site. - Determinism is a requirement: every generator must produce byte-identical output across runs (sorted iteration everywhere), or CI churns endless PRs. Verify with a double run + checksum diff. Output must not depend on optional tooling: the Go generator hard-fails if frontend/docs prettier is missing (a silent skip once shipped unformatted pages via CI while local runs looked clean).
- golangci-lint: repo uses v2 config;
os.WriteFilein generators must use0o600. - Don't edit
frontend/docs/pages/**— that's the dead pre-fumadocs tree. - No em dashes in docs content (
.cursor/rules/docs-writing-style.mdc): use commas, parentheses, or separate sentences. Generated pages inherit them from SDK doc comments, so fix them at the source.
Adding a new SDK language
- Build a generator under
sdks/<lang>/docs/with agenerate.shentry point (orgo run ./docs/generators
Установить sdk-reference-docs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл sdk-reference-docs?
How the SDK reference docs pipeline works — regenerating references for the Python/TypeScript/Go/Ruby SDKs, adding a new SDK language, and known gotchas. Use when working on docs generation, sdks/*/docs generators, or content/docs/reference.
Как установить скилл sdk-reference-docs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sdk-reference-docs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic