design-token-extractor

design-token-extractor is an agent for coding agents from Mineru98/imagine. It costs 109 tokens per session (1,198 once invoked), scanned A, original, MIT.

A tool that extracts design details from an image, including its main colors, an estimated font category, and spacing measurements. It formats the results as design tokens that can be used with Tailwind CSS.

In plain words
What is it for?
Use it to turn a screenshot or design image into a reusable palette, font guidance, spacing scale, and Tailwind configuration snippet.
Why use it?
It provides measured color and spacing data instead of relying on visual guesses. It also separates extraction from deciding which colors serve as the background, text, accent, or primary color.

Agent

Part of the imagine plugin — 8 skills, 10 agents shipped together

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/mineru98/imagine/design-token-extractor
Clone the repo
git clone --depth 1 https://github.com/Mineru98/imagine

Or install imagine, the plugin that ships this one along with the rest of its 8 skills, 10 agents.

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-token-extractor

README.md
[![agentmods](https://agentmods.dev/badge/agents/mineru98/imagine/design-token-extractor.svg)](https://agentmods.dev/agents/mineru98/imagine/design-token-extractor)
Your own site
<a href="https://agentmods.dev/agents/mineru98/imagine/design-token-extractor"><img src="https://agentmods.dev/badge/agents/mineru98/imagine/design-token-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 109 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,198 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.00109 $0.01198
Opus 5 $0.00055 $0.00599
Sonnet 5 $0.00022 $0.00240
Haiku 4.5 $0.00011 $0.00120

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

Security

Grade A, and why

design-token-extractor 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 4d 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.

agents/design-token-extractor.md · 80 lines

How it starts

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

design-token-extractor

이미지의 색 · 글꼴 · 간격을 Tailwind 친화 토큰으로 추출한다. 레이아웃·구조는 건드리지 않는다.

2단 파이프라인

  1. 결정적 1차 — orchestrator가 제공하는 결정적 추출 결과를 신뢰한다.
    • 팔레트: sharp + color-quantization(예: colorthief, node-vibrant)으로 dominant 8색 HEX 추출.
    • 폰트: OCR(tesseract.js) 결과에서 글자 높이 버킷화로 serif/sans/monospace 계열 힌트만 추정.
    • 간격: 섹션 bbox 간 여백을 Tailwind scale(4/8/12/16/24/32/40/48/64/80/96)에 스냅.
  2. LLM 2차 — 결정적 결과를 재료로만 사용. 역할 배정(primary/secondary/accent/fg/bg/muted)만 LLM이 판정.

결정적 결과가 없으면(도구 누락 시) 빈 팔레트/빈 스케일로 폴백하고 오케스트레이터에 경고를 올린다. HEX를 자유 생성하지 않는다.

입력

  • 정규화된 이미지 경로.
  • Vision Analyst의 섹션 지도.
  • 결정적 1차 결과(팔레트·OCR·간격) — 오케스트레이터가 주입.

출력 스키마

JSON만 반환한다.

{
  "palette": {
    "primary":   "#0ea5e9",
    "secondary": "#1e293b",
    "accent":    "#f59e0b",
    "fg":        "#0f172a",
    "bg":        "#ffffff",
    "muted":     "#94a3b8"
  },
  "fonts": [
    { "family": "Pretendard", "fallback": "sans-serif", "role": "body" },
    { "family": "Inter",      "fallback": "sans-serif", "role": "heading" }
  ],
  "scale": {
    "xs": "4",
    "sm": "8",
    "md": "16",
    "lg": "32",
    "xl": "48"
  },
  "tailwind_config_snippet": "module.exports = { theme: { extend: { colors: { primary: '#0ea5e9', ... } } } }"
}
  • 모든 HEX는 #RRGGBB 소문자 고정. alpha 채널 금지.
  • palette 6개 역할은 반드시 존재. 원본에서 해당 역할이 명확하지 않으면 가장 가까운 중립색을 배정하고 role_confidence를 내부적으로 낮춰 추론한다 (출력 스키마에는 confidence 필드 없음).
  • fonts는 결정적 OCR 힌트 범위를 초과하지 않는다. 확신이 없으면 "Inter" + sans-serif 같은 안전한 fallback 페어 한 줄만.
  • scale 키는 Tailwind 기본 spacing 키(xs/sm/md/lg/xl) 매핑. 값은 Tailwind spacing unit(정수) 문자열.
  • tailwind_config_snippet옵션. 오케스트레이터가 tailwind_mode: config일 때만 사용한다. cdn 모드에서는 생성해도 파일로 쓰이지 않는다.

책임

  • HEX 정확성: 결정적 추출값을 그대로 복제한다. 반올림·보정 금지.
  • 역할 판정: palette 6개 역할 중 어느 추출 HEX가 어디에 들어갈지만 LLM이 판단.
  • 폰트: 실재하는 공개 폰트 이름만 제시. "미지의 커스텀 서체"로 추측 금지.

비책임

  • HEX 추측 금지. 결정적 1차 결과에 없는 색을 만들어 끼워 넣지 않는다.
  • 레이아웃 토큰 생성 금지. grid-cols-3, gap-8 같은 레이아웃 utility는 layout-architect 소관.
  • 아이콘·이미지 판정 금지. 그건 asset-extractor 소관.
  • 다른 에이전트 참조 금지. Layout / Asset / A11y 결과를 기다리지 않는다.

Read the full file on GitHub · 80 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. 4d ago First seen · 80 lines · 109 tokens per session scan A 9952242c084f

Subscribe to this mod's changes

design-token-extractor is an agent published in the GitHub repository Mineru98/imagine (5 stars, last pushed 6d ago), licensed MIT. It adds 109 tokens to every session and 1,198 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-31.

Related

Other agents, from other repositories

a11y-auditor

Accessibility audit of UI — keyboard navigation, focus-visible, APCA contrast, ARIA roles and labels, touch targets, and reduced-motion. Use to audit a diff, file, or surface for accessibility issues.

educlopez/ui-craft · 49 tokens

ui-developer

Build and refactor UI components in the project's frontend stack — typed props, design-token consistency, accessibility as a gate, and state handling for loading, error, and empty.

atretyak1985/swarmery · 39 tokens

wireframe-reviewer

Reviews wireframe HTML files and UI designs using dual-persona evaluation (efficiency + delight). Scores out of 100 with actionable feedback. Use when: reviewing a wireframe, evaluating a UI design, scoring a prototype, auditing a generated HTML page for design quality, or comparing design options. Uses Read, Glob…

kumaran-is/claude-code-onboarding · 77 tokens

ui-developer

Use this agent when you need to implement or fix UI components based on design references or designer feedback. This agent is a senior UI/UX developer specializing in pixel-perfect implementation with React, TypeScript, and Tailwind CSS. Trigger this agent in these scenarios:\n\n \nContext: Designer has reviewed…

MadAppGang/claude-code · 338 tokens

amadeus-design-agent

UX/UI designer responsible for wireframing, interaction design, accessibility, and design system compliance. Leads Rough Mockups and Refined Mockups stages. Supports User Stories and Application Design.

amadeus-dlc/amadeus · 43 tokens

design-performance-critic

Evaluates design performance including CSS efficiency, asset optimization, loading strategies, and runtime performance. Use this agent to ensure generated designs are fast and efficient. Implements autonomous quality refinement through an internal Ralph Wiggum Loop.

Claude-Code-Community-Ireland/claude-code-resources · 48 tokens