extract

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

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/Ssrrb/cerramos-codebase --skill extract-ssrrb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: extract
Source: https://github.com/Ssrrb/cerramos-codebase/tree/main/.codex/skills/extract
Command: npx skills add https://github.com/Ssrrb/cerramos-codebase --skill extract-ssrrb

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. ## 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 assistant to extract reusable components and design tokens from a 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?▼

Scan the codebase for UI patterns used three or more times, then build a shared component with a clear props API, variants, and accessibility support. Replace each existing usage with the shared version and delete the old implementations.

When should hard-coded values become design tokens?▼

Convert colors, spacing, typography, and shadows into tokens when they repeat across components and carry semantic meaning. Avoid creating tokens for every single value, since tokens should represent reusable design decisions.

What if my project has no design system yet?▼

The Skill requires confirming the preferred location and structure before creating one. It will not scaffold a new design system directory without first asking where and how it should be organized.

Which patterns should not be extracted into a design system?▼

Avoid extracting one-off, context-specific implementations or components so generic they become useless. Extraction is justified when a pattern is used three or more times and systematizing it improves consistency more than it costs to maintain.

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

Find all instances of the extracted pattern, update each to consume the shared version, then verify visual and functional parity through testing. Remove the old implementations only after migration is confirmed.