Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mermaid-generator

БесплатноБез исполняемых скриптовНе проверен

WHEN creating Mermaid diagrams from code or architecture; NOT for diagrams without a code or system-design source; analyzes the relevant structure and returns…

mintuzот mintuz★ 38 звёзд на GitHub

Об этом скилле

Mermaid Diagram Generator

Create Mermaid diagrams that explain architecture, component relationships, data flow, dependencies, or state transitions found in a codebase.

Workflow

1. Bound the request

Identify the target files or directories, the audience, and the desired diagram type. Use the requested type when supplied. Otherwise infer it from the intent:

Intent Diagram
Architecture, modules, or process flow flowchart
Request/response or asynchronous interaction sequenceDiagram
Classes, interfaces, or type hierarchy classDiagram
Entities and database relationships erDiagram
Lifecycle or workflow states stateDiagram-v2
Imports or dependency relationships flowchart or graph

If the target or intent is materially ambiguous, ask one concise clarifying question before analysing code (principle-never-block-on-the-human). If the request has no code or system-design source, say so and name the source that would make the diagram evidence-based. Never present a diagram you draw as source-derived (principle-observe-dont-infer). Completion criterion: the scope and diagram purpose are explicit or confirmed.

2. Discover the source

List the relevant source files with the repository’s file-search tools. Prioritise application code, public interfaces, data models, entry points, services, integrations, and event handlers. Exclude dependencies, generated output, build artifacts, and unrelated files unless the request includes them.

For a large scope, select the smallest set that explains the requested relationship and state what was omitted (principle-state-the-scope). If no relevant files exist, report the searched paths and stop. Completion criterion: every file used as evidence is identified by path, and the selected set is sufficient for the requested view.

3. Extract observed structure

Read the selected files and record only source-supported relationships:

  • imports, exports, and module boundaries;
  • classes, functions, interfaces, and data models;
  • callers, callees, ownership, and composition;
  • request, response, event, and asynchronous paths;
  • persistence, queues, external services, and other integrations;
  • state values and transitions;
  • error or retry paths when they materially affect the flow.

Separate observed relationships from inferred ones (principle-label-the-evidence). Never present a convention, naming guess, or likely runtime behaviour as fact without source evidence. A shared or similar name is not evidence that an argument, instance, or field is the class of that name (principle-observe-dont-infer). An argument position is evidence of the parameter it fills when the source shows that parameter list. Record as an inference any link resting on a name match, or on argument order without that parameter list. Completion criterion: each important node and edge in the planned diagram has a source basis or is explicitly marked as an inference.

Let the request set the level of detail. For a complete or end-to-end view, record every source-observed step in execution order, including branches, compensation, and returns; judge materiality later. For an overview, record only the steps that carry the relationship being explained.

4. Construct the diagram

Choose the least detailed diagram that answers the request (principle-earn-every-element). For a complete interaction, draw every material step as its own element instead of collapsing it into a note. A step is material when removing it changes how a reader interprets the flow (principle-preserve-meaning). Group or omit the rest. Prefer clarity over completeness:

  • group related elements with meaningful subgraphs or boundaries;
  • use names from the code, with short labels where readability requires it;
  • choose TB or LR based on the dominant direction of the relationship;
  • label important edges with calls, events, data, or state transitions;
  • include an error path when omitting it would misrepresent the system;
  • keep a source-observed branch, ordering, concurrency, or compensation step when removing it would misrepresent the flow, even if the request asks you to remove it, and say in the notes why you kept it (principle-preserve-meaning);
  • draw concurrent work with the parallel construct of the diagram type, such as par/and in a sequence diagram;
  • draw a branch that changes the outcome with the alternative construct of the diagram type, such as alt/else; if a branch propagates an error, show where that error leaves the frame;
  • when the other branch ends the interaction, put the steps that follow a branch inside the branch that continues;
  • place each element inside the boundary the source shows owns it. Mark a dependency whose implementation the source does not show as out of frame instead of moving its declaration;
  • label every node, edge, or binding that rests on inference, including step 3's name-match and argument-order l
Полный SKILL.md на GitHub

Установить mermaid-generator в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл mermaid-generator?

WHEN creating Mermaid diagrams from code or architecture; NOT for diagrams without a code or system-design source; analyzes the relevant structure and returns a scoped, renderable diagram with evidence and assumptions.

Как установить скилл mermaid-generator?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mermaid-generator запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить mermaid-generator с