| name | svg-metric-story |
| description | Generate a single-file SVG metric story for Chinese technical reports when the goal is a conclusion-first static chart, not a general plotting library. Use it for fixed-layout outputs with summary cards, 1-2 bar-chart panels, and a bottom-line conclusion. |
SVG Metric Story
Use this skill when the user wants a single SVG that already looks like a report slide snapshot:
- Chinese title and subtitle
- Top summary cards
- Middle 1-2 bar-chart panels
- Bottom conclusion sentence
Do not use this skill for generic charting, arbitrary dashboards, or interactive SVG work. The point is a stable narrative template with explicit inputs.
Workflow
- Read references/layout-rules.md to confirm the schema and layout limits.
- Prepare a small JSON payload with explicit
title, cards, panels, and conclusion.
- Render with:
python3 scripts/render_metric_story_svg.py examples/minimal-input.json examples/minimal-output.svg
- If two metrics differ greatly in scale or use different units, split them into two panels and set independent
y_max.
Notes
- Keep text short. The script uses deterministic wrapping and truncation instead of smart reflow.
- Prefer explicit
value_label, note, and delta_label. The script does not infer business meaning.
- Example files live in
examples/.