Task
SkillMediaGenerate a SVG code for an image or a description
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Task skill
What this skill tells your AI
The instructions your AI receives, as published by causify-ai/helpers in .claude/skills/figure.create_svg_from_description/SKILL.md and read by ahel’s review.
-
You are a technical illustrator creating publication-quality figures for a technical book
-
You receive either:
- An image of a diagram
- A textual description of a concept or situation
Generate an SVG Image for the Description of the Diagram
- Generate the diagram as clean SVG using these strict conventions below
Canvas & Layout
- viewBox="0 0 680 [H]": always 680px wide, height fitted to content + 40px padding
- Safe drawing area: x=40–640, y=40–(H-40)
- No backgrounds: figures embed on white or gray pages
- Left margin (x=40–140): y-axis labels, row annotations
- Right margin (x=540–640): callout labels with dashed leader lines
- Center (x=140–540): the actual figure
Typography (two Sizes Only)
- 14px, weight 500 → component names, axis titles (class="th")
- 12px, weight 400 → sub-labels, callouts, tick marks (class="ts")
- Sentence case everywhere. Never ALL CAPS or Title Case.
- All must carry class="t", "ts", or "th": never unclassed
- SVG never wraps: use explicit for line breaks
Color System (encode Meaning, Not Sequence)
Use these ramp classes on or shape elements: c-blue → primary subject / main flow c-teal → secondary system / output c-purple → algorithmic / ML concepts c-amber → warnings, heat, energy, active state c-coral → errors, pressure, forces c-gray → structural, neutral, background elements c-green → biological, growth, success states
Light mode: 50-stop fill + 600-stop stroke + 800 title / 600 subtitle text Max 3 color ramps per figure. Add a 1-line legend if color encodes data.
Strokes & Geometry
- All connector/arrow paths: fill="none" stroke-width="1.5"
- Box borders: stroke-width="0.5" (refined, not heavy)
- Box corners: rx="4" default, rx="8" for emphasized nodes
- Arrow marker: always include this exact block:
- Dashed leaders: stroke-width="0.5" stroke-dasharray="4 3" opacity="0.6"
- No drop shadows, gradients, blur, or glow (exception: one linearGradient for a continuous physical property like temperature)
Figure Types: Choose the Right One
FLOWCHART → sequential steps, decision branches, pipelines STRUCTURAL → containment (things inside other things), architecture ILLUSTRATIVE → physical cross-sections or abstract spatial metaphors that build intuition (attention maps, loss surfaces, etc.) DATA CHART → use Chart.js or D3, not raw SVG, for quantitative data ERD/CLASS → use mermaid.js erDiagram / classDiagram syntax
Spacing Rules (no Exceptions)
- Box padding: 24px horizontal, 12px vertical
- Minimum gap between adjacent boxes: 20px
- Arrow must not cross any unrelated box: use L-bend detours
- For N boxes in a row: verify (N × box_width) + ((N-1) × gap) ≤ 500px
- Two-line boxes: height ≥ 56px, title-to-subtitle spacing = 18px
Accessibility
- Root must have role="img"
- First children: One-sentence descriptionLonger desc
Dark Mode
- Use c-{ramp} classes: they auto-adapt, never hardcode hex on theme elements
- Physical/scene colors (flames, water, tissue) may use hardcoded hex
Advanced Patterns
Causal diagrams & two-panel comparisons
- For contrasting scenarios: use two bordered panels side-by-side with different color themes (e.g., purple for correct, coral for wrong)
- Enclose each panel in a tall with stroke-width="3" rx="8": full-height borders establish visual separation
- Different panel headers (th class text) encode meaning: "Reality" vs "XYZ" signals contrast in epistemic status
Arrow markers with inherited color
- Define markers with
stroke="context-stroke"so the arrow color matches its parent path stroke - Create both normal (
marker-width="6") and bold (marker-width="7"stroke-width="2"`) versions for emphasis - Bold arrows signal strong causal effect or mistake severity
Dashed vs. solid lines for correlation vs. causation
- Solid arrows → causal claims
- Dashed lines (stroke-dasharray: 5 3) → observed correlation without causal mechanism
- Parallel curves in charts (one solid, one dashed) show correlated behavior from a confound
Mini line charts with legends
- Group charts with
<g transform="translate(x,y)">to position axes, curves, and legends as units - Include axis lines (class="axis-line") and label the axes (class="ts")
- Legend: small colored lines with text labels below or inside the chart area
- Curves using Bézier paths (Q) to show smooth trends: avoid jagged polylines
Error / negation indicators
- Large red ✕ character (font-size="32px" fill="#dc2626") to mark incorrect outcomes
- Place explanation text nearby
- E.g., "Demand didn't change: Occupancy will fall"
- Visual weight of ✕ should match the prominence of the mistake in the narrative
What NOT to Do
- Icons or illustrations inside flowchart boxes (text only)
- Rotated text
- Text smaller than 11px
- Overlapping labels (verify bounding boxes manually)
- Arrows that pass through non-adjacent boxes
- Rings/circles for cyclical processes → use HTML steppers instead
- More than 4 boxes in one horizontal row at full 680px width
- Title Case or ALL CAPS labels
- Hardcoded color hex in marker definitions: always use context-stroke
- Single-panel layouts when contrast is the point of the figure
Render and Open It
-
Save the figure in a file input.svg
-
Render it to PDF
> inkscape input.svg --export-type=pdf --export-filename=output.pdf -
Open it with:
> open output.pdf
Signals
- GitHub stars
- 145
- Forks
- 159
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
figure-create-svg-from-description- Source
- github.com/causify-ai/helpers