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

mermaid

Whenever diagrams or mermaid is mentioned

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.7 KB

SKILL.md(원문)

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

Here are the essential rules for creating Mermaid diagrams that render well in GitHub Markdown:

  1. Use the Correct Fenced Code Block:

    • Always start the block with mermaid and end it with .

    • 
      ```mermaid
      
        graph TD
      
          A[Start] --> B{Decision};
      
          B -- Yes --> C[Action 1];
      
          B -- No --> D[Action 2];
      
      
      
      
      
  2. Stick to Well-Supported Diagram Types:

    • GitHub generally has good support for the most common types:

      • graph (Flowcharts - TD is often best for readability)

      • sequenceDiagram

      • classDiagram

      • stateDiagram-v2 (Prefer v2 for better features/rendering)

      • erDiagram (Entity Relationship)

      • pie (Pie charts)

      • gantt (Gantt charts)

      • mindmap (Mind Maps - Basic structure only. See syntax notes below)

    • Avoid extremely new or less common diagram types, as GitHub's Mermaid version might lag slightly behind the latest release.

  3. Keep Syntax Simple and Standard:

    • Node IDs: Use simple alphanumeric IDs (e.g., node1, processA, userAuth). Avoid spaces or special characters in IDs.

    • Node/Actor/State Labels: Use quotes ("...") for labels, especially if they contain spaces, punctuation, special characters, or Mermaid keywords. This is the most common source of rendering errors.

      • Good: A["User Input"] --> B["Validate Data"];

      • Bad (potential error): A[User Input] --> B[Validate Data];

    • Arrows: Use standard arrow types (-->, ---, ==>, ->>, etc.).

    • Comments: Use %% for comments if needed.

  4. Mindmap Specifics for GitHub:

    • GitHub supports the basic mindmap structure, using indentation to define hierarchy (parent/child relationships).

    • Ensure each node/item is on its own line with correct indentation relative to its parent.

    • GitHub DOES NOT support experimental or advanced mindmap features like ::icon() syntax. Using icons will cause rendering errors.

    • Stick to plain text nodes for mind maps intended for GitHub Markdown.

    • Correct Example (GitHub compatible):

      
      mindmap
      
        Root
      
          Parent
      
            Child 1
      
            Child 2
      
      
    • Incorrect Example (GitHub incompatible due to icons):

      
      mindmap
      
        Root
      
          Parent
      
            ::icon(fa fa-one) Child 1
      
            ::icon(fa fa-two) Child 2
      
      
  5. Prefer Vertical Layouts (graph TD):

    • For flowcharts (graph), TD (Top Down) or TB (Top Bottom) usually renders more readably within the flow of a Markdown document than LR (Left Right). GitHub often gives diagrams ample width, but vertical flows are easier to follow on typical screens.
  6. Let GitHub Handle the Styling:

    • DO NOT try to set themes (e.g., %%{init: {'theme': 'dark'}}%%) or apply custom styling using classDef or style within the Mermaid code.

    • GitHub ignores these theme directives and applies its own styling based on whether the user is viewing GitHub in light, dark, or dimmed mode. Your diagram will automatically adapt. Trying to force colors or themes will likely just be ignored or look out of place.

  7. Keep Diagrams Focused:

    • Avoid overly complex diagrams with excessive nodes, edges, or nesting in a single block. While GitHub can render complex ones, they might become hard to read or hit rendering limits. Break down very complex ideas into multiple simpler diagrams if possible.
  8. Test in GitHub Preview:

    • Always use GitHub's preview tab when editing your Markdown file to see exactly how the diagram will render. This is the best way to catch syntax errors or unexpected layout issues.
  9. Tooling & Edit Verification Note:

    • Automated code editing tools may sometimes struggle to apply changes correctly within Mermaid blocks, especially with complex syntax involving indentation or specific formatting (like the mindmap example above).

    • Always carefully review edits made to Mermaid blocks by automated tools. If errors persist or the diagram doesn't render as expected, manual correction might be necessary.

In short: Write standard, clearly quoted Mermaid syntax using common diagram types. For mindmaps in GitHub, use only the basic indentation structure (no icons). Prefer graph TD. Avoid trying to control the theme/colors yourself. Use the GitHub preview, and double-check automated edits to Mermaid blocks.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

在进行 Code Review 时,使用这个技能对 LoongCollector 变更进行安全导向、架构一致性优先的深度代码评审。

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

alibaba/loongcollector2.2천2026년 10월 21일 업데이트

commit

무료

按 Conventional Commits 规范编写提交信息。在创建 git commit 时使用。

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

alibaba/loongcollector2.2천2026년 10월 21일 업데이트

compile

무료

编译 LoongCollector C++ 与 Go 组件。涉及构建、单元测试或镜像时使用。

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

alibaba/loongcollector2.2천2026년 10월 21일 업데이트

Design document writing conventions. Use when writing or reviewing technical design documents.

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

alibaba/loongcollector2.2천2026년 10월 21일 업데이트

e2e

무료

LoongCollector E2E 测试全流程指南:设计、编写、运行和调试。当需要编写新 E2E 测试、运行现有测试、或排查 E2E 测试失败时使用此 skill。

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

alibaba/loongcollector2.2천2026년 10월 21일 업데이트

LoongCollector E2E Testing Framework Development Guide. Use this rule when you need to understand E2E testing framework architecture, develop new test behavior functions, or extend testing capabilities. Contains detailed BDD testing framework usage, test behavior function development and registration workflows, and comprehensive reference of existing testing capabilities. Example: When adding custom test behaviors for new plugins, use this rule to understand how to write and register new test functions. Example: When developing E2E tests, use this rule to understand the e2e framework.

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

alibaba/loongcollector2.2천2026년 10월 21일 업데이트

alibaba의 스킬 모두 보기

이 스킬의 문제 신고