agentleFS
AdhamxonAdhamxon/claude-code-skills/.claude/skills/ui-component/SKILL.md

ui-component

Skill2 starsChanged 4 months agoMITView on GitHub

Generate a new UI component following the StyleSeed design conventions

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 7 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when you need generate a new UI component following the StyleSeed design conventions.

    line 16
  2. Distinctive:

    Read CLAUDE.md for component conventions

    line 32
  3. Very specific:

    Read css/theme.css for available design tokens

    line 33
  4. Very specific:

    Read components/ui/button.tsx as a reference pattern

    line 34
  5. Distinctive:

    Follow these conventions strictly:

    line 36
  6. Very specific:

    Use function declaration (not const)

    line 37
  7. Very specific:

    Use cn() from @/components/ui/utils for all className merging

    line 39
  8. Very specific:

    Use React.ComponentProps<> for prop typing

    line 40
  9. Very specific:

    Always support className prop for overrides

    line 41
  10. Very specific:

    Use CVA (class-variance-authority) if the component has variants

    line 42
  11. Very specific:

    Use semantic color tokens (bg-card, text-foreground) — never inline hex

    line 43
  12. Very specific:

    Use size-* shorthand instead of w-* h-*

    line 57
  13. Very specific:

    Use ms-*/me-* instead of ml-*/mr-* (logical properties)

    line 58
  14. Very specific:

    Use focus-visible:ring-2 focus-visible:ring-ring for keyboard focus

    line 63
  15. Distinctive:

    Place the file in the appropriate directory:

    line 68
  16. Distinctive:

    Use this skill only when the task clearly matches its upstream source and local project context.

    line 74
  17. Distinctive:

    Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.

    line 75
  18. Distinctive:

    Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 4 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

UI Component Generator

When to Use

Use this skill when you need generate a new UI component following the StyleSeed design conventions.

When NOT to use

  • For full-page scaffolding → use /ss-page
  • For composed multi-component patterns → use /ss-pattern
  • For tweaking an existing component — just edit the file directly
  • For non-StyleSeed projects (no components/ui/ directory or no Tailwind v4)

Generate a new component: $0 Description: $ARGUMENTS

Instructions

  1. First, read the design system seed for context:
    • Read CLAUDE.md for component conventions
    • Read css/theme.css for available design tokens
    • Read components/ui/button.tsx as a reference pattern
  2. Follow these conventions strictly:
    • Use function declaration (not const)
    • Add data-slot="component-name" attribute
    • Use cn() from @/components/ui/utils for all className merging
    • Use React.ComponentProps<> for prop typing
    • Always support className prop for overrides
    • Use CVA (class-variance-authority) if the component has variants
    • Use semantic color tokens (bg-card, text-foreground) — never inline hex
  3. Design token usage:
    • Colors: text-foreground, bg-card, text-brand, text-muted-foreground, border-border
    • Shadows: shadow-[var(--shadow-card)], shadow-[var(--shadow-elevated)]
    • Radius: rounded-md, rounded-lg, rounded-2xl
    • Spacing: multiples of 6px (p-1.5, p-3, p-6)
    • Motion: duration-[var(--duration-fast)], ease-[var(--ease-default)]
  4. Typography rules:
    • Display (36-48px): leading-none tracking-[-0.02em]
    • Heading (18-24px): leading-snug tracking-[-0.01em]
    • Body (14-17px): leading-normal (default tracking)
    • Caption uppercase (10-13px): tracking-[0.05em]
    • Use size-* shorthand instead of w-* h-*
    • Use ms-*/me-* instead of ml-*/mr-* (logical properties)
  5. Accessibility requirements:
    • Minimum touch target: 44x44px (min-h-11 min-w-11)
    • Support aria-* attributes passthrough
    • Use focus-visible:ring-2 focus-visible:ring-ring for keyboard focus
    • Respect prefers-reduced-motion for animations
  6. Export the component as a named export (not default)
  7. Place the file in the appropriate directory:
    • Primitive/reusable → src/components/ui/
    • Composed pattern → src/components/patterns/

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

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.