extract

extract is a skill for Claude Code, Codex from educlopez/ui-craft. It costs 87 tokens per session (683 once invoked), scanned A, original, MIT.

A refactoring pass that turns repeated styles and markup into reusable components and moves fixed design values into shared tokens. Tokens are named values for things such as colors, spacing, and sizes.

In plain words
What is it for?
Use it when code repeats the same Tailwind classes, markup, colors, sizes, shadows, or other fixed values. It can extract components, add component properties, and organize design tokens.
Why use it?
It reduces duplication and makes later visual changes easier to apply consistently. It also helps replace scattered hardcoded values with the project’s existing conventions.

Skill for Claude CodeCodex

Part of the ui-craft plugin — 29 skills, 25 commands, 2 agents, 1 MCP server 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 skills/educlopez/ui-craft/extract
Any agent
npx skills add educlopez/ui-craft --skill extract
Clone the repo
git clone --depth 1 https://github.com/educlopez/ui-craft

Made for: Claude Code, Codex.

Or install ui-craft, the plugin that ships this one along with the rest of its 29 skills, 25 commands, 2 agents, 1 MCP server.

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 extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/educlopez/ui-craft/extract.svg)](https://agentmods.dev/skills/educlopez/ui-craft/extract)
Your own site
<a href="https://agentmods.dev/skills/educlopez/ui-craft/extract"><img src="https://agentmods.dev/badge/skills/educlopez/ui-craft/extract.svg" alt="Measured on agentmods" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 683 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.00087 $0.00683
Opus 5 $0.00044 $0.00342
Sonnet 5 $0.00017 $0.00137
Haiku 4.5 $0.00009 $0.00068

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

Security

Grade A, and why

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 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/skills/extract/SKILL.md · 45 lines

What it actually says

Context: this sub-skill is one lens of the broader ui-craft skill. If the ui-craft skill is also installed, read its SKILL.md first for Discovery + Anti-Slop + Craft Test, then apply the specific lens below.

Extract reusable pieces from $ARGUMENTS. Load the ui-craft skill.

Step 1 — Scan the target for extraction candidates:

  • Repeated Tailwind class combos — any class string that appears ≥3 times becomes a component (or a cva/tv variant if the project uses one — check first).
  • Magic values — hex colors, pixel sizes, shadow definitions, font sizes, z-index values appearing in literal form. Lift into CSS variables or theme.extend.
  • Repeated markup — blocks that differ only by text/props collapse into a single component with props.

Step 2 — Match the project's conventions, don't impose new ones:

  • Naming — look at neighboring components. PascalCase file? kebab-case file? Named export vs default export? Match exactly.
  • Location — check components/ui/, ui/, primitives/, src/components/ before creating a new directory. Reuse.
  • Tokens — respect existing CSS variable naming (--color-*, --space-*, --font-*, --radius-*). Don't introduce a parallel system.

Step 3 — Anti-Slop Test on every new component (from SKILL.md):

  • Component name must be domain-specific, not generic. MetricCard / PricingTier / InviteRow beats Card / Box / Item.
  • If the component is generic ("a card with a title and description"), ask yourself whether it should instead be an inline composition — premature abstraction is worse than repetition.

Step 4 — Update every call-site. No half-migrations.

Knob-agnostic — DRY is not tunable.

References to read: references/layout.md (composition patterns), references/typography.md and references/color.md (token naming), plus the project's existing component library (scan before writing).

Output:

  1. The new component file(s) + any token additions.
  2. A table showing every call-site update:
File Before After
  1. A one-line delta: "Extracted N components, M tokens. Call-sites updated: X."

Next step: /tokens — lift the values you just centralized into the token spine (rung 2).

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 · 45 lines · 87 tokens per session scan A 31c80d52df9c

Subscribe to this mod's changes

extract is a skill published in the GitHub repository educlopez/ui-craft (310 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 683 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

software-in-worten

Übersetzt zwischen Benutzeroberfläche und Text — in beide Richtungen. Aus einer beschriebenen Oberfläche wird ein Skill; aus einem Skill wird eine Oberfläche. Nutzen, wenn eine Anwendung entworfen wird und der Ablauf noch unklar ist, wenn ein bestehendes Werkzeug als Skill verfügbar gemacht werden soll, wenn…

ellmos-ai/skills · 87 tokens

gradio-themes

Build and customise Gradio themes. Use when creating, editing, or publishing Python-based Gradio themes that control colours, typography, spacing, shadows, and dark mode.

gradio-app/gradio · 39 tokens

visual-plan

Turn ordinary text plans into rich interactive visual plans with diagrams, file maps, annotated code, open questions, and UI/prototype review when useful.

BuilderIO/skills · 32 tokens

shadcn-ui-flutter

A comprehensive Flutter UI library inspired by shadcn/ui. Provides high-quality, customizable, and accessible components including Buttons, Cards, Forms, and more. Use this skill when building Flutter UIs, implementing design systems, or needing specific component usage examples.

nank1ro/flutter-shadcn-ui · 58 tokens

accessibility

Audit and improve web accessibility following WCAG 2.2 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

addyosmani/web-quality-skills · 51 tokens

ui-design-system

Master the creation, maintenance, and governance of design systems — from design tokens and component architecture to documentation, versioning, and accessibility.

cosmicstack-labs/mercury-agent-skills · 31 tokens