본문으로 건너뛰기
Skillpedia
문서화18k · #10737

mermaid-diagrams

하는 일

이 스킬은 AI 에이전트가 문서 페이지 안에 간단하고 정확한 다이어그램을 그리도록 돕습니다. 기술 문서를 쓰면서 흐름과 구조를 시각적으로 보여 주고 싶은 분들을 위한 스킬입니다.

사용하는 경우

  • ✓페이지가 요청이나 과정을 설명할 때 그림으로 보면 더 이해하기 쉬운 경우.
  • ✓페이지가 여러 상태나 연결된 데이터 표를 가진 생애주기를 설명할 때.
  • ✓다이어그램이 이미 있는 페이지를 업데이트하면서 다이어그램도 맞춰야 할 때.

스킬 링크

https://github.com/langchain-ai/openwiki/blob/main/skills/mermaid-diagrams/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/langchain-ai/openwiki/blob/main/skills/mermaid-diagrams/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“문서 페이지에 요청이 우리 API를 어떻게 지나가는지 보여 주는 다이어그램을 추가해 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 내용에 맞는 다이어그램 유형, 예를 들면 시퀀스 다이어그램이나 상태 다이어그램을 고르고, Mermaid 형식으로 작성합니다. 코드가 뒷받침하는 내용만 그리고, 각 다이어그램 아래에 짧은 설명을 붙입니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Mermaid Diagrams In Generated Wiki Pages

Diagrams are part of high-quality wiki generation, not decoration. Where a flow, lifecycle, or data model is easier to grasp visually, embed a Mermaid diagram in a fenced ```mermaid block on the most relevant page.

Choosing a diagram type

  • sequenceDiagram for runtime and request flows across components (auth flows, request lifecycles, agent tool loops).
  • stateDiagram-v2 for lifecycles and state machines (job states, connection states, run phases).
  • erDiagram for the data model: entities and their relationships.
  • flowchart TD for branching control flow and decision logic.

Discipline

  • Ground every diagram in inspected source. Do not invent participants, states, entities, or relationships the code does not support.
  • Cover the high-value cases: add a diagram wherever a page documents a request or runtime flow, a call sequence, a lifecycle or state machine, or a data model. A repository wiki usually has several such diagrams, not one overall. Skip pages that are navigation, reference tables, or pure configuration.
  • Still prefer a few strong diagrams over decorating every page: one accurate diagram on the page that needs it beats a diagram forced onto every page.
  • Give each diagram a one-line caption directly below it stating what it shows.
  • OpenWiki validates every mermaid fence after your run and converts fences that fail to parse into plain text fences. A degraded diagram is a quality failure; follow the syntax rules below so it does not happen.

Syntax safety

These rules prevent the most common render breakages. When in doubt, rephrase the label.

  • Never place semicolons or pipes inside node, message, or edge labels.
  • Never place unescaped angle brackets in labels; write "returns Promise of User" instead of "returns Promise<User>".
  • In flowchart, wrap any label containing parentheses, brackets, or other punctuation in double quotes: A["calls foo(bar)"].
  • In flowchart, never use the bare word end as a node id, and never start a node id with o or x followed by a dash (both are edge-marker syntax); rename the node.
  • In sequenceDiagram, participant names with spaces or punctuation need an alias: participant AS as Auth Service.
  • Never use a Mermaid reserved word as a participant name, alias, or node id: note, end, loop, alt, opt, par, and, else, activate, deactivate, class, state, click, link. For example a notification participant must be Notifier, not Note (which collides with the note keyword).
  • In erDiagram, entity and attribute names must be single identifier-like tokens; put human phrasing in the relationship label.
  • Keep labels short. Move explanation into the surrounding prose or the caption, not the diagram.

Update runs

  • A wrong diagram is a stale claim, not existing structure to preserve. If a source change makes a diagram inaccurate, update the diagram in the same edit as the surrounding prose.
  • Do not rewrite a diagram that is still accurate. Regenerating unchanged diagrams creates diff noise.
  • If a page contains a text fence preceded by an HTML comment starting with "openwiki: mermaid parse failed", that is a diagram a previous run degraded. Fix the syntax using the parser error in the comment, restore the ```mermaid fence, and delete the comment.
자주 묻는 질문

어떤 종류의 다이어그램을 만들 수 있나요?

시퀀스 다이어그램, 상태 다이어그램, 개체 관계 다이어그램, 순서도를 만들 수 있습니다.

모든 페이지에 다이어그램을 추가하나요?

아니요. 페이지마다 장식하기보다는 몇 개의 핵심 다이어그램을 선호합니다.

다이어그램이 맞는지는 누가 확인하나요?

스킬에 따르면 다이어그램은 점검한 소스 코드와 일치해야 하며, 실행이 끝나면 위키 도구가 다이어그램을 검증합니다.

상세 정보

작성자의 원본 설명

Embed Mermaid diagrams in generated wiki pages. Use whenever documenting a runtime or request flow, a call sequence, a state machine or lifecycle, a data model or entity relationships, or non-trivial control flow, since these are clearer as a diagram than as prose. Also use when an update run touches a page that already contains a mermaid fence, or a page that contains a text fence a previous run degraded.

repo: langchain-ai/openwiki

인기도

GitHub 스타
18k
순위
#10737
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬