From flowforge-skill
Generates professional diagrams (flowcharts, architecture, comparisons, timelines, sequence diagrams, etc.) as draw.io XML. Useful for visualizing processes, structures, and documentation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/flowforge-skill:FlowForgeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate professional diagrams as draw.io XML files. Supports 13 diagram types: flows, comparisons, layer stacks, cycles, trees, hub-and-spoke, columns, matrices, funnels, timelines, sequence diagrams, and swimlanes.
examples.mdexamples/compare-monolith-vs-micro.drawioexamples/flow-cicd.drawioexamples/hub-agent-capabilities.drawioexamples/loop-ml-training.drawioexamples/timeline-llm-history.drawioexamples/tree-storage-decision.drawioreferences/layouts.mdscripts/render.shscripts/validate.pythemes.mdxml-reference.mdGenerate professional diagrams as draw.io XML files. Supports 13 diagram types: flows, comparisons, layer stacks, cycles, trees, hub-and-spoke, columns, matrices, funnels, timelines, sequence diagrams, and swimlanes.
/FlowForge "OAuth 2.0 authorization code flow"
/FlowForge path/to/design-doc.md
/FlowForge "CI/CD pipeline" --type loop
/FlowForge "Monolith vs Microservices" --type compare --theme morandi
/FlowForge "System Architecture" --lang en
If given a document: read it fully, identify 1–3 places that benefit from a diagram, and for each note the insert position, the topic (one sentence), and the recommended type (see Diagram Type Reference).
If given a concept directly: identify the core message and pick the type via the Selection Guide.
Then present one combined proposal and ask for confirmation once. The proposal contains:
Example sketch:
Direction: left-to-right | Nodes: 4 | Type: flow | Theme: tech-blue
[primary] Code Commit → [process] Build → [process] Test → [accent] Deploy
↓ (fail)
[error] Alert
Skip the confirmation entirely when the request already pins everything down (user gave --type/--theme or an unambiguous description), or when no human can respond (subagent, batch, CI). In that case proceed with defaults and state your assumptions in the final report.
python3 {skill_dir}/scripts/validate.py <file.drawio> --theme <theme>
This deterministically checks: XML well-formedness, unique ids, dangling arrow references, orthogonal edge style, canvas bounds, node overlap, z-order (containers before children), font sizes, text-fit estimates, and theme color compliance. Fix every ERROR and re-run until clean. WARNs are heuristics — judge each one, fix the real ones.
bash {skill_dir}/scripts/render.sh <file.drawio> # writes a .png next to the file
If the script reports draw.io is not installed, skip this step (the user can enable it once with brew install --cask drawio). Otherwise Read the PNG and inspect it with fresh eyes: text overflowing nodes, crowded regions, arrows colliding with nodes, color rhythm, overall balance. Fix and re-render until it looks right — this catches what rules can't.
Save the .drawio file to the output directory (see Configuration). After saving, report:
If the user wants changes after viewing:
.drawio file{name}_v2.drawio (preserve previous version), then re-run Steps 3–4Optional per-project config file ./.flowforge.json (in the working directory, never inside the skill directory — the skill directory may be read-only or shared across projects):
{
"defaultTheme": "tech-blue",
"outputDir": "./diagrams",
"language": "auto"
}
If the file is absent, use exactly these defaults — do not interview the user. "language": "auto" means match the user's language; technical abbreviations (API, LLM, CI/CD) stay in English regardless. Per-invocation flags (--theme, --lang) override config.
| Type | Code | Best For | Example |
|---|---|---|---|
| Linear Flow | flow | Sequential steps A→B→C | API call flow, data pipeline |
| Vertical Flow | flow-vertical | Top-down processes | Decision process, approval chain |
| Comparison | compare | A vs B side by side | Traditional vs AI approach |
| Layer Stack | layers | Tech stack, tiers | System architecture layers |
| Cycle | loop | Iterative processes | ML training loop, CI/CD |
| Tree | tree | Hierarchies, taxonomies | Org chart, decision tree |
| Hub & Spoke | hub | Core concept + branches | Product feature map |
| Type | Code | Best For |
|---|---|---|
| Parallel Columns | columns | 3+ parallel concepts |
| Matrix | matrix | Multi-dimension comparison |
| Funnel | funnel | Filtering, conversion |
| Timeline | timeline | Version evolution, history |
| Sequence | sequence | Component interactions |
| Swimlane | swimlane | Cross-role processes (who does what) |
| Content Pattern | Recommended Type |
|---|---|
| Sequential steps | flow or flow-vertical |
| Two things compared | compare |
| 3+ parallel concepts | columns or hub |
| Layered system | layers |
| Iterative/cyclical process | loop |
| One core, many branches (incl. mind-map style) | hub or tree |
| Components communicating | sequence |
| Change over time | timeline |
| Multi-criteria evaluation | matrix |
| Progressive filtering | funnel |
| Steps owned by different roles/systems | swimlane |
This is the most important section for visual quality.
Each theme has 4 base colors (primary, process, accent, neutral) and 6 extended colors (success, warning, error, secondary, storage, group). The primary family should always dominate; the amount of non-primary accents scales with diagram size.
| Node Count | Target Colors | Guideline |
|---|---|---|
| 3-5 nodes | 2-3 colors | Primary family dominates. At most 1 accent node. |
| 6-8 nodes | 3-4 colors | Primary ~60%. Add 1-2 non-primary at semantic turning points. |
| 9+ nodes | 4-5 colors | Primary ~50%. Distribute 2-3 non-primary for visual rhythm. |
6+ colors almost always looks bad regardless of diagram size.
primary and process cover the largest visual area and the biggest nodes.| Node Type | Recommended Color |
|---|---|
| User input / starting point | primary |
| Standard processing step | process |
| Decision / branching point | warning or accent |
| Domain-specific / translation step | secondary |
| Key transformation / highlight | accent |
| Data source / external system | neutral |
| Error path / fallback | accent or error |
| Successful output / endpoint | success or primary |
| Database / storage | storage |
Good/bad worked examples of color rhythm are at the bottom of themes.md.
edgeStyle=orthogonalEdgeStyle; so it runs horizontal/vertical only. Exception: decorative connectors with endArrow=none (hub rays, timeline axis/ticks) may run straight.The validator (Step 3) catches most geometry/reference mistakes after the fact, but knowing these saves a fix cycle:
value="" on the background rect or it renders twice.exitX/exitY/entryX/entryY; otherwise draw.io auto-routes, usually badly.value is HTML inside an XML attribute: < > &, and &bull; for bullets. One missing escape breaks the whole file (validator: parse error).pageWidth/pageHeight from the layout formulas: max(x + w) + CANVAS_PAD (validator: bounds check).parent="1" — every content element needs it unless intentionally grouped (validator: parent check).loop diagrams, route the last→first arrow around the outside of the rectangle, never through the center.n nodes have n-1 gaps: canvas width = PAD×2 + n×NODE_W + (n-1)×GAP_H (validator: bounds/overlap).edgeStyle=orthogonalEdgeStyle; keeps them orthogonal — include it in every flow arrow (validator: style check).Read them when the workflow step calls for them — don't load everything upfront.
| File | When to read |
|---|---|
| references/layouts.md | Step 2, before computing coordinates — global constants + all 13 layout algorithms |
| themes.md | Step 2, when applying colors — 5 themes × 10 semantic colors + 7 text colors, color-rhythm examples |
| xml-reference.md | Step 2, when writing XML — canvas boilerplate, element templates, arrow direction table |
| examples.md | Step 2 — coordinate-calculation walkthroughs + index of example files |
scripts/validate.py | Step 3 — run on every generated file (don't read it, run it) |
scripts/render.sh | Step 4 — export PNG for the visual self-check |
.drawio files (in examples/)Real, working files to read as reference when generating a similar type:
examples/flow-cicd.drawio — Linear flow, 4 nodes, tech-blueexamples/compare-monolith-vs-micro.drawio — Comparison, 2 columns × 3 rows, morandiexamples/loop-ml-training.drawio — Cycle, 4 nodes clockwise, mintexamples/tree-storage-decision.drawio — Decision tree with diamonds, mintexamples/hub-agent-capabilities.drawio — Hub & spoke, 6 spokes with rays, indigoexamples/timeline-llm-history.drawio — Timeline with axis + ticks, terracottanpx claudepluginhub wentong2022-arch/flowforge-skillGenerates Excalidraw diagram JSON files that argue visually, not just display information. Use for workflows, architectures, or concepts.
Creates professional dark-themed SVG diagrams of any type: architecture, flowcharts, sequence, structural, mind maps, timelines, state machines, data flow, and illustrative/conceptual diagrams.
Generates Excalidraw diagram JSON files (.excalidraw) that argue visually for workflows, architectures, or concepts. Ideal for teaching relationships, flows, and technical integrations with evidence artifacts.