extract

Extract reusable components and design tokens from existing codebases.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/tc9011/my-skills --skill extract-tc9011
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract
Source: https://github.com/tc9011/my-skills/tree/main/skills/extract
Command: npx skills add https://github.com/tc9011/my-skills --skill extract-tc9011

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps identify and extract reusable components, design tokens, and patterns from existing codebases to build or enrich a design system, promoting consistency and efficiency.

Core Features & Use Cases

  • Pattern Identification: Analyzes code to find repeated UI elements, hard-coded values, and inconsistent variations.
  • Systematic Extraction: Plans and executes the extraction of components and design tokens into a centralized design system.
  • Use Case: A team has multiple projects using similar button styles. This Skill can identify these variations, define a single reusable button component, and guide the migration of existing usages to the new component.

Quick Start

Use the extract skill to identify reusable components in the 'src/components' directory.

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 an existing codebase?

To extract reusable components, analyze the codebase for repeated UI elements, hard-coded values, and inconsistent variations. You can then plan a systematic extraction to consolidate these patterns into a centralized design system with clear component APIs.

What are design tokens and when do I need to consolidate them?

Design tokens are centralized variables for hard-coded values like colors and spacing. You need to consolidate design tokens when multiple projects use inconsistent variations, ensuring systematic reuse and visual consistency across your component library.

How do I identify repeated UI patterns for a pattern library?

Identify repeated UI patterns for a pattern library by scanning source code to detect duplicated interface elements and hard-coded values. This analysis reveals opportunities to group similar variations into a single reusable component.

What is the best way to refactor code for design system reusability?

The best way to refactor code for design system reusability is to execute a systematic extraction plan that creates components with clear APIs and accessibility. This process requires thorough migration of existing usages to the new centralized component library.

Can I migrate existing hard-coded values into design tokens?

Yes, you can migrate existing hard-coded values into design tokens by analyzing the code for inconsistencies and defining a centralized token set. This requires a thorough migration of existing usages to replace duplicated values with the new tokens.

Do I need a systematic extraction plan to build a design system?

Yes, you need a systematic extraction plan to build a design system effectively. It guides the identification of repeated patterns, component creation with clear APIs, design token definition, and the thorough migration of existing usages.