diagram
복잡도에 따라 ASCII art 또는 Mermaid 다이어그램을 선택하여 생성. Use when visualizing architecture, drawing diagrams, explaining structure visually, or 도식화/다이어그램 요청 시. 중간 복잡도는 ASCII art 우선.
Best use case
diagram is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
복잡도에 따라 ASCII art 또는 Mermaid 다이어그램을 선택하여 생성. Use when visualizing architecture, drawing diagrams, explaining structure visually, or 도식화/다이어그램 요청 시. 중간 복잡도는 ASCII art 우선.
Teams using diagram should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/diagram/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How diagram Compares
| Feature / Agent | diagram | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
복잡도에 따라 ASCII art 또는 Mermaid 다이어그램을 선택하여 생성. Use when visualizing architecture, drawing diagrams, explaining structure visually, or 도식화/다이어그램 요청 시. 중간 복잡도는 ASCII art 우선.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Diagram
다이어그램 생성 시 복잡도를 판단하여 적절한 형식을 선택합니다.
**핵심 원칙**: 중간 복잡도 이하는 ASCII art 우선. Mermaid는 고복잡도 전용.
## 형식 선택 기준
**기본값은 ASCII**. Mermaid는 ASCII로 표현이 어려울 때만 사용.
```
ASCII (기본) Mermaid (전환)
선형, 트리, 단순 분기 교차선 3개 이상
80자 이내로 표현 가능 80자 초과 불가피
노드 간 연결이 이웃끼리 순환 참조 + 복잡한 교차
ER, Gantt, 클래스 다이어그램
```
### Mermaid 전환 신호
다음 중 **2개 이상** 해당하면 Mermaid로 전환:
1. **교차선 불가피**: 선이 3회 이상 겹쳐야 표현 가능
2. **80자 초과**: 가로 배치로도 80자를 넘김
3. **자동 레이아웃 필요**: 수동 정렬이 비현실적
4. **Mermaid 전용 유형**: ER, Gantt, 클래스 다이어그램, 파이 차트
### ASCII가 잘 맞는 구조
| 구조 | 노드 수 제한 | 이유 |
|------|:----------:|------|
| 선형 파이프라인 | 제한 없음 | 가로/세로 일직선 |
| 트리/계층 | 제한 없음 | 들여쓰기로 자연 표현 |
| 시퀀스 (액터 3-4) | 스텝 제한 없음 | 세로로 확장 |
| 분기 흐름 | ~15 노드 | 2-3 레벨 분기까지 깔끔 |
| 격자/매트릭스 | 80자 이내 | 행 추가는 자유 |
## Instructions
### 워크플로우: 다이어그램 요청 처리
1. **복잡도 판단**: 노드 수, 관계 유형, 출력 환경 확인
2. **형식 선택**: 위 기준 적용
3. **스타일 선택**: 아래 5가지 중 적합한 것
4. **생성**: 가이드라인 준수하여 작성
### 스타일 1: Box-and-Arrow (아키텍처, 흐름)
가장 범용. 컴포넌트 간 관계 표현에 적합.
```
+----------+ +----------+
| Client |---->| Server |
+----------+ +----------+
|
+----v-----+
| Database |
+----------+
```
레이블 포함:
```
+--------+ HTTP +--------+ SQL +------+
| Client |-------->| API |------->| DB |
+--------+ +--------+ +------+
|
Redis |
v
+-------+
| Cache |
+-------+
```
### 스타일 2: Tree (계층, 디렉토리)
`tree` 명령어 출력과 동일한 형태. 계층 표현에 최적.
```
src/
├── components/
│ ├── Header.tsx
│ └── Footer.tsx
├── hooks/
│ └── useAuth.ts
└── index.ts
```
### 스타일 3: Sequence (시간순 상호작용)
메시지 흐름, API 호출 순서 표현.
```
Client Server DB
| | |
|-- request --->| |
| |-- query ---->|
| |<-- result ---|
|<-- response --| |
| | |
```
### 스타일 4: Flowchart (분기, 의사결정)
조건 분기와 상태 전이 표현.
```
+-------+
| Start |
+---+---+
|
+---v---+
| Check |
+---+---+
/ \
yes / \ no
/ \
+----v-+ +-v------+
| Pass | | Retry |
+------+ +---+----+
|
+---v---+
| Fail |
+-------+
```
### 스타일 5: Table/Matrix (비교, 매핑)
2차원 비교에 적합. 마크다운 테이블과 병행 가능.
```
Read Write Admin
User x - -
Editor x x -
Admin x x x
```
## 작성 가이드라인
### 문자 세트
| 환경 | 문자 세트 | 예시 |
|------|----------|------|
| 코드 주석, 터미널 | 순수 ASCII | `+ - | > / \` |
| 마크다운 문서 | 유니코드 허용 | `─ │ ┌ ┐ └ ┘ ├ ┤ ▼ ▶` |
**한 다이어그램에서 두 세트를 혼용하지 않는다.**
### 핵심 규칙
1. **80자 이내**: 초과 시 Mermaid 전환 검토
2. **코드 펜스 필수**: ` ``` ` 또는 ` ```text `로 감싸기
3. **화살표에 라벨**: `-- label -->` 형태로 의미 전달
4. **박스 내부 패딩**: 텍스트 좌우 최소 1칸 여백
5. **정렬 일관성**: 같은 레벨 노드는 같은 높이/열에 배치
6. **순수 ASCII 우선**: LLM이 `+-|>` 를 유니코드보다 안정적으로 생성
### 피해야 할 패턴
- 교차선 3개 이상을 ASCII로 강제 (스파게티)
- 화살표 라벨 없는 복잡한 연결
- 비정렬 박스 (들쑥날쑥)
- 유니코드와 ASCII 혼용
## Examples
### 요청 → ASCII (선형 파이프라인, 15 노드)
```
User: "CI/CD 파이프라인 그려줘"
→ 선형 흐름, 교차선 없음
→ ASCII (스타일 1: Box-and-Arrow)
commit -> lint -> test -> build -> staging -> deploy
```
### 요청 → ASCII (트리, 20+ 노드)
```
User: "프로젝트 구조 보여줘"
→ 계층 구조, 교차선 없음
→ ASCII (스타일 2: Tree)
```
### 요청 → Mermaid (순환 참조 + 교차)
```
User: "마이크로서비스 의존관계 그려줘"
→ 서비스 간 양방향 호출, 교차선 5개 이상
→ Mermaid (자동 레이아웃 필요)
```
### 요청 → 혼합
```
User: "시스템 개요 + 상세 흐름 그려줘"
→ 전체 의존관계: Mermaid (교차 다수)
→ 개별 요청 흐름: ASCII (선형)
```
## Mermaid 치트시트
Mermaid 전환 시 `resources/mermaid-cheatsheet.md` 참조. Flowchart, Sequence, C4, ER, State, Gantt 문법 포함.
## 참고
- [ASCIIFlow](https://asciiflow.com/) - 웹 기반 ASCII 다이어그램 에디터
- [Monodraw](https://monodraw.helftone.com/) - macOS ASCII 다이어그램 도구
- [mermaid-ascii](https://github.com/AlexanderGrooff/mermaid-ascii) - Mermaid → ASCII 변환
- [Mermaid Live Editor](https://mermaid.live/) - Mermaid 온라인 에디터Related Skills
tree-sitter
AST parsing, S-expression queries, tag extraction via tree-sitter CLI. Use when parsing code into AST, extracting tags, visualizing syntax trees, or performing structural analysis beyond ast-grep.
tidy
Performs small structural code cleanups (tidyings). Use when preparing code changes, removing dead code, reducing nesting, or cleaning up before feature work.
task-naming
CLI command naming convention for Justfile and Makefile. Enforces GAT (group-action-target) word order, grouped listing, mandatory descriptions. Use when creating Justfile recipes, Makefile targets, or reviewing task runner configs for naming consistency. Also use when asking "what should I name this command?" for task runners. Do NOT use for npm scripts, mise tasks, or Claude Code skill naming.
strategic-thinking
체계적 의사결정 프레임워크. First Principles, Trade-off 분석, Cognitive Bias 점검
security
Security expert hub. Code security review (OWASP Top 10, injection, XSS, credentials), vulnerability assessment (KISA 292 items, Unix/Windows server, web pentest, network, DBMS, cloud), ISMS-P certification (101 items, checklist, implementation plan), EFSR financial regulation compliance (전자금융감독규정, 12 articles). 보안 리뷰, 취약점 점검, 인증 준비, 금융규정 준수.
reflect
방향 수정 신호 감지 및 세션 전체 회고. Use when detecting course correction signals ("아니/잠깐/근데"), session retrospective, or reviewing overall progress. /reflect 또는 "회고해줘"로 수동 호출.
refactoring
기존 코드의 안전한 리팩토링. Characterization Test로 동작 보존하며 구조 개선
recall
Load context from Obsidian vault (journals, session pages) and JSONL session history. Vault 위치/구조는 `documentation` skill 참조. Temporal queries scan JSONL by date, topic queries use ir BM25. Use when "recall", "어제 뭐 했지", "what did we work on", "이전 작업", "session history".
qmd
Searches local markdown notes and documents using ir CLI. Use when searching notes, querying documents, managing collections, or retrieving document content.
qa
기능별 QA 체크리스트 생성, 수동 테스트 실행, 결과 기록. Use when QA 테스트, 체크리스트 만들기, 수동 검증, 기능 확인, qa 진행, checklist. Do NOT use for automated test code (use plan-review tdd / code-review instead) or BDD spec (use plan-review bdd instead).
principles
소프트웨어 공학 원칙 바스켓. 원칙 카탈로그 열람, 코드/설계/프로세스/테스트의 원칙 준수도 평가, 위반 식별 및 개선 가이드. Use when 원칙 평가, 원칙 점검, 원칙 검증, principles check, 코드 품질 근본 진단, 설계 원칙 리뷰, 아키텍처 원칙 점검, 프로세스 원칙 점검, 테스트 원칙 점검, 테스트 설계, or when other review skills need a principled foundation. Do NOT use for specific code review (use code-review), security audit (use security), or strategic decisions (use strategic-thinking).
ppt
Generates PowerPoint architecture diagrams with auto-layout and orthogonal routing using PPTXGenJS. Use when creating AWS architecture diagrams, infrastructure layouts, system design slides, IDC 구성도, or any diagram that needs boxes with right-angle connectors in .pptx format. Also use when 아키텍처 다이어그램, 인프라 구성도, PPT 생성, 구성도 만들기, 슬라이드 자동 생성. Do NOT use for simple text-only presentations (use PowerPoint directly), data charts (use data-investigation), or ASCII/Mermaid diagrams (use diagram skill).