Ui component
Skill syniol/llm-software-project/.agent/skills/ui-component
Instructions for creating UI components following the design system, accessibility standards, and file structure conventions.From its SKILL.md
npx -y skills add syniol/llm-software-project --skill ui-componentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.8 KB, 424 tokens by cl100k_base, as published. Nobody here has run it
UI Component Creation Skill
When creating a new UI component, follow this procedure exactly:
1. File Structure
Every component must produce these files:
components/
└── MyComponent/
├── MyComponent.tsx # Component implementation
├── MyComponent.test.tsx # Unit tests (React Testing Library)
├── MyComponent.stories.tsx # Storybook stories
└── index.ts # Barrel export
2. Props Interface
- Define a
Propsinterface with JSDoc on every prop. - Export the interface for consumer use.
/** Props for the MyComponent component. */
export interface MyComponentProps {
/** The primary label displayed to the user. */
label: string;
/** Optional click handler. */
onClick?: () => void;
/** Visual variant. Defaults to 'primary'. */
variant?: 'primary' | 'secondary' | 'ghost';
}
3. Accessibility (WCAG 2.1 AA)
- All interactive elements must have
aria-labelor visible label text. - Colour contrast ratio must be at least 4.5:1 for normal text, 3:1 for large text.
- Support keyboard navigation (
Tab,Enter,Escape). - Include
roleattributes where semantic HTML is insufficient.
4. Design System Tokens
- Use design tokens for all colours, spacing, typography, and radii. Never hardcode values.
- Example:
var(--color-primary),var(--spacing-md),var(--radius-lg).
5. Responsive Breakpoints
| Breakpoint | Min Width | Target |
|---|---|---|
sm | 640px | Mobile |
md | 768px | Tablet |
lg | 1024px | Small Desktop |
xl | 1280px | Large Desktop |
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.