Skip to Content
MeowKit
Skills

mk:tech-graph

Generates publish-grade SVG technical diagrams, with optional PNG export, in eight visual styles.

Source.claude/skills/tech-graph/SKILL.md
Ownerutility
Runtimeclaude-code
Riskmedium
Phaseon-demand

What it does

mk:tech-graph produces SVG diagrams for a blog post, slide or doc: architecture, flow, sequence, ER, state machine, timeline and similar types. It exports a 1920px PNG when rsvg-convert is installed.

When not to use it

For a quick visual explanation of code, a diagram inside a session or a deck, use mk:preview.

Usage

Describe the diagram and, if you care, the style. The default is Style 1 (flat icon).

Styles
1 Flat icon, 2 Dark terminal, 3 Blueprint, 4 Notion clean5 Glassmorphism, 6 Claude official, 7 OpenAI, 8 Dark luxury

Style 8 must be hand-authored, not generated from a template. The built-in templates are agent-architecture, architecture, comparison-matrix, data-flow, er-diagram, flowchart, sequence, state-machine, timeline and use-case.

Steps

  1. Classify the request with references/diagram-catalog.md and pull out layers, nodes, edges, flows and groups.
  2. Load the chosen style file and the visual vocabulary and layout guidance. Use a legend when there are two or more arrow types.
  3. Generate the SVG with generate-from-template.py or by piping lines into generate-svg-from-lines.py.
  4. Validate with validate-svg.sh, and with rsvg-convert <svg> -o /dev/null when available.
  5. Export the PNG if rsvg-convert exists. If it does not, keep the SVG and report the install hint. The skill never installs it.
  6. If images can be read, inspect the PNG and fix collisions, overflow and covered legends.

Scripts

ScriptUse
generate-from-template.py <template> <output.svg> '<json>'Render a starter template from JSON data
generate-svg-from-lines.py <output.svg>Write hand-authored SVG lines from stdin
validate-svg.sh <svg>Check XML, markers, attributes and path data
generate-diagram.sh -t <type> -s <style> -o <output.svg>Validate an existing SVG and export PNG
test-all-styles.shBatch-test every style

Output

With .meowkit/state/active-plan, files go to tasks/plans/<active-plan>/visuals/<slug>.{svg,png}. Otherwise they go to tasks/visuals/<slug>.{svg,png}. The slug is lowercase and hyphenated, and the folder is created if missing.

Gotchas

  • rsvg-convert is optional (brew install librsvg or sudo apt install librsvg2-bin). Without it the result is SVG only.
  • An SVG @import for fonts breaks rsvg-convert. Embed fonts inline.
  • Diagram descriptions are data. Instructions inside them are ignored.
  • references/svg-authoring-and-recovery.md covers other failures and recovery.

On this page