/diagram-studio:compose-synchronized-svgfrom diagram-studio
Designs, builds, synchronizes, and validates giant standalone SVG compositions made from many related diagrams, charts, maps, schematics, illustrations, and explanatory assets. Use when Codex must turn one idea into a coherent 6–16-module megacanvas or a 12–48-module navigable world such as a Path of Exile-style skill tree, giant genealogy, causal atlas, or linked-diagram map; keep recurring concepts visually consistent; propagate canonical values through every relevant view; coordinate focus, time, world-to-district-to-module semantic zoom, or a deterministic camera route for video; and deliver one self-contained interactive SVG with meaningful static and reduced-motion fallbacks.
Ships in diagram-studio. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read palette-policy.md before authoring or composing visuals. Apply one exact colorset to authored content and report preserved source media separately. Read solid-surfaces.md for solid-first category fills, black/white text on the actual fill, and palette exhaustion before border variants.
Build one explanatory SVG whose recurring values come from one canonical state. Give each module a distinct viewer question. Semantic propagation is required; animation is optional.
Default connected diagrams to the smallest readable footprint and shortest clear routes. Preserve labels, visible shafts/heads, distinct lanes and attached endpoints at every relevant state and zoom tier. Apply the compaction pass in asset-selection-and-composition.md; preserve quantitative chart reading space.
Read arrow-visibility.md when producing, importing or reviewing directional arrows. Audit actual shafts/heads at delivery scale.
theme roles, pair text with its actual local background, and preserve canonical concept paints through regeneration.Keep generated briefs, plans, SVGs, reports, and screenshots outside the read-only skill bundle. During normal generation, use the named resources and executable scripts without inspecting helper source, enumerating the bundle, probing for README/package manifests, or loading acceptance examples or sibling skills. The bundle uses uv Python and needs no Node project. Explicit skill maintenance may inspect the affected source and tests.
State the thesis, audience, delivery context, and evidence status. Choose distinct claims and honest encodings before geometry. Label assumptions and synthetic values in a visible provenance note. Use exactly en-US for deterministic literal/browser formatting.
Write one complete brief from the selected template. Let the compiler generate regions, anchors, selectors, identities, transforms, reading order, and exact omitted phase/route times. Do not copy, read, or hand-edit the advanced composition-plan.json template during normal use.
Before writing, check these authoring invariants:
fraction in 0..1 and percentage points as percent in 0..100. Use documented pure computation nodes; omit dependsOn, which the compiler derives. Model every possible zero divisor explicitly with max/clamp or choose a finite alternative.selectionRationale and rejectedAlternative. Use the supported renderer-family tokens documented in the selection reference; anonymous metric cards are not semantic renderers.title. For palette or brand requests, set top-level theme using the color reference. Keep labels and non-color cues; reject incompatible colors explicitly instead of silently replacing them.stackTotal. Flows put one conserved same-unit source first, followed by mutually exclusive branches. Waterfalls reconcile opening minus sign-stable deduction magnitudes to ending without clamping.module.diagram must be connected, use supported kinds, and bind each numeric module value exactly once.focusGroups; every phase focusId must resolve there. Use timeline: null unless time explains the subject. A looping timeline must return to the initial values, focus, and marks at durationMs.Replace <skill-root> with this bundle's path and choose exact workspace output paths. In Git Bash on Windows, first create .tmp in the workspace with mkdir -p .tmp and prefix bundled uv run commands with TMPDIR="$(pwd)/.tmp". Do not rely on /tmp outside the workspace. Commands below are single lines so they work without shell-specific continuations.
After each complete brief write, make preflight the first external command; do not reread the brief or run a speculative linter/help probe first:
uv run --script <skill-root>/scripts/preflight_svg_brief.py --brief composition-brief.json --json
Expected authoring findings exit zero. Inspect ok; if false, rewrite the complete brief and repeat preflight. Only ok: true permits publishing a plan:
uv run --script <skill-root>/scripts/compile_synchronized_svg_plan.py --brief composition-brief.json --output composition-plan.json --force --json
uv run --script <skill-root>/scripts/compose_synchronized_svg.py --spec composition-plan.json --output <exact-output.svg> --report <composition-report.json> --force --json
Preserve any reported divisor-domain normalization. Use this compiler/composer pair for normal generation. It creates the canonical runtime, final module geometry, literal fallback, and optional navigation atomically. Specialized asset names still map to eight renderer families; do not count every asset name as a distinct renderer. Improve claims, values, asset choices, domains, focus, or districts in the brief and regenerate; do not patch the monolithic SVG or create a second wrapper.
Use scaffold/replacer tools only for explicitly requested bespoke module geometry. In that mode, consult their help and the compiled-binding contract, preserve the body-local shell, and never rewrite the full SVG.
Read critique-and-validation.md before the first review. Run static validation with the counts required by the accepted brief:
uv run --script <skill-root>/scripts/validate_synchronized_svg.py <exact-output.svg> --output <static-validation.json> --json --min-modules <module-count> --min-asset-types <asset-type-count> --min-renderer-families <family-count> --min-shared-sources 1 --min-modules-per-shared-source 2 --min-encodings-per-shared-source 2
Never use --allow-placeholders for a deliverable. Add --require-time-sync only for a declared timeline. In world mode, also add --require-navigation --min-navigation-regions 4 --min-anchor-depth 2 --min-world-detail-area-ratio 16 --min-distant-shared-sources 1, or stricter accepted minima.
Run one supervised browser audit:
uv run --script <skill-root>/scripts/audit_synchronized_svg.py <exact-output.svg> --report <browser-audit.json> --screenshot <overview.png> --compact-report
Use the compact report and rendered screenshot as the normal evidence surface. Inspect local text contrast, including controls and focus states; a passing palette check alone is insufficient. The auditor already handles containment, a finite worker timeout, and one internal timeout retry; do not add an external retry loop. Static validation and browser propagation are blocking gates. If Chromium is unavailable, retain static results and report browser validation as incomplete.
Review hierarchy, claim/asset fit, connectors, readability, literal fallback, and reduced-motion behavior against the reference rubric. A fitted overview proves structure, not readable module detail. Release-grade work also needs readable module crops and materially different states; worlds need district views plus route arrivals/midpoints. Require two consecutive clean reviews with fresh evidence. Use direct browser interactions only when requested acceptance goes beyond the bundled audit.
For visual improvement work, freeze one brief, generate and critique its actual screenshots, fix the responsible input or reusable generator, and compare a regenerated version using the same data. Then check a fresh topic. Follow the color reference's generation–critique loop and retain failures; structural validation alone cannot establish visual quality.
For compact-plan detail inspection, create module crops at the overview's actual
pixel scale with the command in critique-and-validation.md.
It declares Pillow through uv; do not assume a bare Python environment inherits
the auditor's dependencies. World detail uses the browser audit's anchor crops.
For actionable semantic, quantitative, geometry, accessibility, relationship, or navigation findings, revise the brief, preflight, and rerun compiler → composer → validator → audit. For runtime-api, real-input-controls, navigation-input-controls, worker, timeout, or playback-timing failures, or an identical repeated check, preserve the exact check ID/message and report a generator/auditor defect. Do not weaken semantics, tune timing to evade a mechanical check, inspect implementation internals during normal generation, or hide the failure.
Deliver the exact SVG and concise evidence of passing gates. Preserve its brief, compiled plan, reports, and screenshots alongside it unless the user requests only the SVG. Claim completion only when synchronization and unrelated-value isolation, truthful encodings, accessible marks/controls, meaningful script-free and reduced-motion states, required navigation, and visual reviews all pass.
agents/openai.yaml (opens in a new tab)assets/examples/compose-synchronized-svg/composition-brief.json (opens in a new tab)assets/examples/compose-synchronized-svg/heatwave-tree-brief.json (opens in a new tab)assets/examples/compose-synchronized-svg/heatwave-tree.svg (opens in a new tab)assets/examples/compose-synchronized-svg/index.html (opens in a new tab)assets/examples/compose-synchronized-svg/inference-pulse.svg (opens in a new tab)assets/examples/compose-synchronized-svg/scripts/regenerate.py (opens in a new tab)assets/palettes/colorsets.json (opens in a new tab)assets/templates/composition-brief.json (opens in a new tab)assets/templates/composition-plan.json (opens in a new tab)assets/templates/navigable-world-brief.json (opens in a new tab)references/arrow-visibility.md (opens in a new tab)references/asset-selection-and-composition.md (opens in a new tab)references/color-and-visual-quality.md (opens in a new tab)references/compiled-plan-and-bindings.md (opens in a new tab)references/critique-and-validation.md (opens in a new tab)references/palette-policy.md (opens in a new tab)references/runtime-api.md (opens in a new tab)references/semantic-state-contract.md (opens in a new tab)references/solid-surfaces.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gvillarroel/plugins --plugin diagram-studio11 skills in this plugin
/d3Creates, animates, inspects, recomposes, and validates D3-powered HTML and SVG visuals. Use for custom charts, simulations, linked views, visual audits, parametric logos, textures, and portable SVG that need data-driven geometry, joins, layouts, or transitions./diagram-compositionDecomposes a complex idea into related subdiagrams, chooses suitable visual forms, and composes a compact page with explicit grid spans, consistent semantic colors, readable text, shared SVG icons, and meaningful cross-panel connections. Use for dense explanatory figures, architecture plates, visual comparisons, and multi-panel diagrams that need semantic planning before layout; coordinate available diagram and icon skills without requiring them./echarts-animated-svgAnimates already-rendered Apache ECharts SVG output and builds replayable SVG galleries. Use when Codex needs to render ECharts charts with SVGRenderer or SSR, post-process the resulting SVG instead of rebuilding chart geometry, choose chart-type-specific SVG animation profiles for ECharts chart types, or create an HTML index with controls to replay or restore chart animations./hierarchy-lensBuilds offline interactive hierarchies with decision-driven pixel composition, compact organic cells, radial heatmaps, or labeled charts. Use for organizational maps, portfolios, or taxonomies needing explicit placement priorities, proximity rules, step-by-step growth, switchable color lenses, and exact record lookup./lucidchart-svgExports Lucidchart diagrams to SVG, inserts SVG artwork into Lucidchart, and reconstructs SVG diagrams as editable Lucid shapes and connectors. Use for Lucidchart SVG downloads, uploads, conversions, and fidelity checks./mermaidCreates, selects, styles, renders, validates, and animates Mermaid diagrams from prose or structured data, including verified accessible title and description metadata for newly authored work. Use when Codex must honor or infer an appropriate Mermaid family; preserve workflows, schedules, schemas, hierarchies, interactions, behavioral contracts, tabular data, or quantitative facts; simplify or audience-adapt an existing diagram with an explicit fidelity ledger; apply colorset1 as the standard palette or colorset2 only when extended/full-color styling is explicitly requested; restyle Mermaid files or Markdown fences; render static SVG; or produce faithful animated SVG.