svg-portrait-mode

svg-portrait-mode is a skill for Claude Code from oaustegard/claude-skills. It costs 66 tokens per session (1,890 once invoked), scanned A, original, MIT.

An image-processing workflow that turns portraits or photos into SVG vector artwork while keeping more detail in important regions such as faces, hands, or clothing. SVG is a scalable image format made from shapes rather than pixels.

In plain words
What is it for?
It is for vectorizing portraits with selected focus regions and applying separate style changes, such as desaturation, to the background or outer areas.
Why use it?
Uniform simplification can remove important facial or subject details while leaving too much detail in less important background areas.

Skill for Claude Code

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

Part of the media-processing plugin — 6 skills shipped together

Good fit It is for vectorizing portraits with selected focus regions and applying separate style changes, such as desaturation, to the background or outer areas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oaustegard/claude-skills/svg-portrait-mode
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.

Any agent
npx skills add oaustegard/claude-skills --skill svg-portrait-mode
Clone the repo
git clone --depth 1 https://github.com/oaustegard/claude-skills

Made for: Claude Code.

Or install media-processing, the plugin that ships this one along with the rest of its 6 skills.

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-portrait-mode

README.md
[![agentmods](https://agentmods.dev/badge/skills/oaustegard/claude-skills/svg-portrait-mode/github.svg)](https://agentmods.dev/skills/oaustegard/claude-skills/svg-portrait-mode)
Your own site
<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.

agentmods 80×15 button for svg-portrait-mode

Your own site · 80×15
<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>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00066 $0.01890
Opus 5 $0.00033 $0.00945
Sonnet 5 $0.00013 $0.00378
Haiku 4.5 $0.00007 $0.00189

Measured 2d ago against content hash 4c5f0bb427b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (portrait_mode.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.

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'])
plugins/media-processing/skills/svg-portrait-mode/SKILL.md · 205 lines

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.

Read the full file on GitHub · 205 lines

Files

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.

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 · -22 lines 4c5f0bb427b3
  2. 9d ago First seen · 227 lines · 66 tokens per session scan A d8096dab2da1

Subscribe to this mod's changes

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.

Related

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…

superdesigndev/superdesign-skill · 115 tokens

high-quality-slides

A method for creating polished presentation slides, including HTML slide decks, with research, a clear story, chosen visuals, and fixed layouts.

andyqiu847-ai/high-quality-slides · 165 tokens

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.

yixiliu617/data-craft · 54 tokens

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…

HugoVeltorai/publicskills · 234 tokens

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…

scoobynko/claude-code-design-skills · 73 tokens

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.

xonack/wp-ux-design-claude-skill · 59 tokens