extract

Extract reusable components and design tokens into a design system.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate duplicated UI patterns, hard-coded style values, and inconsistent component variations that erode consistency and increase maintenance cost. This Skill identifies those repeated patterns and consolidates them into a shared design system. ## Core Features & Use Cases - Pattern Discovery: Scans the target area to find repeated components, hard-coded colors, spacing, and typography values, 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 app. Use this Skill to consolidate them into one typed, accessible Button component with variants, then migrate all call sites. ## Quick Start Ask the AI to extract reusable components and design tokens from the target directory 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 an existing codebase?▼

Identify UI patterns used three or more times, then create shared components with clear props APIs, variants, and accessibility support. Replace each existing usage with the shared version and delete the old implementations.

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

Scan for repeated colors, spacing, typography, and shadow values, then create semantically named tokens organized by primitive and semantic hierarchy. Document when to use each token rather than creating tokens for every 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, naming conventions, and documentation patterns first, then grow the system incrementally with clearly reusable patterns.

How do I migrate existing code to use shared components?▼

Search for all instances of the extracted pattern, update each use to consume the shared version, and verify visual and functional parity. Remove the old implementations once migration is complete.