Generate production-quality SVG+PNG technical diagrams from natural language. 7 styles, UML support, and AI/Agent workflow patterns.
# Add to your Claude Code skills
git clone https://github.com/yizhiyanhua-ai/fireworks-tech-graphGuides for using ai agents skills like fireworks-tech-graph.
Last scanned: 5/5/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-05T06:16:23.677Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}fireworks-tech-graph is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by yizhiyanhua-ai. Generate production-quality SVG+PNG technical diagrams from natural language. 7 styles, UML support, and AI/Agent workflow patterns. It has 9,610 GitHub stars.
Yes. fireworks-tech-graph passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/yizhiyanhua-ai/fireworks-tech-graph" and add it to your Claude Code skills directory (see the Installation section above). fireworks-tech-graph ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
fireworks-tech-graph is primarily written in Python. It is open-source under yizhiyanhua-ai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh fireworks-tech-graph against similar tools.
No comments yet. Be the first to share your thoughts!
Generate geometry-checked SVG technical diagrams, high-resolution PNG, validated SVG-to-GIF semantic motion, and sanitized offline interactive HTML.
Use this repository unchanged in both Codex and Claude Code. It follows the Agent Skills layout: SKILL.md is the shared entry point, bundled resources use relative paths, and agents/openai.yaml adds optional Codex UI metadata without affecting Claude Code.
Before reading a reference or running a script, resolve the directory containing this SKILL.md as SKILL_ROOT. Do not assume the current working directory is the skill directory, and do not assume a variable set in one shell call persists into the next.
${CLAUDE_SKILL_DIR}.Every command block below sets SKILL_ROOT itself. In Codex, replace /absolute/path/from-codex-skill-metadata with the absolute skill directory before running the command.
The unified scripts/fireworks.py CLI and compatibility helpers provide stable rendering, geometry validation, inspection, animation, and export:
generate-diagram.sh - Validate SVG + export PNGSKILL_ROOT="${CLAUDE_SKILL_DIR:-/absolute/path/from-codex-skill-metadata}"
"$SKILL_ROOT/scripts/generate-diagram.sh" -t architecture -s 1 -o ./output/arch.svg
"$SKILL_ROOT/scripts/generate-diagram.sh" -t architecture -s 1 -o ./output/arch.svggenerate-from-template.py - Create starter SVG from templateSKILL_ROOT="${CLAUDE_SKILL_DIR:-/absolute/path/from-codex-skill-metadata}"
mkdir -p ./output
python3 "$SKILL_ROOT/scripts/generate-from-template.py" architecture ./output/arch.svg '{"title":"My Diagram","nodes":[],"arrows":[]}'
validate-svg.sh - Validate SVG syntaxSKILL_ROOT="${CLAUDE_SKILL_DIR:-/absolute/path/from-codex-skill-metadata}"
"$SKILL_ROOT/scripts/validate-svg.sh" <svg-file>
test-all-styles.sh - Batch test all stylesSKILL_ROOT="${CLAUDE_SKILL_DIR:-/absolute/path/from-codex-skill-metadata}"
"$SKILL_ROOT/scripts/test-all-styles.sh"
When to use scripts:
$SKILL_ROOT/references/composition-quality-contract.md, then apply the diagram-type layout rules$SKILL_ROOT/references/style-1-flat-icon.md unless user specifies another; load the matching $SKILL_ROOT/references/style-N-*.md for exact color tokens and SVG patternsc4-review, cloud-fabric, event-transit, and ops-pulse; use scripts/fireworks.py validate before layout so missing or contradictory engineering facts fail closed$SKILL_ROOT/references/icons.md for known products"$SKILL_ROOT/scripts/validate-svg.sh" file.svg to check XML, markers, geometry, composition budgets, and renderabilitycairosvg (recommended). Load $SKILL_ROOT/references/png-export.md when choosing another renderer让这张图动起来 / 生成 GIF / 制作 GIF / Animate this diagram / Generate a GIF means the latest generated semantic SVG to one GIF with auto, 5.75s, 20fps, and 960px width when that SVG satisfies one of the 12 approved motion contracts. Exact source bytes are not pinned, but role/stage/order coverage, route directions, required colors, and geometry fail closed; do not claim arbitrary same-style topologies are supported. Load $SKILL_ROOT/references/motion-effects.md, run fireworks.py animate, and report SVG/GIF/report paths. GIF is the only motion media format, while the default command also emits <output>.motion.json. Styles 1–12 are enabled, and their contracts plus the shared +2s-settled-flow timing revision are user-approved; the default keeps frames 38–109 at full opacity and resets on frames 110–114. Every scene begins connector-free and advances its moving primitives toward each target. The 75-vs-115 compatibility gate counts binary-exact frames first, decoded-RGBA-exact frames second, and permits a guarded antialias equivalent only when AE ≤ 128, normalized RMSE ≤ 0.001, every difference component is at most 2px wide or high, and all differences remain on edge or node borders; DOM and signature geometry stay strict-exact. Reject raster animation inputs and non-GIF motion outputs. Explicit 3.75s/75-frame and 2.75s/55-frame timelines remain supportedvisual_review: passed after inspection. If image reading is unavailable, report visual_review: skipped (image reader unavailable) — do not guess or claim visual correctness.Use this order when instructions disagree:
$SKILL_ROOT/references/style-N-*.md visual tokens (palette, typography, corner radius, shadow treatment)Geometry and validation gates always remain active: style guidance cannot justify unreadable text, missing marker definitions, or arrows crossing component interiors. Tables in this file define semantic defaults; a selected style may override their colors and stroke treatment while preserving the meaning and direction of each flow.
Nodes = services/components. Group into horizontal layers (top→bottom or left→right).
<rect> dashed containers to group related services in the same layer0 0 960 600 standard, 0 0 960 800 for tall stacksEmphasizes what data moves where. Focus on data transformation.
stroke-width: 2.5) for primary data pathsSequential decision/process steps.
Shows how an AI agent reasons, uses tools, and manages memory. Key conceptual layers to always consider:
Specialized agent diagram focused on memory operations.
store(), retrieve(), forget(), consolidate()Time-ordered message exchanges between participants.
<rect> loop/alt frames with label in top-left cornerSide-by-side comparison of approaches, systems, or components.
#dcfce7) + ✓ checkmark; unsupported: #f9fafb fill#f9fafb / #ffffff) for readabilityHorizontal time axis showing durations, phases, and milestones.
0 0 960 400 typical; wider for many time periods: 0 0 1200 400Radial layout from central concept.
cx=480, cy=280<path> with cubic bezier for branches, not straight linesStatic structure showing classes, attributes, methods, and relationships.
+ public, - private, # protected)<<interface>> stereotype above name, or circle/lollipop notation<<enumeration>> stereotype, values in bottom0 0 960 600 standard; 0 0 960 800 for deep hierarchiesSystem functionality from user perspective.
<<include>> from base to included use case<<extend>> from extension to base use case0 0 960 600 standardLifecycle states and transitions of an entity.
entry/ action, exit/ action, do/ activity[condition]event [guard] / action
/0 0 960 600 standardDatabase schema and data relationships.
1, N, 0..1, 0..*, 1..*0 0 960 600 standard; wider 0 0 1200 600 for many entitiesPhysical or logical network infrastructure.
0 0 960 600 standardFull mapping of UML 14 diagram types to supported diagram types:
| UML Diagram | Supported As | Notes |
|---|---|---|
| Class | Class Diagram | Full UML notation |
| Component | Architecture Diagram | Use colored fills per component type |
| Deployment | Architecture Diagram | Add node/instance labels |
| Package | Architecture Diagram | Use dashed grouping containers |
| Composite Structure | Architecture Diagram | Nested rects within components |
| Object | Class Diagram | Instance boxes with underlined name |
| Use Case | Use Case Diagram | Full actor/ellipse/relationship |
| Activity | Flowchart / Process Flow | Add fork/join bars |
| State Machine | State Machine Diagram | Full UML notation |
| Sequence | Sequence Diagram | Add alt/opt/loop frames |
| Communication | — | Approximate with Sequence (swap axes) |
| Timing | Timeline | Adapt time axis |
| Interaction Overview | Flowchart | Combine activity + sequence fragments |
| ER Diagram | ER Diagram | Chen/Crow's foot notation |
Map semantic concepts to consistent shapes across all diagram types:
| Concept | Shape | Notes |
|---|---|---|
| User / Human | Circle + body path | Stick figure or avatar |
| LLM / Model | Rounded rect with brain/spark icon or gradient fill | Use accent color |
| Agent / Orchestrator | Hexagon or rounded rect with double border | Signals "active controller" |
| Memory (short-term) | Rounded rect, dashed border | Ephemeral = dashed |
| Memory (long-term) | Cylinder (database shape) | Persistent = solid cylinder |
| Vector Store | Cylinder with grid lines inside | Add 3 horizontal lines |
| Graph DB | Circle cluster (3 overlapping circles) | |
| Tool / Function | Gear-like rect or rect with wrench icon | |
| API / Gateway | Hexagon (single border) | |
| Queue / Stream | Horizontal tube (pipe shape) | |
| File / Document | Folded-corner rect | |
| Browser / UI | Rect with 3-dot titlebar | |
| Decision | Diamond | Flowcharts only |
| Process / Step | Rounded rect | Standard box |
| External Service | Rect with cloud icon or dashed border | |
| Data / Artifact | Parallelogram | I/O in flowcharts |
Always assign arrow meaning, not just color. The values below are defaults; the selected style reference overrides colors and stroke weights while preserving flow semantics:
| Flow Type | Color | Stroke | Dash | Meaning |
|---|---|---|---|---|
| Primary data flow | blue #2563eb |
2px solid | none | Main request/response path |
| Control / trigger | orange #ea580c |
1.5px solid | none | One system triggering another |
| Memory read | green #059669 |
1.5px solid | none | Retrieval from store |
| Memory write | green #059669 |
1.5px | 5,3 |
Write/store operation |
| Async / event | gray #6b7280 |
1.5px | 4,2 |
Non-blocking, event-driven |
| Embedding / transform | purple #7c3aed |
1px solid | none | Data transformation |
| Feedback / loop | purple #7c3aed |
1.5px curved | none | Iterative reasoning loop |
Always include a legend when 2+ arrow types are used.
Spacing:
Arrow Labels (CRITICAL):
<rect fill="canvas_bg" opacity="0.95"/> only when the offset label still crosses another visual element (another arrow, a node edge, etc.)Arrow Routing:
marker-start + marker-end, or two visibly offset paths in that corridorPost-Generation Arrow Optimization:
When a user asks to "优化箭头" / "fix arrow routing" / "optimize the diagram" on an already-generated diagram, preserve all nodes, containers, styles, and layout — only modify the arrows entries in the JSON data, then re-render with generate-from-template.py.
Available arrow override fields (in recommended order of use):
| Field | Type | When to Use |
|---|---|---|
source_port / target_port |
"left" / "right" / "top" / "bottom" |
Arrow exits/enters from the wrong edge |
corridor_x |
[x, ...] |
Hint vertical segments toward this x lane (soft preference) |
corridor_y |
[y, ...] |
Hint horizontal segments toward this y lane (soft preference) |
route_points |
[[x1,y1], [x2,y2], ...] |
Exact ordered waypoints; each leg is routed orthogonally and unsafe points are rejected |
routing_padding |
number (default: 24) | (Advanced) Adjust obstacle clearance for this arrow |
port_clearance |
number | (Advanced) Adjust first-segment offset from node edge |
label_style |
"badge" / "offset" |
Choose "offset" when badge backgrounds create visual clutter; keep "badge" (default) for legacy/high-contrast labels |
For JSON/template rendering, the default remains "badge" for backward compatibility. Set "label_style": "offset" on individual arrows when you want offset-first labels without background rects.
Optimization steps:
source / target pairsource_port / target_port if the exit/entry direction is wrong; add corridor_x / corridor_y to space parallel arrows apart; use route_points only when hints alone cannot resolve the pathgenerate-from-template.py with the updated JSON and validate with validate-svg.shExample — spacing two overlapping arrows into separate corridors:
{ "source": "nodeA", "target": "nodeB", "corridor_y": [280] }
{ "source": "nodeC", "target": "nodeD", "corridor_y": [320] }
Line Overlap Prevention (CRITICAL - common in AI-generated diagrams): When two arrows must cross each other, ALWAYS use jump-over arcs to prevent visual overlap:
Validation Checklist (run before finalizing):
text.length × 7px ≤ shape_width - 16px)filter="url(...)", verify (element_x + element_width + filter_extension) ≤ viewBox_width AND element_x ≥ filter_extension. The default filter region extends 10-20% beyond bbox; staying near viewBox edges causes Chrome/cairosvg to clip the element's edge-side stroke (one side of the border vanishes while other sides render correctly)validate-svg.sh automated checks)badge_y = first_arrow_y - (badge_height / 2). When appending new sections to an existing diagram, verify alignment matches the existing sections — this is the most common regression when adding content incrementally. Use variables in Python list generation to enforce the constraint: sec_y = 840; badge_y = sec_y - 9 # for height=18 badgemarker-start, marker-mid, and marker-end URL MUST resolve to a <marker id="..."> definition0 0 960 600 default; 0 0 960 800 tall; 0 0 1200 600 wide<style>font-family: ...</style> — no external @import (cairosvg / rsvg-convert cannot fetch external URLs)<defs>: arrow markers, gradients, filters, clip paths<marker> with markerEnd, sized markerWidth="10" markerHeight="7"<feDropShadow> in <filter>, apply sparingly (key nodes only)M x1,y1 C cx1,cy1 cx2,cy2 x2,y2 cubic bezier for loops/feedback arrows<clipPath> if text might overflow a node boxMANDATORY: Python List Method (ALWAYS use this):
python3 << 'EOF'
lines = []
lines.append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 700">')
lines.append(' <defs>')
# ... each line separately
lines.append('</svg>')
with open('/path/to/output.svg', 'w') as f:
f.write('\n'.join(lines))
print("SVG generated successfully")
EOF
Why mandatory: Prevents character truncation, typos, and syntax errors. Each line is independent and easy to verify.
Pre-Tool-Call Checklist (CRITICAL - use EVERY time):
If ANY answer is NO: STOP. Do NOT call the tool. Prepare the content first.
Error Recovery Protocol:
Validation (run after generation):
python3 -c "import xml.etree.ElementTree as ET; ET.parse('file.svg')" && echo "✓ Valid XML"
# Or use cairosvg as a render-time check:
python3 -c "import cairosvg; cairosvg.svg2png(url='file.svg', write_to='/tmp/test.png')" && echo "✓ Renders" && rm /tmp/test.png
If using generate-from-template.py:
source / target node ids in arrow JSON so the generator can snap to node edgesx1,y1,x2,y2 as hints or fallback coordinates, not the main routing primitiveCommon Syntax Errors to Avoid:
yt-anchor → ✅ y="60" text-anchor="middle"x="390 (missing y) → ✅ x="390" y="250"fill=#fff → ✅ fill="#ffffff"marker-end= → ✅ marker-end="url(#arrow)"L 29450 → ✅ L 290,220</svg> at endfilter near viewBox edge — filter region extends 20% (default) or more beyond bbox; if that region exceeds viewBox, Chrome/cairosvg clip the filter rendering AND can drop the element's own stroke on that side. Keep filtered elements at least max(20% of element size, shadow blur radius × 3) away from viewBox edges, or omit the filter../[derived-name].svg and ./[derived-name].png in current directory--output /path/ or 输出到 /path/$SKILL_ROOT/references/motion-effects.mdUse $SKILL_ROOT/scripts/generate-diagram.sh by default. Load $SKILL_ROOT/references/png-export.md only when selecting a renderer manually, handling CJK/emoji fallback, converting browser-generated SVG, or using the bundled Puppeteer converter.
| # | Name | Background | Best For |
|---|---|---|---|
| 1 | Flat Icon (default) | White | Blogs, docs, presentations |
| 2 | Dark Terminal | #0f0f1a |
GitHub, dev articles |
| 3 | Blueprint | #0a1628 |
Architecture docs |
| 4 | Notion Clean | White, minimal | Notion, Confluence, wikis |
| 5 | Glassmorphism | Dark gradient | Product sites, keynotes |
| 6 | Claude Official | Warm cream #f8f6f3 |
Anthropic-style diagrams |
| 7 | OpenAI Official | Pure white #ffffff |
OpenAI-style diagrams |
| 8 | Dark Luxury (AI-authored) | #0a0a0a deep black |
Architecture docs, premium editorial — hand-craft SVG from $SKILL_ROOT/references/style-8-dark-luxury.md |
| 9 | C4 Review Canvas | Warm paper #f7f2e8 |
C4 reviews and ADRs; enforces one abstraction level |
| 10 | Cloud Fabric | Cloud blue #edf5fb |
Region/network/workload deployment ownership |
| 11 | Event Transit | Transit paper #fbf7ee |
Topics, processors, consumer groups, DLQ, state |
| 12 | Ops Pulse | Ops navy #07111f |
Golden signals, critical paths, correlated traces |
Load the matching $SKILL_ROOT/references/style-N-*.md for exact color tokens and SVG patterns.
Default: Style 1 (Flat Icon) for most diagrams. Load $SKILL_ROOT/references/style-diagram-matrix.md for detailed style-to-diagram-type recommendations.
Prompt fingerprints: C4评审画布/C4 review board → 9; 多区域云部署/deployment topology → 10; 事件地铁图/event metro map → 11; 可靠性脉冲/golden signals trace → 12; 让这张图动起来/生成 GIF/制作 GIF/animate this diagram/Generate a GIF → auto motion.
Auto-select these only with matching domain evidence; otherwise use Styles 1–7 or semantic_profile: "generic", and split mixed C4/deployment/event/ops views.
These patterns appear frequently — internalize them:
RAG Pipeline: Query → Embed → VectorSearch → Retrieve → Augment → LLM → Response Agentic RAG: adds Agent loop with Tool use between Query and LLM Agentic Search: Query → Planner → [Search Tool / Calculator / Code] → Synthesizer → Response Mem0 / Memory Layer: Input → Memory Manager → [Write: VectorDB + GraphDB] / [Read: Retrieve+Rank] → Context Agent Memory Types: Sensory (raw input) → Working (context window) → Episodic (past interactions) → Semantic (facts) → Procedural (skills) Multi-Agent: Orchestrator → [SubAgent A / SubAgent B / SubAgent C] → Aggregator → Output Tool Call Flow: LLM → Tool Selector → Tool Execution → Result Parser → LLM (loop)
Stop drawing diagrams by hand. Describe your system in English or Chinese — get geometry-safe SVG, PNG, focused SVG-to-GIF motion, and offline interactive technical diagrams.
fireworks-tech-graph is one Agent Skill that works unchanged in Codex and Claude Code. It turns natural language descriptions into polished, geometry-checked SVG diagrams, high-resolution PNGs, validated SVG-to-GIF semantic motion, and offline interactive HTML. The focused animation path accepts a generated semantic SVG and emits one compact, probed GIF. It ships with 11 generator-backed styles and 1 AI-authored style (Dark Luxury). Four engineering-first styles add executable contracts for C4 reviews, cloud deployments, event streams, and reliability investigations, alongside deep AI/Agent domain patterns and all 14 UML diagram types.
User: "Generate a Mem0 memory architecture diagram, dark style"
→ Skill classifies: Memory Architecture Diagram, Style 2
→ Generates SVG with swim lanes, cylinders, semantic arrows
→ Exports 1920px PNG
→ Reports: mem0-architecture.svg / mem0-architecture.png
This project is also a proof surface for a broader capability: turning vague AI/devtool workflows into constrained, reusable systems with validation, documentation, export paths, and product-facing polish.
If you are building agent infrastructure, AI IDEs, internal copilots, developer tools, technical documentation systems, or applied AI workflow products, I am open to scoped paid sprints, design-partner work, and founding engineer conversations.
The animated previews use the user-approved 5.75-second settled-flow timeline: routes draw in first, then the final topology keeps live data moving for two additional seconds. Each full-size GIF is 960px wide at 20fps / 115 frames; the 3×4 overview is an optimized 1200px preview. Lossless 1920px PNGs remain in
assets/samples/as static regression baselines.

The v1.2.0 overview above and every full-size animated sample below come from the approved regression set. Each style keeps a distinct scenario while sharing the same geometry, text-fit, wire-routing, and semantic-motion quality gates.
Mem0 Memory Architecture — personal-memory extraction, conflict resolution, storage, and retrieval

Tool Call Flow — dark terminal execution, source grounding, retrieval, and answer synthesis

Microservices Architecture — engineering grid, domain services, data stores, events, and telemetry

Agent Memory Types — minimal hierarchy from sensory and working context to durable memory

Multi-Agent Collaboration — coordinator, specialists, shared state, review, and synthesis

System Architecture — warm interface, runtime, safety, memory, tools, and operations layers

API Integration Flow — clean SDK, prompt, model, tool, delivery, and release stages

Agent Runtime Architecture — control plane, execution and state layers, champagne-gold structure, semantic color buckets

Checkout Container Review — one abstraction level, explicit responsibilities, technologies, and protocols

Active–Active Checkout Deployment — global ingress, regions, VPC ownership, and cross-region replication

Checkout Event Line — topics as rails, processors as stations, a declared junction, DLQ, and state projection

Checkout Reliability Pulse — golden signals, one critical path, OTel export, and a correlated trace

The public showcase keeps a distinct domain scene for every style. They remain comparable because every fixture passes the same executable composition contract. A same-topology regression set remains internal under fixtures/quality-baseline/.
Draw the scenario assigned to style N:
1 Mem0 Memory Architecture; 2 Tool Call Flow; 3 Microservices Architecture;
4 Agent Memory Types; 5 Multi-Agent Collaboration; 6 System Architecture;
7 API Integration Flow; 8 Agent Runtime Architecture; 9 C4 Checkout Review;
10 Active–Active Cloud Deployment; 11 Checkout Event Line; 12 Checkout Reliability Pulse.
Preserve the scenario-specific nodes, sections, and reading direction.
Apply the showcase composition contract: zero crossings, zero bridge jumps, at most two bends per edge,
at most eight bends overall, at least 40px between nodes, at least 20px container gutter,
short orthogonal segments, and labels kept clear of nodes, routes, and section headers.
Preserve the selected style's typography, palette, card material, and brand details.
For the four engineering-first styles, use one of these prompt fingerprints so the router selects the domain contract as well as the visual theme:
Style 9 · C4 review board: show one C4 level, responsibilities, technologies, review state, and relationship protocols.
Style 10 · Multi-region deployment map: show global ingress, Region/VPC ownership, neutral cloud glyphs, deployment mode, and named boundary mechanisms.
Style 11 · Event metro map: show thin topic rails, numbered processor stations, declared junctions, consumer groups, DLQ, and state projections.
Style 12 · Reliability pulse: show one observation window, four golden signals per service, numbered critical hops, telemetry export, and one correlated trace.
Replace N with 1–12. Style 8 remains AI-authored and loads references/style-8-dark-luxury.md; Styles 9–12 also enforce their engineering semantic contract. All styles load references/composition-quality-contract.md.
+2s-settled-flow timing revision is also user-approved, so the default 5.75s/115-frame loop holds full settled flow on frames 38–109, then resets on