extract

Extract reusable components and design tokens into a design system.

Updated Dec 18, 2025
One-click install
npx skills add https://github.com/l0lxl0lw/dotfiles --skill extract-l0lxl0lw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract
Source: https://github.com/l0lxl0lw/dotfiles/tree/main/ai/shared/skills/impeccable/extract
Command: npx skills add https://github.com/l0lxl0lw/dotfiles --skill extract-l0lxl0lw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repeated UI patterns, hard-coded style values, and inconsistent component implementations accumulate across a codebase, making interfaces harder to maintain and visually inconsistent. ## Core Features & Use Cases - Pattern Discovery: Scans a target area to find repeated components, hard-coded colors, spacing, and typography that should become design tokens. - Systematic Extraction: Builds reusable components with typed props, variants, accessibility support, and semantic design tokens that follow existing conventions. - Migration & Documentation: Replaces old implementations with shared versions, removes dead code, and updates component library documentation. - Use Case: After noticing three different button styles across a web app, run this Skill to consolidate them into one documented button component with variants and migrate all call sites. ## Quick Start Ask the AI to extract reusable components and design tokens from the checkout feature into the design system.

Frequently Asked Questions about extract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract reusable components from existing code?

Identify UI patterns used three or more times, then create a shared component with a clear props API, variants, and accessibility support. Replace each original implementation with the shared version and delete the old code.

How to convert hard-coded CSS values into design tokens?

Audit the codebase for repeated colors, spacing, typography, and shadows, then define tokens with clear primitive and semantic naming. Document when to use each token rather than creating a token for every single value.

When should I not extract a component into a design system?

Avoid extracting one-off, context-specific implementations or patterns used fewer than three times. Overly generic components and tokens without semantic meaning add maintenance cost without improving consistency.

What if my project has no design system yet?

The Skill asks before creating one, since location and structure matter. Confirm the preferred directory, component organization, and naming conventions first so extracted components fit long-term conventions.

How do I migrate existing code to shared components safely?

Search for all instances of the extracted pattern, update each use to consume the shared version, and test for visual and functional parity. Only delete the old implementations after verifying the migration.