imitate-auto

An automated UI design workflow that reads code files and images to extract styles, animations, and layouts, then assembles prototypes and connects them to a design system.

In plain words
What is it for?
Use it when you have source code, screenshots, or other reference images and want generated UI prototypes based on them.
Why use it?
It reduces the manual work of studying existing designs and turning their visual details into a working prototype.

Command for Claude Code

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 commands/catlog22/claude-code-workflow/imitate-auto
Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

Per session 19 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,986 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.00019 $0.06986
Opus 5 $0.00010 $0.03493
Sonnet 5 $0.00004 $0.01397
Haiku 4.5 $0.00002 $0.00699

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

Security

Grade A, and why

imitate-auto 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.

.claude/commands/workflow/ui-design/imitate-auto.md · 746 lines

How it starts

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

UI Design Imitate-Auto Workflow Command

Overview & Execution Model

Fully autonomous design orchestrator: Efficiently create UI prototypes through sequential execution from design token extraction to system integration.

Direct Input Strategy: Accepts local code files and images:

  • Code Files: Detect file paths in --prompt parameter
  • Images: Reference images via --images glob pattern
  • Hybrid: Combine both code and visual inputs

Autonomous Flow (⚠️ CONTINUOUS EXECUTION - DO NOT STOP):

  1. User triggers: /workflow:ui-design:imitate-auto [--input "..."]
  2. Phase 0: Initialize and detect input sources
  3. Phase 2: Style extraction → Attach tasks → Execute → Collapse → Auto-continues
  4. Phase 2.3: Animation extraction → Attach tasks → Execute → Collapse → Auto-continues
  5. Phase 2.5: Layout extraction → Attach tasks → Execute → Collapse → Auto-continues
  6. Phase 3: Batch UI assembly → Attach tasks → Execute → Collapse → Auto-continues
  7. Phase 4: Design system integration → Execute orchestrator task → Reports completion

Phase Transition Mechanism:

  • Task Attachment: Skill execute ATTACHES tasks to current workflow
  • Task Execution: Orchestrator EXECUTES these attached tasks itself
  • Task Collapse: After tasks complete, collapse them into phase summary
  • Phase Transition: Automatically execute next phase after collapsing
  • No user interaction required after initial parameter parsing

Auto-Continue Mechanism: TodoWrite tracks phase status with dynamic task attachment/collapse. After executing all attached tasks, you MUST immediately collapse them, restore phase summary, and execute the next phase. No user intervention required. The workflow is NOT complete until reaching Phase 4.

Task Attachment Model: Skill execute is NOT delegation - it's task expansion. The orchestrator executes these attached tasks itself, not waiting for external completion.

Execution Process

Input Parsing:
   ├─ Parse flags: --input, --session (legacy: --images, --prompt)
   └─ Decision (input detection):
      ├─ Contains * or glob matches → images_input (visual)
      ├─ File/directory exists → code import source
      └─ Pure text → design prompt

Phase 0: Parameter Parsing & Input Detection
   ├─ Step 1: Normalize parameters (legacy deprecation warning)
   ├─ Step 2: Detect design source (hybrid | code_only | visual_only)
   └─ Step 3: Initialize directories and metadata

Phase 0.5: Code Import (Conditional)
   └─ Decision (design_source):
      ├─ hybrid → Execute /workflow:ui-design:import-from-code
      └─ Other → Skip to Phase 2

Phase 2: Style Extraction
   └─ Decision (skip_style):
      ├─ code_only AND style_complete → Use code import
      └─ Otherwise → Execute /workflow:ui-design:style-extract

Phase 2.3: Animation Extraction
   └─ Decision (skip_animation):
      ├─ code_only AND animation_complete → Use code import
      └─ Otherwise → Execute /workflow:ui-design:animation-extract

Phase 2.5: Layout Extraction
   └─ Decision (skip_layout):
      ├─ code_only AND layout_complete → Use code import
      └─ Otherwise → Execute /workflow:ui-design:layout-extract

Phase 3: UI Assembly
   └─ Execute /workflow:ui-design:generate

Phase 4: Design System Integration
   └─ Decision (session_id):
      ├─ Provided → Execute /workflow:ui-design:update
      └─ Not provided → Standalone completion

Read the full file on GitHub · 746 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 · 746 lines · 0 tokens per session scan A 3159f943df23

Subscribe to this mod's changes

imitate-auto is a command published in the GitHub repository catlog22/Claude-Code-Workflow (2,134 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 6,986 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-08-30.