frontend-components
设计可重用、可组合的UI组件,具有单一职责、清晰的props接口、最小状态管理和适当的封装。在创建或修改React组件、Vue组件、Svelte组件、web组件或任何模块化UI构建块时使用此技能。在设计和props及默认值的组件API、管理组件状态、将较小的组件组合成较大的UI、记录组件用法、实现组件生命周期方法或确保组件在不同上下文中可重用时使用此技能。在处理组件目录(如components/、src/components/或app/components/)中的.jsx、.tsx、.vue、.svelte文件时使用此技能。
📖 中文导读:设计可重用、可组合的UI组件,具有单一职责、清晰的props接口、最小状态管理和适当的封装。在创建或修改React组件、Vue组件、Svelte组件、web组件或任何模块化UI构建块时使用此技能。在设计和props及默认值的组件API、管理组件状态、将较小的组件组合成较大的UI、记录组件用法、实现组件生命周期方法或确保组件在不同上下文中可重用时使用此技能。在处理组件目录(如components/、src/components/或app/components/)中的.jsx、.tsx、.vue、.svelte文件时使用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Frontend Components description: Design reusable, composable UI components with single responsibility, clear props interfaces, minimal state management, and proper encapsulation. Use this skill when creating or modifying React components, Vue components, Svelte components, web components, or any modular UI building blocks. Use this when designing component APIs with props and defaults, managing component state, composing smaller components into larger UIs, documenting component usage, implementing component lifecycle methods, or ensuring components are reusable across different contexts. Use this when working on .jsx, .tsx, .vue, .svelte files in component directories like components/, src/components/, or app/components/.
Frontend Components
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle frontend components.
When to use this skill:
- When creating or editing component files in directories like components/, src/components/, app/components/
- When building React (.jsx, .tsx), Vue (.vue), Svelte (.svelte), or other framework components
- When designing component props interfaces with clear types and sensible defaults
- When managing component-level state and deciding when to lift state up
- When composing smaller components together to build complex UIs
- When implementing component lifecycle methods (useEffect, onMount, etc.)
- When ensuring components have single responsibility and focused purpose
- When creating reusable components that work across different contexts
- When documenting component usage, props, and providing code examples
- When encapsulating component implementation details and exposing clean APIs
- When refactoring large components into smaller, more manageable pieces
Instructions
For details, refer to the information provided in this file: frontend components