style-extract

style-extract is a command for Claude Code from catlog22/Claude-Code-Workflow. It costs 22 tokens per session (6,858 once invoked), scanned A, original, MIT.

A command that studies reference images or text prompts and produces design-system decisions, such as colours and naming, in either exploration or refinement mode.

In plain words
What is it for?
Use it to explore several contrasting styles or refine one existing style from images, prompts, or both.
Why use it?
It helps turn visual references or an idea into a structured design direction instead of leaving the choices informal.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the TodoWrite tool.

Good fit Use it to explore several contrasting styles or refine one existing style from images, prompts, or both.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/catlog22/claude-code-workflow/style-extract
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.

Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/catlog22/claude-code-workflow/style-extract/github.svg)](https://agentmods.dev/commands/catlog22/claude-code-workflow/style-extract)
Your own site
<a href="https://agentmods.dev/commands/catlog22/claude-code-workflow/style-extract"><img src="https://agentmods.dev/badge/commands/catlog22/claude-code-workflow/style-extract/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for style-extract

Your own site · 80×15
<a href="https://agentmods.dev/commands/catlog22/claude-code-workflow/style-extract"><img src="https://agentmods.dev/badge/commands/catlog22/claude-code-workflow/style-extract.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,858 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00022 $0.06858
Opus 5 $0.00011 $0.03429
Sonnet 5 $0.00004 $0.01372
Haiku 4.5 $0.00002 $0.00686

Measured 5d ago against content hash 3ac83e7faf1b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

style-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 5d 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.

.claude/commands/workflow/ui-design/style-extract.md · 778 lines

How it starts

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

Auto Mode

When --yes or -y: Skip all clarification questions, use AI-inferred design decisions.

Style Extraction Command

Overview

Extract design style from reference images or text prompts using Claude's built-in analysis. Supports two modes:

  1. Exploration Mode (default): Generate multiple contrasting design variants
  2. Refinement Mode (--refine): Refine a single existing design through detailed adjustments

Strategy: AI-Driven Design Space Exploration

  • Claude-Native: 100% Claude analysis, no external tools
  • Direct Output: Complete design systems (design-tokens.json)
  • Flexible Input: Images, text prompts, or both (hybrid mode)
  • Dual Mode: Exploration (multiple contrasting variants) or Refinement (single design fine-tuning)
  • Production-Ready: WCAG AA compliant, OKLCH colors, semantic naming

Execution Process

Input Parsing:
   ├─ Parse flags: --design-id, --session, --images, --prompt, --variants, --interactive, --refine
   └─ Decision (mode detection):
      ├─ --refine flag → Refinement Mode (variants_count = 1)
      └─ No --refine → Exploration Mode (variants_count = --variants OR 3)

Phase 0: Setup & Input Validation
   ├─ Step 1: Detect input mode, extraction mode & base path
   ├─ Step 2: Load inputs
   └─ Step 3: Memory check (skip if exists)

Phase 1: Design Direction/Refinement Options Generation
   ├─ Step 1: Load project context
   ├─ Step 2: Generate options (Agent Task 1)
   │  └─ Decision:
   │     ├─ Exploration Mode → Generate contrasting design directions
   │     └─ Refinement Mode → Generate refinement options
   └─ Step 3: Verify options file created

Phase 1.5: User Confirmation (Optional)
   └─ Decision (--interactive flag):
      ├─ --interactive present → Present options, capture selection
      └─ No --interactive → Skip to Phase 2

Phase 2: Design System Generation
   ├─ Step 1: Load user selection or default to all
   ├─ Step 2: Create output directories
   └─ Step 3: Launch agent tasks (parallel)

Phase 3: Verify Output
   ├─ Step 1: Check files created
   └─ Step 2: Verify file sizes

Read the full file on GitHub · 778 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. 5d ago First seen · 778 lines · 0 tokens per session scan A 3ac83e7faf1b

Subscribe to this mod's changes

style-extract is a command published in the GitHub repository catlog22/Claude-Code-Workflow (2,131 stars, last pushed 2mo ago), licensed MIT. It adds 22 tokens to every session and 6,858 once invoked, about $0.0001 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-09-03.