원클릭으로
design-doc-diagrams
Write design docs, READMEs, Jira tickets, RFCs — with or without diagrams. Diagrams render via draw.io MCP plugin.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write design docs, READMEs, Jira tickets, RFCs — with or without diagrams. Diagrams render via draw.io MCP plugin.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Promotes recurring feedback into the right skill, then guides /compact at phase boundaries.
Testing guidance for pytest, Jest/Vitest, Go, and TDD. Use when writing tests or improving coverage.
Methodical debugging with evidence and hypothesis testing. Use when troubleshooting fails or root cause is unclear.
Create new skills, commands, hooks, or subagents. Use when adding capabilities to Claude Code or Cursor.
PostgreSQL patterns for queries, schema, indexing, security. Use when writing SQL, designing schema, or adding indexes.
Reviews a GitHub PR diff for correctness, security, tests, architecture. Use when asked to review a PR or pull request.
| name | design-doc-diagrams |
| description | Write design docs, READMEs, Jira tickets, RFCs — with or without diagrams. Diagrams render via draw.io MCP plugin. |
The skill assumes diagrams are a TOOL, not the goal. Many docs (Jira tickets, short ADRs, runbook steps) need no diagram at all.
<when_to_activate>
<doc_type_decision_tree> Pick the right shape before writing:
| Venue / Intent | Doc Type | Typical Sections | Diagram? |
|---|---|---|---|
| New system / major architecture choice | Design doc / RFC | Context, Goals, Non-goals, Decision, Alternatives, Risks, Open questions | Usually yes (1-3) |
| Bug or task assignment | Jira ticket | Summary, Repro, Expected vs Actual, Acceptance criteria | Usually no |
| Service / repo intro | README | What, Why, Run locally, Architecture, Contributing | Sometimes (1 architecture) |
| One specific decision | ADR | Status, Context, Decision, Consequences | Rarely |
| Incident response | Postmortem | Timeline, Impact, Root cause, Remediation, Action items | Optional (sequence/timeline) |
| Operational procedure | Runbook | Trigger, Steps, Verification, Rollback | Optional (decision tree) |
| Cross-team alignment | Tech proposal | Problem, Proposed approach, Tradeoffs, Migration plan | Often (state-before/after) |
The decision tree is suggestive, not prescriptive — ask the user what venue the doc lives in (Confluence, Jira, GitHub, code repo, Slack) before picking the shape. </doc_type_decision_tree>
<jira_ticket_shape> Jira tickets are the most common shape that ISN'T a design doc. Default template:
**Summary** (one sentence — what the work is)
**Why now / context**
[1-3 lines of background. Link the parent epic if one exists.]
**Acceptance criteria**
- [ ] Specific, observable outcome 1
- [ ] Specific, observable outcome 2
- [ ] Tests added / updated
**Out of scope**
[Anything a reviewer might assume is in but isn't.]
**Notes / links**
- Related PRs:
- Related Jira: PBAT-...
- Slack thread:
Skip diagrams in tickets unless the work is intrinsically visual (e.g. a new sequence between services). If the ticket is being filed from a design doc, link the design doc — don't restate it.
Before creating: GREP the epic / sibling tickets for already-shipped overlapping work (from feedback-grep-epic-before-filing).
</jira_ticket_shape>
<design_doc_shape> Heavyweight docs (RFC, design doc, tech proposal) follow a common skeleton — adapt section names to the org's template:
# <Title>
## Context
Why this exists. What problem we're solving. Link prior art.
## Goals
Bulleted, observable success conditions.
## Non-goals
What this explicitly does NOT solve. Prevents scope creep in review.
## Proposed design
The actual decision + how it works. THIS is where diagrams usually go.
## Alternatives considered
Each alternative + why it lost. One paragraph each — not a survey.
## Risks / open questions
Honest list. Open questions belong here, not in chat.
## Migration / rollout
If applicable: stages, kill switches, rollback plan.
## Verification
How we'll know it worked — metrics, tests, monitors.
Keep alternatives honest — reviewers smell straw-man comparisons. Cite real evidence (links to issues, PRs, benchmark runs) rather than asserting tradeoffs. </design_doc_shape>
<render_to_drawio>
When a diagram IS needed, draw.io MCP plugin (@drawio/mcp) is the primary render path. It builds a draw.io URL with the diagram in the URL #fragment (so the payload never leaves the user's machine) and opens it locally in the browser.
| Tool | Use For | Input |
|---|---|---|
mcp__drawio__open_drawio_mermaid | Any Mermaid source you just generated | Raw Mermaid text (the same string you'd put inside a ```mermaid fence) |
mcp__drawio__open_drawio_xml | Hand-authored mxGraph XML, or XML exported from another tool | draw.io XML |
mcp__drawio__open_drawio_csv | Tabular node/edge data | CSV per draw.io's CSV import spec |
Default workflow:
<diagram_type_decision_tree>)mcp__drawio__open_drawio_mermaid with that source — DO NOT paste it as a Markdown fence first./diagrams/<name>.mmd) so it's diff-able in gitIf the user explicitly asks for "just the Mermaid", skip step 3. If the doc has no diagrams (Jira ticket, short ADR), skip this whole block. </render_to_drawio>
<diagram_type_decision_tree> Analyze user intent to determine diagram type:
| User Request | Diagram Type |
|---|---|
| "workflow", "process", "business logic", "user flow" | Activity diagram (flowchart) |
| "infrastructure", "deployment", "cloud", "k8s" | Deployment diagram |
| "system architecture", "components", "microservices" | Architecture diagram |
| "API flow", "interactions", "request/response" | Sequence diagram |
| "code to diagram" | Analyze code → pick appropriate type(s) |
| "design document", "full docs" | Multiple diagrams + prose |
| </diagram_type_decision_tree> |
<diagram_patterns>
flowchart TD
Start([Start]) --> Process[Process Data]
Process --> Check{Valid?}
Check -->|Yes| Save[Save]
Check -->|No| Error[Error]
Save --> Complete([Complete])
graph TB
Client[User] --> LB[Load Balancer]
LB --> App1[App Server 1]
LB --> App2[App Server 2]
App1 --> DB[(Database)]
App1 --> Cache[(Redis)]
sequenceDiagram
participant C as Client
participant A as API
participant D as Database
C->>A: POST /login
A->>D: Verify credentials
D-->>A: User record
A-->>C: JWT token
graph TB
subgraph Cloud[Cloud Provider]
LB[Load Balancer]
subgraph Compute[Compute]
App1[Container 1]
App2[Container 2]
end
DB[(Database)]
Queue[Message Queue]
end
LB --> Compute
Compute --> DB
Compute --> Queue
</diagram_patterns>
<styling_rules> ALL diagrams MUST use high-contrast colors:
classDef primary fill:#90EE90,stroke:#333,stroke-width:2px,color:darkgreen
classDef secondary fill:#87CEEB,stroke:#333,stroke-width:2px,color:darkblue
classDef database fill:#E6E6FA,stroke:#333,stroke-width:2px,color:darkblue
classDef error fill:#FFB6C1,stroke:#DC143C,stroke-width:2px,color:black
Rules:
color: in every classDefclassDef carry the visual semantics.
</styling_rules><code_to_diagram> When converting source code to diagrams:
Generate multiple diagram types from a single codebase when appropriate. </code_to_diagram>
Validate Mermaid syntax BEFORE calling the draw.io tool — a malformed Mermaid string will surface as a vague error in the browser tab.Quick checks:
classDef names referenced via class actually existOnly after the source validates, call mcp__drawio__open_drawio_mermaid. NEVER add a Mermaid fence to a Markdown doc until you've round-tripped it through validation.
<file_naming> When persisting Mermaid source alongside docs:
./diagrams/<doc_name>_<num>_<type>_<title>.mmd
Example: ./diagrams/api_design_01_sequence_auth_flow.mmd
The draw.io plugin renders the diagram in the browser — you don't need to also produce a .png. If the user wants a static image, ask them to export from inside draw.io (File → Export As → PNG/SVG) so the export carries the embedded XML for later editing.
</file_naming>
<best_practices>
mcp__drawio__open_drawio_mermaid unless the user opted out.color: in styles..mmd files diff cleanly; draw.io XML does not.<success_criteria>
mcp__drawio__open_drawio_mermaid called, source persisted to .mmd