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.
npx skills add oaustegard/claude-skills --skill svg-portrait-modegit clone --depth 1 https://github.com/oaustegard/claude-skillsWrote 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.
[](https://agentmods.dev/skills/oaustegard/claude-skills/svg-portrait-mode)<a href="https://agentmods.dev/skills/oaustegard/claude-skills/svg-portrait-mode"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/svg-portrait-mode/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.
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/svg-portrait-mode"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/svg-portrait-mode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00066 | $0.01890 |
| Opus 5 | $0.00033 | $0.00945 |
| Sonnet 5 | $0.00013 | $0.00378 |
| Haiku 4.5 | $0.00007 | $0.00189 |
Grade A, and why
svg-portrait-mode scanned grade A with 1 finding 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
subprocess.run(['rsvg-convert', '-w', '1400', 'output.svg', '-o', 'output.png']) How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SVG Portrait Mode
Selective simplification: one pipeline pass at high K → zone-aware contour simplification → optional per-zone style transforms. Like phone portrait mode, but vectorized — not blur, but stylistic separation of foreground and background.
Quick Start
Agent-annotated (recommended)
The agent looks at the image first, identifies important regions with rough bounding boxes, then calls:
from portrait_mode import portrait_mode
svg, stats = portrait_mode("photo.jpg",
focus_targets=[
{'bbox': (215, 125, 295, 195), 'label': 'face'},
],
focus_edges=[
{'bbox': (214, 170, 310, 290), 'label': 'beard'},
{'bbox': (210, 415, 300, 505), 'label': 'hands'},
{'bbox': (195, 95, 330, 140), 'label': 'hat'},
])
With style transforms
svg, stats = portrait_mode("photo.jpg",
focus_targets=[{'bbox': (215, 125, 295, 195), 'label': 'face'}],
focus_edges=[{'bbox': (214, 170, 310, 290), 'label': 'beard'}],
style_transforms={
'background': 'desaturate:0.7',
'periphery': 'desaturate:0.3',
})
Backward-compatible (MP-only)
Without annotations, falls back to MediaPipe face detection:
svg, stats = portrait_mode("photo.jpg")
How It Works
image-to-svg pipeline (K=96, unified palette)
→ zone detection (agent bboxes + optional MediaPipe landmarks)
→ assign contours to zones (by centroid)
→ per-zone simplification (epsilon, min_area)
→ optional per-zone style transforms
→ single SVG output (zone-labeled <g> groups, no clipPaths)
Subtractive, not additive. One pipeline pass produces full detail everywhere. Zones that don't need detail get simplified by coarsening contour approximation and raising minimum area thresholds. Subject stays sharp; background gets abstract.
Why This Works
v0.5.0 ran four independent pipelines (one per zone) with different K-means palettes, then composited via clipPaths. This produced tonal discontinuities at zone boundaries and was 4-7x slower. v0.6.0 uses a single palette so colors harmonize naturally, and simplification is a cheap post-process on contours the pipeline already extracted.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago Changed · -22 lines 4c5f0bb427b3
- 9d ago First seen · 227 lines · 66 tokens per session scan A d8096dab2da1
svg-portrait-mode is a skill published in the GitHub repository oaustegard/claude-skills (148 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 1,890 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
superdesign
Design or redesign frontend UI, presentations, and graphics on the Superdesign canvas with a choice of leading AI models. Use whenever the user wants to design a page, feature, flow, slide deck, or brand-new product; improve or reproduce existing UI; compare design results across top models; explore visual variants…
high-quality-slides
A method for creating polished presentation slides, including HTML slide decks, with research, a clear story, chosen visuals, and fixed layouts.
data-craft
Generate beautiful themed HTML data displays. Six visual idioms with matched voices, rendered as self-contained HTML files. Use when the user asks for charts, dashboards, reports, tearsheets, briefings, data visualizations, or any data-driven document.
tufte-viz
Design, build, and critique data visualizations using Edward Tufte's principles. Use this skill WHENEVER the work involves a chart, graph, plot, dashboard, table, diagram, or any visual display of data, even if the user does not name Tufte or "data viz" explicitly. Triggers include: (1) Building a new chart, graph…
figma-to-code
Generate production-ready React/Next.js code from Figma designs. Instructs proper Figma MCP tool usage, component reuse strategies, and variant mapping. CRITICAL: ALWAYS use this skill when user provides a Figma link or mentions implementing/redesigning from Figma design. Never attempt manual implementation without…
wp-ux-design
WordPress UX and design enforcement — Core Web Vitals, mobile-first layout, typography, color systems, navigation, page builder patterns, image optimization, form UX, loading and error states, admin UX, and performance checklists with concrete CSS/HTML/PHP examples.