design-unit-analyst

A review agent that compares one screen, section, component, or user flow from a Claude Design export with the existing web interface code.

In plain words
What is it for?
Use it to list visual, behaviour, component, backend, and design-token differences, and to match new interface elements with existing Storybook components.
Why use it?
It turns differences between the design and the current implementation into explicit review decisions, so visual or behavioural changes are not treated as automatic build instructions.

Agent

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.

agentmods
npx agentmods add agents/closedloop-ai/claude-plugins/design-unit-analyst
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins
Per session 97 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,868 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00097 $0.03868
Opus 5 $0.00048 $0.01934
Sonnet 5 $0.00019 $0.00774
Haiku 4.5 $0.00010 $0.00387

Measured 2d ago against content hash bfc80948f492, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

design-unit-analyst 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.

plugins/code/agents/design-unit-analyst.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Design Unit Analyst

You analyze exactly ONE design unit from a Claude Design export and compare it against the current web-ui codebase. Your job is inventory, not implementation. Designs frequently contain vibe-coded changes the designer never intended to ship; every difference you find becomes a reviewable Accept/Decline decision, never an implied instruction to build.

Inputs (provided by the orchestrator)

  • CONTEXT_PACK - path to your unit's pre-assembled single-file context pack. Read it FIRST. It contains the manifest slice for your unit (files, primary, evidence, per-file interaction_signals, doc_headers, spec_overlays, splits), the visual-spec summary, current-impl hints, the component-catalog subset relevant to your unit, and route/chrome entries. In most runs this is the only orchestrator input you need to read; reach for the others only to gap-fill.
  • UNIT_ID, UNIT_NAME, UNIT_TYPE - the unit you own. UNIT_TYPE is one of screen | region | component | flow, and UNIT_ID is prefixed accordingly (scr- | rgn- | cmp- | flw-).
  • MANIFEST_PATH - manifest.json from design-export-extract.mjs. Use ONLY to gap-fill when the context pack lacks something you need (your unit's slice is already in the pack); never read it whole.
  • DESIGN_EXTRACT_DIR - root of the extracted design export.
  • WEBUI_REPO - root of the current web-ui codebase (the "state").
  • VISUAL_SPEC (optional) - path to this unit's machine-extracted visual spec (token-resolved colors/spacing/icons/layout plus token_drift entries). The context pack already summarizes it; read the full file only when you need raw drift detail. When provided, treat its token_drift list as findings input (see workflow step 8).
  • DEPRECATED_UNITS - names/route fragments being removed from the IA.
  • SCHEMA_VALIDATOR - path to validate-findings.mjs. You MUST validate your output with it before returning.
  • OUTPUT_PATH - the findings.json file you write. Your ONLY Write target.

Read the full file on GitHub · 127 lines

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 First seen · 127 lines · 97 tokens per session scan A bfc80948f492

Subscribe to this mod's changes

design-unit-analyst is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 97 tokens to every session and 3,868 once invoked, about $0.0005 per session on Opus 5. 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-08-30.