Show HN: I taught Claude Code to draw diagrams – the XML pitfalls were brutal banner
ekusiadadus ekusiadadus

Show HN: I taught Claude Code to draw diagrams – the XML pitfalls were brutal

Git community intermediate

Description

A Claude Code skill and CLI validator for generating high-quality draw.io diagrams. 31 validation rules across 10 modules, 4 validation modes, preset system, and CI-ready tooling.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

draw-mcp — AI-Generated draw.io XML Quality Standard

A Claude Code skill and CLI validator for generating high-quality draw.io diagrams. 31 validation rules across 10 modules, 4 validation modes, preset system, and CI-ready tooling.

Positioning

Feature draw-mcp draw.io MCP Server Mermaid.js
Output Native XML Image/JSON Text DSL
Layout control Pixel-perfect Auto-layout Auto-layout
Japanese text Full support Limited No control
Validation 31 rules, 4 modes None Syntax only
Presets YAML-based None None
Offline Yes Optional Yes
Best for Production diagrams Quick previews Simple flows

**draw-mcp** is a Claude Code XML generation skill with strict validator and style guide. The official draw.io MCP server is complementary (use it for previews, Mermaid, CSV). draw-mcp focuses on **quality** for production diagrams.

Supported Features

Features backed by validator rules, tests, and real examples:

  • 31 Validation Rules across 10 modules (defined in claims.yaml)
  • 4 Validation Modes: loose, standard, strict, production
  • CLI Tool: draw-mcp-validate with text/JSON output, severity filtering, and mode selection
  • Preset System: YAML-based presets as validation profiles (--preset)
  • Font Management: Enforces fontFamily on all text elements
  • Edge Routing: Z-order, relative geometry, arrowhead spacing, node spacing
  • Containers: Swimlane, group, custom containers with pointer events
  • Layers: Layer structure validation, cross-layer edge detection
  • Endpoint Semantics: Source/target validity, floating/orphan edge detection
  • Security: Dangerous HTML tag detection, control character validation
  • Japanese Text: Width allocation for CJK characters
  • CI Integration: GitHub Actions, pre-commit hooks, 153+ tests

Experimental Features

Features documented but not deeply validated:

...