extract

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identifies duplicated UI implementations, hard-coded visual values, and inconsistent component variations across a codebase, and provides a plan to consolidate them into a coherent design system to improve consistency and maintainability.

Core Features & Use Cases

  • Discovery: Locate existing component libraries, shared UI directories, and design tokens and map their structure and conventions.
  • Pattern Identification: Detect repeated components, inconsistent variants, and hard-coded values that should become tokens.
  • Extraction & Migration: Propose reusable components with clear props, create semantic design tokens, provide accessibility guidance, and outline a stepwise migration plan for replacing existing instances.
  • Use Case: When a product has multiple button implementations and scattered color values, run this process to centralize buttons, create tokenized colors, and migrate consumer code.

Quick Start

Ask the extract skill to analyze the target directory and produce a prioritized extraction plan listing components to create, tokens to define, and a migration path.

Frequently Asked Questions about extract

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

FAQPage Schema
How do I consolidate reusable UI components and hard-coded styles during a refactor?

To consolidate reusable UI components, you can analyze your codebase to detect repeated UI patterns and hard-coded visual values, then centralize them into a coherent design system. This process yields a stepwise migration plan and semantic design tokens.

What is the best way to identify duplicated UI implementations and inconsistent component variations?

Identifying duplicated UI implementations involves performing static analysis and pattern detection across your front-end codebase. This reveals inconsistent component variations and scattered visual values so you can standardize them into shared components.

How do I create semantic design tokens from scattered hard-coded values in a front-end codebase?

Creating semantic design tokens from hard-coded values requires scanning your codebase to locate repeated visual properties. The extraction process proposes tokenization definitions and component API designs to replace scattered values.

Does this UI component extraction process include accessibility checks for the design system?

Yes, the UI component extraction process includes accessibility checks. When proposing reusable components and clear props, the analysis provides accessibility guidance to ensure your consolidated design system meets compliance standards.

Can I use this pattern detection approach to map existing design libraries and shared UI directories?

Yes, you can use this pattern detection approach for discovery. It maps the structure and conventions of existing component libraries and shared UI directories to help you understand your current design system landscape.

What do I need to provide to generate a UI component extraction and migration plan?

To generate a UI component extraction and migration plan, you need to provide access to your target front-end codebase directory. The analysis then outputs a prioritized plan listing components to create, tokens to define, and a migration path.