svg-primitives

svg-primitives is a skill for Claude Code from neuromechanist/research-skills. It costs 126 tokens per session (3,871 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 — 7 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 7 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,871 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.03871
Opus 5 $0.00063 $0.01936
Sonnet 5 $0.00025 $0.00774
Haiku 4.5 $0.00013 $0.00387

Measured 12d ago against content hash 0284fbc08b48, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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 · 258 lines

How it starts

The opening of the file, as written. The whole thing — 258 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 [[plot-styling]].
  • The figure is a photographic / pictorial substrate (a brain scene, microscope setup) → use [[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 [[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 · 258 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. 12d 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 (45 stars, last pushed 10d ago), licensed BSD-3-Clause. It adds 126 tokens to every session and 3,871 once invoked, about $0.0006 per session on Opus 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

Other skills, from other repositories

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

skill-design-lineage

Persist design documents with branch tracking, revision chains, and cross-session discovery.

nyldn/claude-octopus · 19 tokens

top-design

Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…

wondelai/skills · 113 tokens

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

infographics

Create professional infographics using Nano Banana Pro AI with smart iterative refinement. Uses Gemini 3 Pro for quality review. Integrates research-lookup and web search for accurate data. Supports 10 infographic types, 8 industry styles, and colorblind-safe palettes.

foryourhealth111-pixel/Vibe-Skills · 55 tokens

figma-implement-design

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma specs. Requires a…

foryourhealth111-pixel/Vibe-Skills · 76 tokens