design-extract

design-extract is a skill for Claude Code, Codex from wolfenazz/YzPzCode. It costs 34 tokens per session (515 once invoked), scanned A, a copy of design-extract, Apache-2.0.

A design-token extraction tool that collects colors, typography, spacing, borders, and shadows from code, design files, or screenshots into one structured map.

In plain words
What is it for?
It is for preparing an existing interface's visual system for migration, redesign, or comparison with another design system.
Why use it?
It brings scattered visual rules into one place and keeps a record of where each value came from.

Skill for Claude CodeCodex

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 skills/wolfenazz/yzpzcode/design-extract
Any agent
npx skills add wolfenazz/YzPzCode --skill design-extract
Clone the repo
git clone --depth 1 https://github.com/wolfenazz/YzPzCode

Made for: Claude Code, Codex.

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 design-extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/wolfenazz/yzpzcode/design-extract.svg)](https://agentmods.dev/skills/wolfenazz/yzpzcode/design-extract)
Your own site
<a href="https://agentmods.dev/skills/wolfenazz/yzpzcode/design-extract"><img src="https://agentmods.dev/badge/skills/wolfenazz/yzpzcode/design-extract.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 515 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod 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.00034 $0.00515
Opus 5 $0.00017 $0.00258
Sonnet 5 $0.00007 $0.00103
Haiku 4.5 $0.00003 $0.00052

Measured yesterday against content hash 1a65845ada71, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

design-extract 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 yesterday.

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.

Origin

This is a copy

95% identical to design-extract — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

app/desgin/plugins/_official/atoms/design-extract/SKILL.md · 65 lines

What it actually says

Design extract

Spec §10 / §21.3.2: tokens scattered across a repo's CSS / theme files / Tailwind config / styled-components helpers / SCSS partials need to be lifted into one bag before token-map can crosswalk them onto the active OD design system. This atom does the lifting; the input shape is intentionally generic so the same atom serves both code-migration and figma-migration when fed different sources.

Inputs

  • code/index.json from code-import (code-migration), OR
  • figma/tree.json from figma-extract (figma-migration), OR
  • A folder of screenshot images (tune-collab quick-tune flows).

Output

project-cwd/
└── code/
    └── tokens.json     # { colors[], typography[], spacing[], radius[], shadow[] }

Each token entry carries:

{
  "kind":     "color",
  "name":     "primary-500",     // optional source name
  "value":    "#5b8def",          // canonical value
  "sources": ["styles/global.css:42", "tailwind.config.js:24"],
  "usage":   ["Header.tsx", "Footer.tsx"]
}

sources[] and usage[] are the audit trail token-map.unmatched.json references when a target token can't be found.

Convergence

The atom completes when code/tokens.json exists. Empty token bags emit a warning event but do not abort — token-map handles the empty case by skipping its mapping pass.

Anti-patterns the prompt fragment forbids

  • Hard-coded hex values inside JSX literals (color: '#fff') are tokens for this atom's purposes; record them with kind:'color' and a synthetic name so they don't disappear into the noise.
  • Tailwind utility scans must dedupe palette references against the active theme — never list bg-blue-500 and bg-blue-600 as one token.

Status

Reserved id, prompt-only fragment in v1.

Files

What ships with it

1 file 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. yesterday First seen · 65 lines · 34 tokens per session scan A 1a65845ada71

Subscribe to this mod's changes

design-extract is a skill published in the GitHub repository wolfenazz/YzPzCode (13 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 515 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to design-extract, differing in 5 lines, and is treated as a copy.