agentleFS
jagrat7jagrat7/linux-wallpaper-engine/.agents/skills/extract/SKILL.md

extract

Skill208 starsChanged 17 days agoMITView on GitHub

Extract and consolidate reusable components, design tokens, and patterns into your design system. Identifies opportunities for systematic reuse and enriches your component library. Use when the user asks to create components, refactor repeated UI patterns, build a design system, or extract tokens.

We split this skill into the rules it gives an agent

19 rules. 0 are common, 19 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 28 edited versions we read keep these.

  • 19

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    CRITICAL: If no design system exists, ask before creating one.

    line 20
  2. Distinctive:

    Identify patterns: Look for:

    line 22
  3. Distinctive:

    Assess value: Not everything should be extracted.

    line 28
  4. Distinctive:

    Create a systematic extraction plan:

    line 36
  5. Distinctive:

    Components: Create well-designed components with:

    line 50
  6. Distinctive:

    Design tokens: Create tokens with:

    line 56
  7. Distinctive:

    Patterns: Document patterns with:

    line 61
  8. Distinctive:

    When to use this pattern

    line 62
  9. Distinctive:

    Create components so generic they're useless

    line 68
  10. Distinctive:

    Create tokens for every single value (tokens should have semantic meaning)

    line 71
  11. Distinctive:

    Find all instances: Search for the patterns you've extracted

    line 77
  12. Distinctive:

    Replace systematically: Update each use to consume the shared version

    line 78
  13. Distinctive:

    Test thoroughly: Ensure visual and functional parity

    line 79
  14. Distinctive:

    Delete dead code: Remove the old implementations

    line 80
  15. Distinctive:

    Update design system documentation:

    line 84
  16. Distinctive:

    Add new components to the component library

    line 86
  17. Distinctive:

    Document token usage and values

    line 87
  18. Distinctive:

    Add examples and guidelines

    line 88
  19. Distinctive:

    Update any Storybook or component catalog

    line 89

“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Identify reusable patterns, components, and design tokens, then extract and consolidate them into the design system for systematic reuse.

Discover

Analyze the target area to identify extraction opportunities:

  1. Find the design system: Locate your design system, component library, or shared UI directory (grep for "design system", "ui", "components", etc.). Understand its structure:

    • Component organization and naming conventions
    • Design token structure (if any)
    • Documentation patterns
    • Import/export conventions

    CRITICAL: If no design system exists, ask before creating one. Understand the preferred location and structure first.

  2. Identify patterns: Look for:
    • Repeated components: Similar UI patterns used multiple times (buttons, cards, inputs, etc.)
    • Hard-coded values: Colors, spacing, typography, shadows that should be tokens
    • Inconsistent variations: Multiple implementations of the same concept (3 different button styles)
    • Reusable patterns: Layout patterns, composition patterns, interaction patterns worth systematizing
  3. Assess value: Not everything should be extracted. Consider:
    • Is this used 3+ times, or likely to be reused?
    • Would systematizing this improve consistency?
    • Is this a general pattern or context-specific?
    • What's the maintenance cost vs benefit?

Plan Extraction

Create a systematic extraction plan:

  • Components to extract: Which UI elements become reusable components?
  • Tokens to create: Which hard-coded values become design tokens?
  • Variants to support: What variations does each component need?
  • Naming conventions: Component names, token names, prop names that match existing patterns
  • Migration path: How to refactor existing uses to consume the new shared versions

IMPORTANT: Design systems grow incrementally. Extract what's clearly reusable now, not everything that might someday be reusable.

Extract & Enrich

Build improved, reusable versions:

  • Components: Create well-designed components with:
    • Clear props API with sensible defaults
    • Proper variants for different use cases
    • Accessibility built in (ARIA, keyboard navigation, focus management)
    • Documentation and usage examples
  • Design tokens: Create tokens with:
    • Clear naming (primitive vs semantic)
    • Proper hierarchy and organization
    • Documentation of when to use each token
  • Patterns: Document patterns with:
    • When to use this pattern
    • Code examples
    • Variations and combinations

NEVER:

  • Extract one-off, context-specific implementations without generalization
  • Create components so generic they're useless
  • Extract without considering existing design system conventions
  • Skip proper TypeScript types or prop documentation
  • Create tokens for every single value (tokens should have semantic meaning)

Migrate

Replace existing uses with the new shared versions:

  • Find all instances: Search for the patterns you've extracted
  • Replace systematically: Update each use to consume the shared version
  • Test thoroughly: Ensure visual and functional parity
  • Delete dead code: Remove the old implementations

Document

Update design system documentation:

  • Add new components to the component library
  • Document token usage and values
  • Add examples and guidelines
  • Update any Storybook or component catalog

Remember: A good design system is a living system. Extract patterns as they emerge, enrich them thoughtfully, and maintain them consistently.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.