svg-primitives

svg-primitives is a skill for Claude Code from neuromechanist/research-skills. It costs 126 tokens per session (3,928 once invoked), scanned A, original, BSD-3-Clause.

A Python toolkit for building precise SVG schematics such as flowcharts, diagrams, and box-and-arrow layouts.

In plain words
What is it for?
Use it to generate data-driven SVG diagrams with auto-sized boxes, routed arrows, annotations, groupings, and predictable drawing order.
Why use it?
It prevents labels from overflowing, curved arrowheads from pointing incorrectly, and connectors from appearing in the wrong layer.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python plugins/figures/agents/figure-qa-scripts/check_svg.py \.

Part of the figures plugin — 8 skills, 1 agent shipped together

Good fit Use it to generate data-driven SVG diagrams with auto-sized boxes, routed arrows, annotations, groupings, and predictable drawing order.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/neuromechanist/research-skills
agentmods
npx agentmods add skills/neuromechanist/research-skills/svg-primitives

Made for: Claude Code.

Or install figures, the plugin that ships this one along with the rest of its 8 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for svg-primitives

README.md
[![agentmods](https://agentmods.dev/badge/skills/neuromechanist/research-skills/svg-primitives/github.svg)](https://agentmods.dev/skills/neuromechanist/research-skills/svg-primitives)
Your own site
<a href="https://agentmods.dev/skills/neuromechanist/research-skills/svg-primitives"><img src="https://agentmods.dev/badge/skills/neuromechanist/research-skills/svg-primitives/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for svg-primitives

Your own site · 80×15
<a href="https://agentmods.dev/skills/neuromechanist/research-skills/svg-primitives"><img src="https://agentmods.dev/badge/skills/neuromechanist/research-skills/svg-primitives.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,928 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00126 $0.03928
Opus 5.5 $0.00050 $0.01571
Sonnet 5.5 $0.00025 $0.00786
Haiku 4.5 $0.00013 $0.00393

Measured 2mo ago against content hash 419db54fe526, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

svg-primitives scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

The scan reads SKILL.md. This mod also ships 16 executable files (examples/bracketed_grouping.py, examples/eeg_pipeline.py, examples/orthogonal_flowchart.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/figures/skills/svg-primitives/SKILL.md · 260 lines

How it starts

The opening of the file, as written. The whole thing — 260 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SVG Primitives

Build mm-precise SVG schematics in Python with three mechanical guarantees:

  1. Text never overflows its container — labeled shapes auto-size to fit measured text bbox + padding.
  2. Arrowheads stay tangent-correct — arrows emit <marker orient="auto"> so the renderer rotates the head along the path's terminal tangent; works on straight lines and cubic Beziers.
  3. Paint order is deterministic — layers paint in registration order; connectors visibly pass under boxes without manual reordering.

The skill ships an end-to-end pytest suite (50+ tests) that renders SVGs and asserts these invariants on the rendered output, so the guarantees are enforced by construction rather than by hand-checking each figure.

When to use this skill

Reach for svg-primitives when:

  • The figure is a schematic (boxes, arrows, labels) and you're driving it from Python — e.g. nodes come from a YAML config, or the layout depends on data.
  • You need the boxes to auto-fit their labels (no hand-tuning widths).
  • The figure has curved arrows that must point cleanly at their targets.
  • You want deterministic z-order so connectors sit under shapes without manual element reordering.
  • The output will be composed into a multi-panel figure as a panel SVG that scientific-figure/compose.py loads.

Reach for a different tool when:

  • The figure is plotted from numbers (matplotlib/seaborn/plotnine) → use figures:plot-styling.
  • The figure is a photographic / pictorial substrate (a brain scene, microscope setup) → use figures:ai-full-figure for the substrate and overlay labels via Arrow/LabeledBox here.
  • The figure is hand-authored SVG or the patterns are reference material for hand-authoring → use figures:svg-figure (this skill's library-agnostic counterpart).

Quick start

from svg_primitives import Canvas, LabeledBox, Arrow

c = Canvas(width_mm=183, height_mm=80)
boxes = c.layer("boxes")
arrows = c.layer("connectors")

raw = boxes.add(LabeledBox(x=10, y=20, text="Raw EEG", font_size=7))
band = boxes.add(LabeledBox.next_to(raw, side="E", gap=10, text="Bandpass\nfilter", font_size=7))
ica = boxes.add(LabeledBox.next_to(band, side="E", gap=10, text="Independent component\nanalysis", font_size=7))

arrows.add(Arrow.connect(raw, band))                          # straight, snapped to edges
arrows.add(Arrow.connect(band, ica))                          # straight
arrows.add(Arrow.connect(ica, raw, curve="cubic", bow=14,     # feedback arc
                          stroke="#C45146"))                  # red — gets its own red marker

c.save("eeg.svg", output_png=True)

Read the full file on GitHub · 260 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +2 lines 419db54fe526
  2. 3mo ago First seen · 258 lines · 126 tokens per session scan A 0284fbc08b48

Subscribe to this mod's changes

svg-primitives is a skill published in the GitHub repository neuromechanist/research-skills (61 stars, last pushed 9d ago), licensed BSD-3-Clause. It adds 126 tokens to every session and 3,928 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

svg-primitives compared with skills from other repositories

svg-primitives next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
svg-primitivesneuromechanist/research-skillsSkill619d agoBSD-3-ClauseA126Claude Code
skill-design-lineagenyldn/claude-octopusSkill4.5ktodayMITA19Claude Code
top-designwondelai/skillsSkill2.8k8d agoMITA113Claude Code, Codex
design-everyday-thingswondelai/skillsSkill2.8k8d agoMITA132Claude Code
ability-systemjame581/GodotPrompterSkill1.0ktodayMITA37Claude Code
animation-systemjame581/GodotPrompterSkill1.0ktodayMITA27Claude Code
assets-pipelinejame581/GodotPrompterSkill1.0ktodayMITA29Claude Code