component-design
About
This skill designs React/Vue components using atomic design principles and composition patterns. It provides guidance for creating consistent, reusable UI components with patterns like compound components and render props. Use it when building or structuring component libraries for scalable frontend development.
Quick Install
Claude Code
Recommended/plugin add https://github.com/majiayu000/claude-skill-registrygit clone https://github.com/majiayu000/claude-skill-registry.git ~/.claude/skills/component-designCopy and paste this command in Claude Code to install this skill
Documentation
Component Design Skill
Purpose
Create consistent, reusable UI components.
Atomic Design
Reference: patterns/atomic-design.md
Hierarchy
- Atoms: Basic elements (Button, Input, Label)
- Molecules: Simple groups (FormField, SearchBox)
- Organisms: Complex sections (Header, Form, Card)
- Templates: Page layouts
- Pages: Specific instances
Component Patterns
Reference: patterns/composition.md
Compound Components
<Select>
<Select.Trigger />
<Select.Content>
<Select.Item value="1">Option 1</Select.Item>
</Select.Content>
</Select>
Render Props
<DataFetcher url="/api/users">
{({ data, loading }) => (
loading ? <Spinner /> : <UserList users={data} />
)}
</DataFetcher>
Custom Hooks
function useUser(id: string) {
const [user, setUser] = useState(null);
const [loading, setLoading] = useState(true);
// ...
return { user, loading, error };
}
Props Interface
interface ButtonProps {
/** Visual variant of the button */
variant?: 'primary' | 'secondary' | 'ghost';
/** Size of the button */
size?: 'sm' | 'md' | 'lg';
/** Whether button is disabled */
disabled?: boolean;
/** Click handler */
onClick?: () => void;
/** Button content */
children: React.ReactNode;
}
Component Template
Use: templates/component-template.tsx
State Management
Reference: patterns/state-management.md
Decision Tree
- UI-only state →
useState - Complex local state →
useReducer - Shared between siblings → Lift to parent
- Shared across app → Context or global store
- Server state → React Query/SWR
GitHub Repository
Related Skills
content-collections
MetaThis skill provides a production-tested setup for Content Collections, a TypeScript-first tool that transforms Markdown/MDX files into type-safe data collections with Zod validation. Use it when building blogs, documentation sites, or content-heavy Vite + React applications to ensure type safety and automatic content validation. It covers everything from Vite plugin configuration and MDX compilation to deployment optimization and schema validation.
creating-opencode-plugins
MetaThis skill provides the structure and API specifications for creating OpenCode plugins that hook into 25+ event types like commands, files, and LSP operations. It offers implementation patterns for JavaScript/TypeScript modules that intercept and extend the AI assistant's lifecycle. Use it when you need to build event-driven plugins for monitoring, custom handling, or extending OpenCode's capabilities.
langchain
MetaLangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.
Algorithmic Art Generation
MetaThis skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.
