code-to-catalog
БесплатноБез исполняемых скриптовНе проверенTurns a codebase into EventCatalog documentation through an evidence-based interview. Scans the code first, proposes an architectural model (domains, systems…
от event-catalog★ 16 звёзд на GitHubОб этом скилле
Code to Catalog
Turn a codebase into EventCatalog documentation through a guided, evidence-based interview. Works for two situations:
- No catalog yet — document an unfamiliar or undocumented codebase from scratch.
- Existing catalog — reconcile the catalog with the current code (add new resources, flag drift, surface stale entries).
This skill does not write catalog files itself. It produces a plan file (.catalog-plan.md) that captures the agreed architectural model, then hands off to the catalog-documentation-creator skill to generate the actual documentation.
How this skill works
The skill runs in six phases. Follow them in order — later phases depend on earlier ones.
- Locate & inventory — find the code directory and any existing catalog
- Discovery scan — read the code, form a hypothesis
- Reconcile with existing catalog — categorize findings as
new/update/unchanged/investigate - Tiered grilling — interview the user on structural decisions only
- Produce the plan file — write
.catalog-plan.md, get approval - Handoff — ask whether to generate the catalog now or stop at the plan
Conversational style (applies throughout)
- One question at a time. Never batch questions. The user answers, then move on.
- Always provide a recommended answer. Every question includes what you think is true, with evidence (file path + line number). The user confirms, corrects, or overrides.
- Cite the code. When you present a finding, point at the file where you saw it — e.g.,
src/orders/events.ts:42. The user should be able to verify without trusting you. - Be honest about uncertainty. If the code does not tell you whether something is an event or a command, say so. Do not guess silently.
- Surface conflicts, do not pick silently. When catalog and code disagree, the user decides. Never overwrite without confirmation.
- Respect the user's time. Grilling is tiered on purpose — structural decisions only. Do not grill on per-resource fields (summaries, owners, schemas).
- No catalog deletions. Resources in the catalog that you cannot find in code are flagged
investigate— never removed automatically.
Phase 1: Locate & inventory
Find the codebase
Ask the user: "Which code directory should I analyze?"
Verify the directory exists and looks like a code project (has a package.json, pom.xml, go.mod, Cargo.toml, pyproject.toml, source directories, etc.). If the directory is ambiguous (e.g., a monorepo), confirm the scope: the whole repo, or a specific subdirectory.
Find the catalog
Ask the user: "Do you already have an EventCatalog project, or do you want to start fresh?"
If they already have one:
- Ask for the path. Verify it's an EventCatalog project by checking for
eventcatalog.config.jsor the standard directories (services/,agents/,events/,commands/,queries/,domains/,systems/,channels/,containers/,flows/). - Build an inventory of what already exists. If the EventCatalog MCP server is connected, use
getResources,getResource,findResourcesByOwner. Otherwise read the filesystem directly and parse the frontmatter of eachindex.md/index.mdx. - Record for each resource:
id,name,version,type,summary, and (for services and agents)sends/receivesrelationships. - Note the catalog's conventions: nested (
domains/X/systems/S/services/Y/events/Z) vs flat, PascalCase vs kebab-case IDs, existing owners, schema formats in use.
If they do not have a catalog:
- That's fine. Note that scaffolding will happen at handoff time through
catalog-documentation-creator(which runsnpx @eventcatalog/create-eventcatalog@latest <name> --empty). - Phase 3 (reconciliation) becomes a no-op — everything discovered will be
new.
Phase 2: Discovery scan
Read the codebase and form a hypothesis. Do not show the user your findings yet — you'll present them as questions in Phase 4, backed by evidence.
For detailed detection heuristics per language/framework (Node.js, Python, Go, Java, .NET), see references/discovery.md. Read that file now if the codebase uses a stack you need guidance on.
Detect:
Project structure
- Monorepo vs single service (look for workspace configs:
pnpm-workspace.yaml,package.jsonwithworkspaces,nx.json,turbo.json,lerna.json, multiple top-level service directories with their own manifests). - Language and framework per service or agent.
- Build/deploy units (Dockerfiles, Helm charts,
serverless.yml,cdkstacks, k8s manifests).
Service boundaries
A service is an independently-deployable, independently-ownable unit. Signals:
- Separate package with its own manifest
- Separate Dockerfile / deployment config
- Its own entrypoint (
main.ts,main.go,app.py, etc.) - Consumed by others over a network boundary (HTTP, message bus)
When in doubt, mark as a candidate and grill the
Установить code-to-catalog в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл code-to-catalog?
Turns a codebase into EventCatalog documentation through an evidence-based interview. Scans the code first, proposes an architectural model (domains, systems, services, agents, messages, channels, data stores), grills the user on the structural decisions, produces a reviewable plan file, then hands off to catalog-documentation-creator. Use when user says "document my codebase in EventCatalog", "turn this repo into a catalog", "model my code as a catalog", "document my agents", "document my AI agents", "grill me on my architecture", "update my catalog from the code", "reconcile my catalog with my code", or "I don't know where to start documenting this codebase". Works for brand-new catalogs AND for updating existing catalogs that have drifted from the code.
Как установить скилл code-to-catalog?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-to-catalog запускает скрипты?
Нет, скилл состоит только из инструкций (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