Skip to content

Spoon94/skill-vault / diagram/diagram-image

diagram-image

Unverified

Create precise SVG technical diagrams, export PNG or offline HTML, and animate supported semantic SVGs to GIF. Use for architecture, UML, agent, cloud or workflow diagrams; not photos, raster art or statistical charts.

FileKindSize
LICENSEother1.1 KB
README.mdmarkdown39.6 KB
README.zh.mdmarkdown37.2 KB
SKILL.mdskill md5.5 KB
assets/icons/cloud/manifest-v1.jsonconfig1.6 KB
assets/samples/sample-style1-flat.gifbinary263.0 KB
assets/samples/sample-style1-flat.pngbinary208.9 KB
assets/samples/sample-style10-cloud-fabric.gifbinary332.8 KB
assets/samples/sample-style10-cloud-fabric.pngbinary265.7 KB
assets/samples/sample-style11-event-transit.gifbinary180.2 KB
assets/samples/sample-style11-event-transit.pngbinary221.1 KB
assets/samples/sample-style12-ops-pulse.gifbinary348.5 KB
assets/samples/sample-style12-ops-pulse.pngbinary257.9 KB
assets/samples/sample-style2-dark.gifbinary379.3 KB
assets/samples/sample-style2-dark.pngbinary266.4 KB
assets/samples/sample-style3-blueprint.gifbinary276.8 KB
assets/samples/sample-style3-blueprint.pngbinary231.0 KB
assets/samples/sample-style4-notion.gifbinary206.4 KB
assets/samples/sample-style4-notion.pngbinary140.2 KB
assets/samples/sample-style5-glass.gifbinary367.9 KB
assets/samples/sample-style5-glass.pngbinary247.5 KB
assets/samples/sample-style6-claude.gifbinary240.9 KB
assets/samples/sample-style6-claude.pngbinary198.2 KB
assets/samples/sample-style7-openai.gifbinary161.4 KB
assets/samples/sample-style7-openai.pngbinary166.5 KB
assets/samples/sample-style8-dark-luxury.gifbinary229.3 KB
assets/samples/sample-style8-dark-luxury.pngbinary130.8 KB
assets/samples/sample-style9-c4-review-canvas.gifbinary200.8 KB
assets/samples/sample-style9-c4-review-canvas.pngbinary254.2 KB
assets/samples/showcase-12-styles.gifbinary996.5 KB
assets/samples/showcase-12-styles.pngbinary630.6 KB
assets/samples/showcase-gif-manifest.jsonconfig4.0 KB
assets/sponsors/aigocode.pngbinary61.7 KB
fixtures/agent-memory-types-style4.jsonconfig3.8 KB
fixtures/api-flow-style7.jsonconfig4.3 KB
fixtures/c4-review-canvas-style9.jsonconfig4.6 KB
fixtures/cloud-fabric-style10.jsonconfig5.2 KB
fixtures/dark-luxury-style8.svgother9.5 KB
fixtures/event-transit-style11.jsonconfig5.3 KB
fixtures/mem0-style1.jsonconfig4.5 KB
fixtures/microservices-style3.jsonconfig5.6 KB
fixtures/multi-agent-style5.jsonconfig4.9 KB
fixtures/ops-pulse-style12.jsonconfig6.5 KB
fixtures/quality-baseline/agent-runtime-style1.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style10.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style11.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style12.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style2.jsonconfig3.3 KB
fixtures/quality-baseline/agent-runtime-style3.jsonconfig3.5 KB
fixtures/quality-baseline/agent-runtime-style4.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style5.jsonconfig3.3 KB
fixtures/quality-baseline/agent-runtime-style6.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style7.jsonconfig3.2 KB
fixtures/quality-baseline/agent-runtime-style9.jsonconfig3.2 KB
fixtures/system-architecture-style6.jsonconfig4.8 KB
fixtures/tool-call-style2.jsonconfig4.4 KB
references/composition-quality-contract.mdmarkdown4.2 KB
references/diagram-layout-reference.mdmarkdown23.9 KB
references/icons.mdmarkdown14.4 KB
references/motion-effects.mdmarkdown21.9 KB
references/png-export.mdmarkdown2.1 KB
references/style-1-flat-icon.mdmarkdown3.0 KB
references/style-10-cloud-fabric.mdmarkdown3.6 KB
references/style-11-event-transit.mdmarkdown3.2 KB
references/style-12-ops-pulse.mdmarkdown3.0 KB
references/style-2-dark-terminal.mdmarkdown2.8 KB
references/style-3-blueprint.mdmarkdown3.2 KB
references/style-4-notion-clean.mdmarkdown2.8 KB
references/style-5-glassmorphism.mdmarkdown3.6 KB
references/style-6-claude-official.mdmarkdown6.8 KB
references/style-7-openai.mdmarkdown6.7 KB
references/style-8-dark-luxury.mdmarkdown7.5 KB
references/style-9-c4-review-canvas.mdmarkdown3.3 KB
references/style-diagram-matrix.mdmarkdown9.2 KB
references/svg-layout-best-practices.mdmarkdown4.1 KB
references/visual-quality.mdmarkdown2.5 KB
schemas/architecture-v1.schema.jsonconfig288 B
schemas/diagram-v1.schema.jsonconfig6.9 KB
schemas/sequence-v1.schema.jsonconfig280 B
schemas/workflow-v1.schema.jsonconfig308 B
scripts/README.mdmarkdown11.4 KB
scripts/composition_quality.pyscript9.4 KB
scripts/diagram_ir.pyexecutablescript8.4 KB
scripts/export-interactive-html.pyexecutablescript182 B
scripts/fireworks.pyexecutablescript10.4 KB
scripts/fireworks_geometry.pyexecutablescript13.9 KB
scripts/generate-diagram.shexecutablescript4.1 KB
scripts/generate-from-template.pyexecutablescript154.5 KB
scripts/interactive_html.pyexecutablescript16.3 KB
scripts/motion.pyscript102.7 KB
scripts/png_export.pyscript3.0 KB
scripts/renderer_runtime.jsscript2.6 KB
scripts/semantic_contracts.pyscript30.3 KB
scripts/style_quality.pyscript3.2 KB
scripts/svg2gif.jsscript153.5 KB
scripts/svg2png.jsexecutablescript3.0 KB
scripts/svg_canvas.pyscript3.2 KB
scripts/test-all-styles.shexecutablescript5.8 KB
scripts/validate-svg.shexecutablescript3.5 KB
scripts/validate_svg.pyscript38.6 KB
templates/agent-architecture.svgother1.3 KB
templates/architecture.svgother1.0 KB
templates/comparison-matrix.svgother612 B
templates/data-flow.svgother1.3 KB
templates/er-diagram.svgother1003 B
templates/flowchart.svgother860 B
templates/sequence.svgother856 B
templates/state-machine.svgother846 B
templates/timeline.svgother832 B
templates/use-case.svgother947 B
---
name: diagram-image
description: >-
  Create precise SVG technical diagrams, export PNG or offline HTML, and animate
  supported semantic SVGs to GIF. Use for architecture, UML, agent, cloud or
  workflow diagrams; not photos, raster art or statistical charts.
---

# Fireworks Tech Graph

One portable Agent Skill for Codex and Claude Code. SVG is the canonical artifact;
PNG, offline HTML and supported GIF motion are output routes. Preserve requested
labels, topology and meaning; a successful command is not a visual quality verdict.

## Locate and select

Resolve the directory containing this file as `SKILL_ROOT`. Use
`${CLAUDE_SKILL_DIR}` in Claude Code or the absolute directory in Codex's loaded
skill metadata. Do not assume cwd or a previous shell variable persists.

Use the installed version for the task. Run `version` for source/version questions
and `doctor` when diagnosing a missing renderer, font or dependency; do not make
installation, updates or a complete test suite prerequisites for every diagram.

```bash
SKILL_ROOT="${CLAUDE_SKILL_DIR:-/absolute/path/from-codex-skill-metadata}"
python3 "$SKILL_ROOT/scripts/fireworks.py" version
```

- Honor the user's diagram type, content and style; choose sensible reversible
  details from the brief. Ask only for a material missing engineering fact or
  a choice the user explicitly reserved. A request to draw includes local rendering.
- Styles 1–7 and 9–12 have JSON generators. Style 8 (Dark Luxury) remains
  AI-authored SVG: use its style reference, then the same validation/export gates.
- Default to Style 1 Flat Icon when no user/workspace preference applies. Load the
  actual matching file from [the style matrix](references/style-diagram-matrix.md).
  Read other styles only for a requested comparison.
- Styles 9–12 default to C4, cloud, event and observability semantic contracts.
  Validate facts before layout; do not invent responsibilities, protocols or metrics.
- Adapt an existing valid SVG directly when appropriate. JSON generation is not
  required for every edit. Use [diagram/layout guidance](references/diagram-layout-reference.md)
  and [icons](references/icons.md) only for the relevant type or symbols.

## Generate and check

Reuse the user's current brief and artifact; an extra planning document is optional.
For JSON work, select `text_policy: "strict"` when all labels must be visible exactly.
The compatible `report` default preserves full labels in SVG metadata and reports
any visible truncation. Resolve that warning before claiming complete exact text.
For polished work apply the [composition contract](references/composition-quality-contract.md).

```bash
SKILL_ROOT="${CLAUDE_SKILL_DIR:-/absolute/path/from-codex-skill-metadata}"
python3 "$SKILL_ROOT/scripts/fireworks.py" validate architecture input.json
python3 "$SKILL_ROOT/scripts/fireworks.py" render architecture input.json diagram.svg --report layout.json
python3 "$SKILL_ROOT/scripts/fireworks.py" check diagram.svg
python3 "$SKILL_ROOT/scripts/fireworks.py" export-png diagram.svg diagram.png --width 1920
```

`check` validates SVG identity, marker references, generic collisions, semantic
geometry and composition. Inspect the report's typography and palette scope;
heuristic text widths do not replace inspecting the actual rendered font.
Use [visual quality guidance](references/visual-quality.md) for readability and
style-specific refinements. Keep one semantic connector per business edge.

## Additional outputs

- **PNG:** prefer `export-png`, which reads root canvas dimensions, limits output
  size, writes atomically and reads the PNG dimensions back. Alternate renderer
  details are in [PNG export](references/png-export.md).
- **HTML:** `fireworks.py export-html diagram.svg diagram.html`. One sanitized
  offline file provides pan/zoom, source copy and static image downloads.
- **GIF:** “Generate a GIF”, “Animate this diagram”, “生成 GIF”, “制作 GIF” and
  “让这张图动起来” select the existing semantic SVG's motion route. Styles 1–12 are enabled
  for the documented scene contracts; arbitrary same-style topologies are not
  promised. Load [motion effects](references/motion-effects.md) and run
  `fireworks.py animate diagram.svg diagram.gif`. Default is 960px, 20fps, 5.75s
  with the `+2s-settled-flow` preset and a `.motion.json` report. Historical
  `user-approved` fields describe maintainer-reviewed presets, not authorization
  from the current user to publish, spend or send data.

## Verify the requested outcome

Inspect the final PNG at intended reading size when image viewing is available:
check text completeness, contrast, font substitution, hierarchy, spacing, clipping,
arrow direction, crossings and labels. Preserve style palette and material while
fixing defects. Reuse an unchanged reviewed render; do not keep adding tests or
polish after acceptance passes. If viewing is unavailable, explicitly mark the
visual check skipped and do not claim visual correctness.

After a failed check, use its element IDs and geometry to make a focused repair;
change the approach after two unchanged failures. Widen/split an overfull diagram
instead of hiding required copy or endlessly shrinking type. Do not silently
weaken semantic or composition constraints to obtain a pass.

Complete every requested local output and its applicable checks, then report file
paths, dimensions, visual review and residual limitations. A first SVG does not
complete a requested PNG/GIF/HTML package. Publication or remote delivery requires
its own scope-matching authorization; existing authorization is not requested twice.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall