/kmp-agent-skills:kmp-vectorize [arguments]from kmp-agent-skills
Compiles a raster image or SVG into a Kotlin ImageVector, replacing pixel assets and hand-written vector paths. Supports local files and remote Heroicons.
Ships in kmp-agent-skills. Installing the plugin adds it to Claude Code.
KMP Agent Skills — compile a raster image or SVG into a Kotlin ImageVector,
replacing pixel assets and hand-written vector paths.
$ARGUMENTS: <image path> [--name PascalName] [--color-mode semantic|literal] [--viewport N]
Never hand-write ImageVector.Builder path data. All coordinates come from the
script. If it refuses (photo or node budget), relay the refusal — do not approximate
paths manually. The audit flags hand-written builders (handwritten imagevector [HIGH]).
Arc commands (A/a) are NOT a refusal reason — the script flattens them into cubic
Beziers automatically (most icon sets, including Heroicons, use arcs for rounded shapes).
.svg, filled paths (fill="...", no stroke) → convert directly (zero dependencies).svg, stroke-based (fill="none" + stroke="..." — Heroicons Outline, Feather,
Lucide, Tabler, Material Symbols Outlined all draw icons this way) → the converter
auto-detects this and normalizes via picosvg (pip install picosvg if not already
present). Never skip this — filling a stroke's centerline directly produces a wrong
icon with a normal-looking success report, not an error..png / .jpg / .webp flat art (logo, icon, illustration) → trace then convertassets/photos/. Tell the user.skills/kmp-imagevector-generator/references/heroicons-catalog.md,
then:
curl -sL "https://raw.githubusercontent.com/tailwindlabs/heroicons/master/optimized/<size>/<style>/<name>.svg" \
-o /tmp/<name>.svg
where <size>/<style> is 24/outline, 24/solid, 20/solid (Mini), or 16/solid (Micro).
Then continue at Step 2 with /tmp/<name>.svg as the input.| Asset | Mode | Why |
|---|---|---|
| Icon (tintable) | --color-mode semantic (default choice) | Single color-agnostic layer; tinted via AppTheme.colors.X — adapts to dark mode free |
| Brand logo / multi-color art | --color-mode literal | Colors are brand-fixed, must not follow the theme |
If the project does not use the kmp-compose-design-system skill's
:core:designsystem module layout, pass --package explicitly — the default package
(<group-id>.core.designsystem.icons) is that skill's own convention, not universal.
Never hand-edit the generated file's package line instead.
for KMP_SKILLS in "${CLAUDE_PLUGIN_ROOT}/skills" skills .agents/skills ~/.agents/skills ~/.claude/skills; do [ -d "$KMP_SKILLS/kmp-imagevector-generator" ] && break; done
python3 "$KMP_SKILLS/kmp-imagevector-generator/scripts/convert_image_to_imagevector.py" \
<input> --name <PascalName> --group-id <group.id> --color-mode <mode> \
[--package <full.kotlin.package>] \
--output <ui module>/core/designsystem/icons
Read only the report line (layers / nodes / viewport / color-mode). Never open the
generated .kt to inspect path data — it is an opaque artifact.
If raster tracing is unavailable, the script prints install hints
(pip install vtracer preferred; brew install potrace + Pillow fallback). Relay them.
Icon(imageVector = BrandLogo, contentDescription = "Logo") // literal
Icon(imageVector = Search, contentDescription = null,
tint = AppTheme.colors.onSurfaceVariant) // semantic
If the project has an AppIcons object, register it there so call sites use AppIcons.Search.
/kmp-record-design-baselines ← golden capture of the icon at 24/48 dp
/kmp-audit-screenshots ← vision check of fidelity vs the source
If this replaced a PNG/JPG in commonMain/composeResources, delete the raster after the
golden confirms fidelity — raster asset in commonMain [MEDIUM] flags leftovers.
--max-nodes); the script refuses bloated vectors — reduce --colors or simplify the source art// GENERATED by convert_image_to_imagevector header; edit by re-tracing, never by handWhat the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
33 commands in this plugin
/kmp-audit-adaptive/kmp-audit-adaptive $ARGUMENTSCheck every screen for adaptive layout coverage gaps and redundant title violations across Compact (phone), Medium (tablet), and Expanded (desktop)./kmp-audit-design-visual/kmp-audit-design-visualRuns a visual-only audit of your app's Roborazzi screenshots using Claude vision./kmp-audit-screenshots/kmp-audit-screenshots $ARGUMENTSAnalyze Roborazzi golden screenshots for design consistency./kmp-check-updates/kmp-check-updatesCheck whether the local skills collection is behind `origin/main` on github.com/ronjunevaldoz/kmp-agent-skills./kmp-clean-comments/kmp-clean-commentsRefactors code documentation across all architectural levels — classes, functions, extension functions, and inline blocks — per `kmp-code-quality`'s Comment & KDoc Conventions ("By architectural level" section)./kmp-doctorComprehensive project health doctor — heals docs sitemaps, git hooks, script permissions, and .agents/skills.lock.npx claudepluginhub ronjunevaldoz/kmp-agent-skills --plugin kmp-agent-skills