extract

Extract reusable UI components, design tokens, and interaction patterns from codebases.

Updated Jan 22, 2025
One-click install
npx skills add https://github.com/SL-A-SH/my-portfolio --skill extract-sl-a-sh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract
Source: https://github.com/SL-A-SH/my-portfolio/tree/main/.claude/skills/extract
Command: npx skills add https://github.com/SL-A-SH/my-portfolio --skill extract-sl-a-sh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies duplicated UI implementations, hard-coded styling values, and inconsistent component variations, then consolidates them into reusable components, design tokens, and documented patterns to reduce maintenance, improve consistency, and speed up development.

Core Features & Use Cases

  • Pattern discovery: Scan code and design artifacts to locate repeated components, layout patterns, and hard-coded values that should become tokens.
  • Extraction & refinement: Define component APIs, accessible behavior, sensible defaults, and semantic design tokens for color, spacing, and typography.
  • Migration planning: Produce a prioritized migration path with search-and-replace guidance, tests to validate parity, and documentation updates for the shared library.
  • Use Case: Consolidate three variations of a button and global color values into a single button component with semantic tokens and update pages to consume the shared implementation.

Quick Start

Run the extract skill on the target UI directory (for example, src/components) and return a prioritized list of components to create, tokens to extract, and a step-by-step migration plan.

Frequently Asked Questions about extract

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

FAQPage Schema
How do I extract reusable UI components and design tokens from an existing codebase?

To extract reusable UI components, scan your target UI directory to locate repeated patterns, hard-coded values, and inconsistent implementations, then consolidate them into shared components with clear props, accessibility, and semantic design tokens.

What is the best way to consolidate duplicated frontend UI patterns into a single design system?

Consolidating duplicated frontend UI patterns involves identifying repeated component variations and hard-coded styling values, refining them into a single component API with sensible defaults, and generating a prioritized migration plan to replace existing instances.

How do I create a migration plan for refactoring hard-coded styling values into semantic design tokens?

Creating a migration plan for refactoring hard-coded values produces a prioritized path with search-and-replace guidance, tests to validate visual parity, and documentation updates to ensure a smooth transition to semantic design tokens.

Can I use automated component extraction to find inconsistent UI implementations across multiple modules?

Yes, you can apply automated component extraction to frontend repositories and component libraries to find inconsistent UI implementations, duplicated layouts, and hard-coded values across different pages and modules.

Does component extraction also generate documentation and examples for the shared component library?

Yes, component extraction produces reusable component implementations complete with documentation, usage examples, accessible behavior definitions, and a clear set of props for your shared library.