register-asset
Register a design artifact in design-assets.json, capture a thumbnail, and regenerate assets.html overview grid. Use when an artifact is ready for review, or user says "add to overview", "register", "track this".
How do I install this agent skill?
npx skills add https://github.com/bluzir/claude-code-design --skill register-assetIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill facilitates the registration and visual tracking of design artifacts by updating a JSON database and an HTML overview. It executes a local Node.js script and uses Chrome DevTools for screenshots. A minor security risk exists regarding indirect prompt injection, as user-supplied descriptions are written to persistent files without explicit sanitization.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Register Asset
Add an artifact to design-assets.json and refresh the visual overview at assets.html.
Argument parsing
From $ARGUMENTS:
- Positional 0: html-path (required)
--asset "<name>": display name (default: derive from filename, Title Cased)--group <X>: one of Type, Colors, Spacing, Components, Brand (default: Components)--subtitle "<text>": short description--status <X>: needs-review | approved | changes-requested (default: needs-review)--auto: silent mode called by/done— skip thumbnail capture (reuses.claude/last-preview.png), don't print confirmation prompts, one-line report only
Steps
-
Capture thumbnail:
- If
--autoand.claude/last-preview.pngexists:Bash(cp .claude/last-preview.png assets/thumbs/<slug>-<ts>.png)— reuse - Otherwise:
/preview <html-path>→ wait 500ms →mcp__chrome-devtools__take_screenshot→ save toassets/thumbs/<slug>-<ts>.png(Bash(mkdir -p assets/thumbs)first)
- If
-
Read existing
design-assets.json:- If missing → create with
{"items": []}
- If missing → create with
-
Upsert entry:
- Key on (asset, path) pair
- If exists → update fields + thumbnail + bump
updated_at - If new → append
Schema:
{ "items": [ { "asset": "Primary button", "path": "artifacts/button.html", "group": "Components", "status": "approved", "subtitle": "Filled variant with hover state", "thumbnail": "assets/thumbs/button-20260420T120000Z.png", "registered_at": "2026-04-20T12:00:00Z", "updated_at": "2026-04-20T12:00:00Z" } ] } -
Write
design-assets.jsonwith formatted JSON (2-space indent). -
Regenerate
assets.html:Bash(node scripts/make-assets-index.mjs)— see script below- If user didn't run
/doctorand node is missing, fall back to inline generation viaWritetool with HTML template
-
Report: "Registered
<asset>in<group>. View atassets.html."
assets.html layout
Sections by group. Each card shows:
- Thumbnail (clickable → opens source HTML in new tab)
- Asset name (bold)
- Subtitle (muted)
- Status badge (color-coded: green=approved, amber=needs-review, red=changes-requested)
- Updated date
- Mini-menu: approve, request-changes, unregister
The HTML is static — no server. Status changes happen via Claude (user says "approve the button asset" → Claude re-runs /register-asset ... --status approved).
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/bluzir/claude-code-design/register-asset">View register-asset on skillZs</a>