본문으로 건너뛰기
cccskills
무료GitHub에 공개

diagram-generator

Generate diagrams of any kind from a description, ticket, spec, or file. Outputs Mermaid syntax (renders natively in GitHub, Notion, Confluence, Obsidian, Slack with apps) plus an optional single-file HTML preview that renders the diagram in the browser. Use this skill when the user says: - "draw a flowchart", "create a diagram", "visualize this flow" - "sequence diagram", "state diagram", "ER diagram", "class diagram" - "user journey", "mindmap", "timeline", "gantt", "org chart" - "sankey", "quadrant chart", "git graph" - or pastes a ticket / spec / description and asks for a visual Picks the right Mermaid diagram type for the input, asks if ambiguous, then emits clean syntax + an optional preview file.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md8.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Diagram Generator

Turn any input into a clean diagram. Supports the full Mermaid diagram set so one skill handles flowcharts, sequence diagrams, state machines, ER diagrams, journeys, mindmaps, timelines, gantt charts, sankey, quadrants, class diagrams, and git graphs.

Inputs

  • Ticket / PRD / spec — read it and pick the right diagram type.
  • File path — read the file and diagram from contents.
  • Verbal description — diagram directly from the prompt.
  • Existing diagram — refactor / restyle / fix.

Workflow

Step 1 — Pick the diagram type

If the input is unambiguous, pick directly. Otherwise ask which fits best:

User intentMermaid type
Process flow, decision tree, "if X then Y"flowchart
API calls, message passing, who-talks-to-whom over timesequenceDiagram
Object lifecycle, finite-state machinestateDiagram-v2
Database schema, entities + relationshipserDiagram
End-to-end customer/user experience with sentimentjourney
Hierarchical brainstorm, taxonomy, idea treemindmap
Dated events, milestonestimeline
Project schedule with durations + dependenciesgantt
Flow of quantity between sources/targetssankey-beta
2x2 categorization (importance/urgency, effort/impact)quadrantChart
OOP class hierarchy with methodsclassDiagram
Git branching strategygitGraph

Step 2 — Extract the diagram content

From the input, pull out the right primitives for the chosen type:

  • Flowchart: decision points, actions, states, edge cases, scenarios.
  • Sequence: actors, messages, ordering, async vs sync.
  • State: states, transitions, triggers, terminal states.
  • ER: entities, attributes, relationships, cardinality.
  • Journey: stages, tasks per stage, sentiment scores.
  • Mindmap: root concept + branches.
  • Timeline: sections + events per section.
  • Gantt: sections + tasks with dates/durations + dependencies.
  • Sankey: source → target → value rows.
  • Quadrant: axis labels + items with (x, y) scores.
  • Class: classes + members + inheritance/composition.
  • GitGraph: branches, commits, merges.

If multiple distinct scenarios exist (e.g., happy path + error path), produce SEPARATE diagrams rather than one mega-diagram.

Step 3 — Emit Mermaid syntax

Always wrap output in:

```mermaid
{type-specific code}
```

Follow the type-specific rules below.

Step 4 — Offer a preview file (optional)

After printing the Mermaid block, ask: "Want me to generate a single-file HTML preview that renders this locally?"

If yes, write diagram.html to the current directory using the template under "HTML preview template" below.

Type-specific rules

Flowchart

  • Line breaks in labels: ALWAYS <br>, NEVER \n.
  • Node shapes:
    • ([text]) — start / end (stadium)
    • [text] — action / process
    • {text} — decision
    • [[text]] — subroutine
    • [(text)] — database
    • ((text)) — circle (event)
  • Direction: flowchart TD for processes, flowchart LR for timelines/pipelines.
  • Edge labels: -- text --> for conditional paths.
  • Colors (apply via style lines at the end):
    • fill:#4CAF50,color:#fff — success / start (green)
    • fill:#EF5350,color:#fff — error / blocked (red)
    • fill:#FF9800,color:#fff — warning / modified (orange)
    • fill:#2196F3,color:#fff — informational (blue)
  • Subgraphs: group related items with subgraph Name ... end.
  • No special characters (quotes, colons, pipes) inside node labels.
  • Node text: max 4 lines.

Sequence diagram

  • Use participant X as Display Name to set readable labels.
  • Use ->> for sync, -->> for async, --x for failed.
  • Use Note over X,Y: text for callouts.
  • Use loop, alt / else, par, opt for control flow.
  • Use activate X / deactivate X to show lifelines.

State diagram (v2)

  • Use [*] --> StateName for start, StateName --> [*] for end.
  • Use state ChoiceName <<choice>> for branching.
  • Use composite states for nesting: state Group { ... }.

ER diagram

  • Cardinality glyphs: ||--o{ (one-to-many), }o--o{ (many-to-many), ||--|| (one-to-one).
  • Use lowercase plural entity names.
  • Attribute lines: {type} attributeName "comment".

Journey

  • Three columns per task: Task name: <score 1-5>: Actor1, Actor2.
  • Group tasks under section Name.

Mindmap

  • Indentation defines hierarchy.
  • Node shapes: ((text)), [text], (text), {{text}}.

Timeline

  • section Name then events as : YYYY : event text.

Gantt

  • Always start with dateFormat YYYY-MM-DD.
  • Tasks: Name :status, id, start, duration or Name :status, id, after otherId, duration.
  • Status keywords: done, active, crit.

Sankey-beta

  • One source-target-value row per line: Source,Target,42.
  • No header. Comma-separated. Values numeric.

Quadrant chart

  • Required: title, x-axis Low --> High, y-axis Low --> High, four quadrant labels.
  • Items: Item Name: [x, y] where x and y are 0-1.

Class diagram

  • Class : +method() for public, - private, # protected.
  • Relationships: <|-- inherits, *-- composition, o-- aggregation, --> association.

GitGraph

  • commit, branch name, checkout name, merge name.
  • Order matters; reads top-to-bottom.

Output structure

## {Diagram Title}

**Summary:** {one-line description of what the diagram shows}

```mermaid
{code}

Key callouts:

  • {anything non-obvious about the diagram}

If multiple diagrams (e.g., happy + error paths), use a header per diagram and render each separately.

## HTML preview template

When the user asks for a local preview, write this single file (no build, no npm; mermaid loaded from CDN):

```html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Diagram preview</title>
<style>
  body{margin:0;padding:48px;font:16px/1.5 system-ui,sans-serif;background:#F5F1EA;color:#15140F}
  .wrap{max-width:1100px;margin:0 auto}
  h1{font-weight:500;font-size:28px;margin:0 0 24px}
  .mermaid{background:#fff;border:1px solid #D8D2C5;border-radius:10px;padding:24px;overflow:auto}
</style>
</head>
<body>
  <div class="wrap">
    <h1>{TITLE}</h1>
    <pre class="mermaid">
{MERMAID_CODE}
    </pre>
  </div>
  <script type="module">
    import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
    mermaid.initialize({ startOnLoad: true, theme: 'base', themeVariables: {
      primaryColor: '#F5F1EA', primaryTextColor: '#15140F', primaryBorderColor: '#15140F',
      lineColor: '#15140F', fontFamily: 'system-ui, sans-serif'
    }});
  </script>
</body>
</html>

Replace {TITLE} and {MERMAID_CODE} with the actual content. Preview opens directly in the browser (file:// works; no server needed).

Anti-Patterns

  • Don't pick the wrong diagram type to "force fit" the input — ask if it's ambiguous.
  • Don't cram multiple scenarios into one diagram; split them.
  • Don't use \n for line breaks in flowchart node labels — always <br>.
  • Don't put quotes, colons, or pipes inside node labels (they break Mermaid).
  • Don't skip the style lines on flowcharts — color coding makes diagrams scannable.
  • Don't reach for D3, ReactFlow, or custom HTML; Mermaid is the right tool for almost every case. (If the user wants the magazine-grade animated process flow, point them to the interactive-flowchart-builder skill instead.)
  • Don't auto-generate the HTML preview unless the user asks — most users just want the Mermaid block.

Quality Checklist

  • Picked the right diagram type for the input (flowchart vs sequence vs state vs ...).
  • Mermaid syntax parses cleanly (no unescaped special chars in labels).
  • Distinct scenarios split into separate diagrams.
  • Color/style applied where the diagram type supports it (flowchart, sequence highlights, journey scores).
  • Node text is concise (≤4 lines).
  • Summary line + key callouts included with the diagram.
  • If preview requested, single-file HTML written and opens directly in browser.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Rate any product, feature, or experience on the 11-star scale (Brian Chesky's Airbnb thought experiment). Use when user says "rate this experience", "11-star", "star rating", "experience audit", "how good is this", "experience rating", "product audit", "quality assessment", or wants to evaluate product quality and identify improvement paths. Also trigger when user wants to benchmark a feature, assess where a product stands, or map out what "great" looks like - even if they don't explicitly say "11-star".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Generate A/B copy variants grounded in Eugene Schwartz's awareness and market-sophistication stages and John Caples' tested-headline discipline. Every variant declares its angle, the awareness stage it targets, and a falsifiable hypothesis, and the skill recommends which pair to test first and what delta counts as signal. Use when the user says "A/B test this", "write variants", "give me options", "test different angles", "copy variants", "ab copy", "test this headline", "multiple versions", "which version is better", or wants to test copy before publishing. For reviewing copy that already exists, see copy-review. For sample size and stopping rules, see growth-experiment. For diagnosing a page rather than its words, see page-cro. For full paid ad sets by platform, see ad-campaign-writer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Design statistically rigorous experiments to test data science hypotheses. Use when the user says "design an A/B test", "run an experiment", "test this hypothesis", "is this difference significant", "how many samples do I need", "randomized controlled trial", "causal inference", "uplift test", "holdout group", "significance test", "power calculation", "avoid p-hacking", or needs to determine whether an observed effect is real before making a product or model decision. For lean build-measure-learn product experiments without the statistics, use experiment-design instead.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Write measurable acceptance criteria for requirements or user stories. Use when the user says "write acceptance criteria", "definition of done", "how do we test this", "fit criteria", "given when then", "Gherkin scenarios", "what does done look like", "testable conditions", "how will we know this works" - even if they don't explicitly say "acceptance criteria".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Build a strategic account plan for winning, retaining, or expanding a named account. Use when the user says "build an account plan", "strategic account planning", "how do I grow this account", "account expansion strategy", "whitespace analysis", "QBR prep", "key account review", "map the stakeholders in this account", "land and expand plan", "how do I break into [company]", or wants a structured strategy for a specific account.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

Write paid ad copy for LinkedIn, Google, Meta, and YouTube. Produces multiple variants per platform, each targeting a different Eugene Schwartz awareness level and Cialdini persuasion principle. Use when the user asks for ad copy, ad variants, "write LinkedIn ads", Google ads, Meta ads, paid social copy, ad headlines, or wants creative for a paid campaign. Reads brand voice, ICP, and positioning from knowledge/. For organic social posts, see linkedin-post or social-calendar. For the landing page the ad points at, see landing-page-writer. For testing variants, see ab-copy-writer.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

qa-aman/claude-skills212026년 10월 19일 업데이트

qa-aman의 스킬 모두 보기

이 스킬의 문제 신고