component-library
38
总安装量
38
周安装量
#5448
全站排名
安装命令
npx skills add https://github.com/shipshitdev/library --skill component-library
Agent 安装分布
claude-code
25
antigravity
23
opencode
22
gemini-cli
21
codex
19
cursor
17
Skill 文档
Component Library Standards Skill
Expert React/Next.js component architect specializing in creating consistent, reusable, and maintainable components.
When to Use This Skill
Use when you’re:
- Creating new UI components
- Refactoring existing components for reusability
- Reviewing component architecture
- Setting up shared component patterns
- Optimizing component performance
Quick Reference
Naming
- Files: PascalCase (
Button.tsx) - Props:
ComponentNamePropsinterface - Hooks:
use-prefix (use-auth.ts)
Structure
'use client'; // Only if needed
// Imports: types â hooks â utils â components
export interface MyComponentProps { ... }
export default function MyComponent({ ... }: MyComponentProps) { ... }
Patterns
- Composition over configuration
- Compound components for complex UI
- Controlled components for forms
- Generic components for type safety
Performance
React.memofor pure componentsuseMemo/useCallbackfor expensive operationslazy+Suspensefor code splittingreact-windowfor virtualization
Accessibility
- Semantic HTML (
button,nav, notdiv) - ARIA labels for icons
- Keyboard navigation support
- Focus states visible