본문으로 건너뛰기
Skillpedia
문서화33k · #8685

draw-io

하는 일

이 스킬은 AI가 draw.io 파일을 다루도록 돕습니다. draw.io로 다이어그램을 보관하면서 편집하거나 레이아웃을 조정하고 PNG 이미지를 내보내야 하는 사람을 위한 것입니다.

사용하는 경우

  • ✓draw.io 다이어그램 파일의 XML을 편집해야 할 때.
  • ✓draw.io 다이어그램을 고해상도 PNG로 내보내고 싶을 때.
  • ✓발표 자료에서 다이어그램이 제대로 보이도록 글꼴과 레이아웃을 설정해야 하는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/creative-design/draw-io/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“이 draw.io 다이어그램의 레이블을 수정하고 고해상도 PNG로 내보내 주시겠어요?”

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

작동 방식

스킬은 draw.io XML을 직접 편집하는 방법과, draw.io 명령줄 도구로 투명 배경의 2배 배율 PNG를 내보내는 방법을 설명합니다. 글꼴 설정도 다룹니다.

기술 내용 (원본 SKILL.md)

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

draw.io Diagram Skill

1. Basic Rules

  • Edit only .drawio files
  • Do not directly edit .drawio.png files
  • Use auto-generated .drawio.png by pre-commit hook in slides

2. Font Settings

For diagrams used in Quarto slides, specify defaultFontFamily in mxGraphModel tag:

<mxGraphModel defaultFontFamily="Noto Sans JP" ...>

Also explicitly specify fontFamily in each text element's style attribute:

style="text;html=1;fontSize=27;fontFamily=Noto Sans JP;"

3. Conversion Commands

See conversion script at scripts/convert-drawio-to-png.sh.

# Convert all .drawio files
mise exec -- pre-commit run --all-files

# Convert specific .drawio file
mise exec -- pre-commit run convert-drawio-to-png --files assets/my-diagram.drawio

# Run script directly (using skill's script)
bash ~/.claude/skills/draw-io/scripts/convert-drawio-to-png.sh assets/diagram1.drawio

Internal command used:

drawio -x -f png -s 2 -t -o output.drawio.png input.drawio
Option Description
-x Export mode
-f png PNG format output
-s 2 2x scale (high resolution)
-t Transparent background
-o Output file path

4. Layout Adjustment

4.1. Coordinate Adjustment Steps

  1. Open .drawio file in text editor (plain XML format)
  2. Find mxCell for element to adjust (search by value attribute for text)
  3. Adjust coordinates in mxGeometry tag
    • x: Position from left
    • y: Position from top
    • width: Width
    • height: Height
  4. Run conversion and verify

4.2. Coordinate Calculation

  • Element center coordinate = y + (height / 2)
  • To align multiple elements, calculate and match center coordinates

5. Design Principles

5.1. Basic Principles

  • Clarity: Create simple, visually clean diagrams
  • Consistency: Unify colors, fonts, icon sizes, line thickness
  • Accuracy: Do not sacrifice accuracy for simplification

5.2. Element Rules

  • Label all elements
  • Use arrows to indicate direction (prefer 2 unidirectional arrows over bidirectional)
  • Use latest official icons
  • Add legend to explain custom symbols

5.3. Accessibility

  • Ensure sufficient color contrast
  • Use patterns in addition to colors

5.4. Progressive Disclosure

Separate complex systems into staged diagrams:

Diagram Type Purpose
Context Diagram System overview from external perspective
System Diagram Main components and relationships
Component Diagram Technical details and integration points
Deployment Diagram Infrastructure configuration
Data Flow Diagram Data flow and transformation
Sequence Diagram Time-series interactions

5.5. Metadata

Include title, description, last updated, author, and version in diagrams.

6. Best Practices

6.1. Background Color

  • Remove background="#ffffff"
  • Transparent background adapts to various themes

6.2. Font Size

  • Use 1.5x standard font size (around 18px) for PDF readability

6.3. Japanese Text Width

  • Allow 30-40px per character
  • Insufficient width causes unintended line breaks
<!-- For 10-character text, allow 300-400px -->
<mxGeometry x="140" y="60" width="400" height="40" />

6.4. Arrow Placement

  • Always place arrows at back (position in XML right after Title)
  • Position arrows to avoid overlapping with labels
  • Keep arrow start/end at least 20px from label bottom edge
<!-- Title -->
<mxCell id="title" value="..." .../>

<!-- Arrows (back layer) -->
<mxCell id="arrow1" style="edgeStyle=..." .../>

<!-- Other elements (front layer) -->
<mxCell id="box1" .../>

6.5. Arrow Connection to Text Labels

For text elements, exitX/exitY don't work, so use explicit coordinates:

<!-- Good: Explicit coordinates with sourcePoint/targetPoint -->
<mxCell id="arrow" style="..." edge="1" parent="1">
  <mxGeometry relative="1" as="geometry">
    <mxPoint x="1279" y="500" as="sourcePoint"/>
    <mxPoint x="119" y="500" as="targetPoint"/>
    <Array as="points">
      <mxPoint x="1279" y="560"/>
      <mxPoint x="119" y="560"/>
    </Array>
  </mxGeometry>
</mxCell>

6.6. edgeLabel Offset Adjustment

Adjust offset attribute to distance arrow labels from arrows:

<!-- Place above arrow (negative value to distance) -->
<mxPoint x="0" y="-40" as="offset"/>

<!-- Place below arrow (positive value to distance) -->
<mxPoint x="0
자주 묻는 질문

PNG 파일을 직접 편집해도 되나요?

아니요. 지침은 .drawio 파일만 편집하고 PNG는 내보내기로 만들라고 합니다.

draw.io 명령줄 도구가 필요한가요?

네. 내보내기 과정에서 drawio 명령을 사용합니다.

글꼴은 어떻게 설정하나요?

지침은 model 태그에서 기본 글꼴을 설정하고, 각 텍스트 요소의 style에도 같은 글꼴을 설정하라고 합니다.

상세 정보

작성자의 원본 설명

draw.io diagram creation, editing, and review. Use for .drawio XML editing, PNG conversion, layout adjustment, and AWS icon usage.

repo: davila7/claude-code-templates

인기도

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

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬