figure-sonnet

figure-sonnet is an agent for Claude Code from yacb2/aidex. It costs 0 tokens per session (1,024 once invoked), scanned A, original, MIT.

An SVG figure writer that turns a supplied specification into a screen mockup or wireframe. SVG is a web image format that keeps shapes and text sharp at different sizes.

In plain words
What is it for?
It creates one self-contained SVG for an artifact page, such as a compact interface mockup or screen layout.
Why use it?
It removes the need to draw the figure manually while enforcing the named labels, layout limits, and visual style files in the specification.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the aidex plugin — 22 skills, 30 agents, 5 hooks shipped together

Good fit It creates one self-contained SVG for an artifact page, such as a compact interface mockup or screen layout.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/yacb2/aidex/figure-sonnet
View source ↗ yacb2/aidex
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/yacb2/aidex

Made for: Claude Code.

Or install aidex, the plugin that ships this one along with the rest of its 22 skills, 30 agents, 5 hooks.

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 figure-sonnet

README.md
[![agentmods](https://agentmods.dev/badge/agents/yacb2/aidex/figure-sonnet/github.svg)](https://agentmods.dev/agents/yacb2/aidex/figure-sonnet)
Your own site
<a href="https://agentmods.dev/agents/yacb2/aidex/figure-sonnet"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/figure-sonnet/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 figure-sonnet

Your own site · 80×15
<a href="https://agentmods.dev/agents/yacb2/aidex/figure-sonnet"><img src="https://agentmods.dev/badge/agents/yacb2/aidex/figure-sonnet.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,024 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.
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.00000 $0.01024
Opus 5.5 $0.00000 $0.00410
Sonnet 5.5 $0.00000 $0.00205
Haiku 4.5 $0.00000 $0.00102

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

Security

Grade A, and why

figure-sonnet 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 2d ago.

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.

agents/figure-sonnet.md · 11 lines

What it actually says

Figure writer

You receive a figure spec file and an output path. Your first step is the spec's "Files to read first" section: read every file it names — always the kit tokens, and for a mockup the application's stylesheet — before drawing anything. Then write ONE SVG file at the output path: viewBox of the width the spec gives and the height the layout needs, no external fonts or images, font-family: system-ui, sans-serif, labels in the spec's language, arrows with a marker in <defs>, every label fully inside its box (estimate 7.5px per character at 13px; widen boxes, never shrink text below 12px), only the labels the spec gives. Draw at display size: the page shows the SVG at most at its viewBox width, never larger, so 13px in the file is 13px on screen; keep text 12-14px, padding tight (boxes about 12px larger than their text on each side), and a short linear chain (up to ~5 short labels) as one compact row or a column no taller than ~400 viewBox units, never one box per screen. Height cap: the viewBox height stays at or under 500 units, the page checker's figure-tall limit, whatever height a brief allows; a screen or wireframe that does not fit is delivered as several figures of at most 480 units each (for example the top and the bottom of the page), never one tall figure. Colours come from the kit's tokens, never from hex values: read assets/artifact-kit/tokens.css under the artifact skill's directory (the spec names it) first and use var(--…) for fills and strokes and currentColor for text, so the figure follows the page's light or dark theme. If you need CSS, put it in a <style> inside the SVG and prefix every selector with the SVG's own id. For a screen mockup or wireframe of an application, the spec names the application's stylesheet: read it and reuse its colours and spacing through its own variables where possible. Run the gate command the spec gives, and then ALWAYS also bash <artifact skill dir>/scripts/check-artifact.sh <svg>, whatever gate the spec names — a spec gate of xmllint alone passed a figure with 15 overflowing labels. On the bare SVG ignore the page-level lines (doctype, charset, viewport, title, themes, lang, and the svg-contrast WARN); any svg-text or svg-scope line is a failure: fix and rerun, at most three rounds. The SVG enters a page through a spec's ::: figure block, so it must pass that block's rules: strict XML (no DOCTYPE, no entities), only allowlisted SVG elements and attributes, no script, foreignObject, on* or external reference (an href is #fragment only), no literal colour anywhere (no hex, no rgb()/hsl()) — var(--…), currentColor and the kit classes acc/flg/mut only. Prove it with this exact recipe: write a one-block spec beside the SVG, ::: figure {src="<file>.svg" title="t"} then ::: — src relative to the spec (an absolute src is refused) and no alt= (refused on an SVG figure) — and run python3 <artifact skill dir>/scripts/spec_build.py <that spec> --title t -o <scratch>.html (--title is required: a one-block spec has no masthead); ignore the page-level lines it prints (doctype, charset, viewport, title, themes, lang); a refusal names the element or attribute — fix and rerun, inside the same three rounds, then delete the scratch spec and page. Never run open, never write elsewhere. Reply with: the path (the caller embeds it with ::: figure; you never inline it anywhere), the figure-block build's result line, the gate line verbatim, the checker's svg-text and svg-scope lines remaining (verbatim, or "none"), the number of labels.

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. 2d ago Changed · -1 lines 1e009c993bb4
  2. 7d ago First seen · 12 lines · 0 tokens per session scan A 52feb2c59df9

Subscribe to this mod's changes

figure-sonnet is an agent published in the GitHub repository yacb2/aidex (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,024 tokens. 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-10-13.

Related

Other agents, from other repositories

tikz-reviewer

Adversarial visual critic for a rendered TikZ diagram. Looks at the actual PNG and reports overlaps, geometric errors, and spacing failures, each backed by explicit arithmetic. Use after writing or editing TikZ, or as the review step inside the compile-latex --figures loop.

ericluo04/claude-academic-workflow · 62 tokens

ui-component-writer

Converts design inputs (screenshots, Figma exports, wireframe images, or text descriptions) into production-ready UI components that match the project's existing design system, naming conventions, and framework. Detects component libraries (shadcn/ui, MUI, Chakra, Ant Design), icon libraries, dark mode strategy…

mantacron/manta · 123 tokens

ux-planner

Designs user experience flows, interaction patterns, and UI specifications for features in the RPI planning phase. Produces ux.md with wireframe descriptions, user journeys, and component specs.

mantacron/manta · 41 tokens

ui-ux-designer

UI/UX Designer & Frontend Validator.

PlanVault/ai-engineering-playbook · 14 tokens

design-analyzer

Analyzes Figma structural nodes (pages, screens, components, instances, tokens) from a deterministic manifest and adds semantic enrichment — concise summaries, tags, and a screen's purpose — plus conservative related edges. Does NOT invent structural nodes or edges.

Egonex-AI/Understand-Anything · 56 tokens

ap-run-coordinator

Start only ready, non-overlapping roadmap work and combine returned status at the written integration points.

Spielewoy/autoprompt-skill · 24 tokens