extract

Extract reusable components and design tokens into a shared design system.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/gmolike/Claude-Template --skill extract-gmolike
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract
Source: https://github.com/gmolike/Claude-Template/tree/main/.agents/skills/extract
Command: npx skills add https://github.com/gmolike/Claude-Template --skill extract-gmolike

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate duplicated UI patterns, hard-coded style values, and inconsistent component variations that increase maintenance cost and visual inconsistency. This Skill identifies those repeated patterns and consolidates them into a shared design system with proper tokens, variants, and documentation. ## Core Features & Use Cases - Pattern Discovery: Scans a target feature or area to find repeated components, hard-coded colors/spacing/typography, and inconsistent implementations of the same concept. - Component & Token Extraction: Builds reusable components with typed props, variants, and accessibility support, plus semantically named design tokens. - Migration & Documentation: Replaces existing usages with shared versions, removes dead code, and updates component library documentation. - Use Case: A team notices three different button implementations across their React app. Use this Skill to consolidate them into one typed, accessible Button component with variants, migrate all call sites, and document it in the design system. ## Quick Start Ask the assistant to extract reusable components and design tokens from a specific feature directory into the shared 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?

Scan the target area for UI patterns used three or more times, then create a shared component with a clear props API, variants, and accessibility support. Finally migrate all existing usages to the shared version and delete the old implementations.

What are design tokens and when should I create them?

Design tokens are named, reusable values for colors, spacing, typography, and shadows that replace hard-coded values. Create them only for values with semantic meaning and repeated use, not for every single value in the codebase.

When should a pattern not be extracted into a design system?

Avoid extracting one-off, context-specific implementations or patterns used fewer than three times. Overly generic components and premature extraction increase 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, naming conventions, and organization first, then extract only clearly reusable patterns incrementally.

How do I migrate existing code to shared components safely?

Search for all instances of the extracted pattern, replace each usage with the shared component, and verify visual and functional parity through testing. Remove the old implementations only after migration is confirmed.