c4-to-eventcatalog — скилл для Claude Code: C4-модель в EventCatalog
Превращает C4-модель в план документации EventCatalog, а после вашего одобрения — в готовые файлы каталога.
npx skills add event-catalog/skills --skill c4-to-eventcatalog -a claude-codeЧто делает c4-to-eventcatalog
Скилл берёт Structurizr DSL или JSON, C4-PlantUML, Mermaid C4, Markdown-описания архитектуры и диаграммы. Сначала он разбирает модель: люди, внешние системы, контейнеры, связи, протоколы, топики и очереди. Компоненты попадают в разбор только тогда, когда пересекают границу владения, деплоя, данных или сообщений.
Дальше каждый элемент раскладывается по типам EventCatalog: domain, service, agent, event, command, query, channel, container, flow. Для существующего каталога скилл сначала смотрит, что уже есть, и помечает найденное как new, update, unchanged или investigate. Результат — файл .c4-eventcatalog-plan.md с решениями, связями и списком файлов к созданию. Генерация начинается только после того, как вы план одобрите.
Учтите: если на входе только картинка, извлечение менее надёжно, чем из текстового источника. Ещё скилл задаёт вопросы по одному и только про структуру — границы доменов, деплой, классификацию агентов. Существующие ресурсы каталога, которых нет в C4-модели, он не удаляет, а помечает для проверки.
Какие задачи решает
- разложить C4-модель по ресурсам EventCatalog
- сверить новую архитектуру с уже существующим каталогом
- отделить сервисы и агентов от компонентов внутри них
- получить план миграции до правки файлов каталога
- найти расхождения между диаграммой и текущей документацией
Примеры запросов агенту
- Вот Structurizr DSL нашей системы, разложи её по EventCatalog
- Создай план
.c4-eventcatalog-plan.mdиз этой Mermaid C4-диаграммы - Сверь эту C4-модель с каталогом в
./eventcatalogи покажи, что изменится
Как установить c4-to-eventcatalog
1Через Skills CLI (Vercel)
npx skills add event-catalog/skills --skill c4-to-eventcatalog -a claude-code2Вручную: положить файлы
~/.claude/skills/c4-to-eventcatalog/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/c4-to-eventcatalog/
1Через Skills CLI (Vercel)
npx skills add event-catalog/skills --skill c4-to-eventcatalog -a codex2Вручную: положить файлы
.agents/skills/c4-to-eventcatalog/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add event-catalog/skills --skill c4-to-eventcatalog -a cursor2Вручную: положить файлы
.cursor/skills/c4-to-eventcatalog/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install event-catalog/skills c4-to-eventcatalog2Вручную: положить файлы
.github/skills/c4-to-eventcatalog/SKILL.md1Через Skills CLI (Vercel)
npx skills add event-catalog/skills --skill c4-to-eventcatalog -a gemini-cli2Командой платформы
gemini skills install https://github.com/event-catalog/skills --path skills/c4-to-eventcatalogВручную: положить файлы
.devin/skills/c4-to-eventcatalog/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add event-catalog/skills --skill c4-to-eventcatalog -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о c4-to-eventcatalog
Как установить c4-to-eventcatalog в Claude?
Выполните npx skills add event-catalog/skills --skill c4-to-eventcatalog -a claude-code. После этого файл скилла лежит в ~/.claude/skills/c4-to-eventcatalog/SKILL.md.
Что делает c4-to-eventcatalog?
Читает C4-модель и составляет план её переноса в EventCatalog, а после вашего одобрения через catalog-documentation-creator создаёт или обновляет файлы каталога.
Нужен ли уже существующий проект EventCatalog?
Нет. Если каталога нет, развёртывание структуры происходит на этапе передачи в catalog-documentation-creator. Если каталог есть, укажите путь, и скилл сверит с ним модель.
Исходный текст
SKILL.md · MIT
--- name: c4-to-eventcatalog description: Converts C4 architecture models into EventCatalog documentation plans and hands off to catalog-documentation-creator for file generation. Use when user provides a C4 model, Structurizr DSL, C4-PlantUML, Mermaid C4, diagrams, or architecture descriptions and asks to create, update, reconcile, or map them into an EventCatalog project. license: MIT metadata: author: eventcatalog version: "1.0.0" --- # C4 to EventCatalog ## Overview Map a C4 model into EventCatalog resources without flattening architecture intent. Produce a reviewable `.c4-eventcatalog-plan.md` first, then use `catalog-documentation-creator` to generate or update the actual catalog files after the user approves the mapping. ## Load References Always read `references/c4-mapping.md` before mapping a C4 model. When generating files, read the relevant `../catalog-documentation-creator/references/` files: - `domains.md`, `services.md`, `agents.md` - `events.md`, `commands.md`, `queries.md` - `channels.md`, `containers.md`, `flows.md` - `components.md` for NodeGraph, Mermaid, wiki links, schemas, and MDX components ## Workflow Follow these phases in order. ### 1. Locate inputs Ask for the C4 source if it is not provided. Accept Structurizr DSL/JSON, C4-PlantUML, Mermaid C4, Markdown architecture docs, or image diagrams. Warn that source text is more reliable than image-only extraction. Ask whether the user has an EventCatalog project. If yes, ask for the path and verify `eventcatalog.config.js` or known resource directories. If no, note that scaffolding happens during handoff through `catalog-documentation-creator`. ### 2. Inventory the existing catalog If a catalog exists, inspect it before proposing changes: - Detect flat vs domain-nested structure. - Record existing resource IDs, names, versions, owners, and relationships. - Note naming style, schema formats, owner conventions, badges, and use of domains. - Treat existing catalog resources not present in the C4 model as `investigate`, not deletion candidates. ### 3. Parse the C4 model Extract: - People and external systems - Software systems - Containers, including apps, services, agents, databases, queues, and browsers/mobile clients - Components only when they cross an ownership, deployment, data, or message boundary - Relationships, protocols, technologies, tags, descriptions, and views - Dynamic views or narrative scenarios that should become flows - Message names, topics, queues, APIs, commands, queries, events, and schema references Preserve evidence. For source files, cite file paths and line numbers where possible. For diagrams, cite the diagram/view name and element IDs. ### 4. Map and reconcile Use `references/c4-mapping.md` to map each C4 element into one of `domain`, `service`, `agent`, `event`, `command`, `query`, `channel`, `container`, `flow`, `external system only`, `document inside resource body`, or `needs user decision`. For existing catalogs, assign each mapped item a status: `new`, `update`, `unchanged`, or `investigate`. ### 5. Ask only structural questions Ask one question at a time. Each question must include: - The recommended answer - The evidence that led to it - The consequence for generated EventCatalog resources Only ask about decisions that affect structure: domain boundaries, deployable service boundaries, agent classification, whether a relationship is an event/command/query/API call, whether an infrastructure node is a channel or data container, and whether to update an existing resource. Do not grill the user on prose, summaries, or cosmetic metadata. ### 6. Write the plan Write `.c4-eventcatalog-plan.md` in the catalog directory when one exists, otherwise next to the supplied C4 source or in the current working directory. Include the template from `references/c4-mapping.md`: source, decisions, resource mapping, relationships, files to create/update, and open questions. Ask the user to approve the plan before generating catalog files. ### 7. Generate catalog files After approval, use `catalog-documentation-creator` to create or update files. Load only the relevant EventCatalog reference files for the resources in the approved plan. Follow the target catalog's existing structure and never overwrite an existing resource without preserving or reconciling user content. ## Quality Rules - Do not create one EventCatalog resource per C4 box by default. Map based on responsibility, deployment, ownership, message flow, and EventCatalog usefulness. - Do not create empty domains. A domain must contain at least one service or agent. - Do not model every C4 component as an EventCatalog resource. Most components belong in the parent service body, a Mermaid diagram, or a flow. - Prefer explicit C4 relationship labels over inferred message types. If the relationship label is ambiguous, mark it as `needs user decision`. - Keep IDs consistent with the catalog. If creating a new catalog, prefer PascalCase resource IDs for business resources unless the user specifies otherwise. - Preserve existing catalog content. Add, update, or flag drift; do not delete. - Include `<NodeGraph />` in generated resources through the handoff skill wherever the relevant EventCatalog reference recommends it.
© eventcatalog · MIT · event-catalog/skills