frontend-components
设计具有单一职责、清晰接口和适当状态管理的可重用、可组合UI组件。在创建或重构React、Vue、Svelte或其他框架组件时使用此技能。在定义组件props、接口或API时。在管理组件状态或将状态提升到父组件时。在构建可重用的UI元素,如按钮、卡片、表单、模态框或列表时。在实现组件组合模式时。在使用组件文件(.jsx, .tsx, .vue, .svelte)时。在记录组件使用情况或创建组件库时。
📖 中文导读:设计具有单一职责、清晰接口和适当状态管理的可重用、可组合UI组件。在创建或重构React、Vue、Svelte或其他框架组件时使用此技能。在定义组件props、接口或API时。在管理组件状态或将状态提升到父组件时。在构建可重用的UI元素,如按钮、卡片、表单、模态框或列表时。在实现组件组合模式时。在使用组件文件(.jsx, .tsx, .vue, .svelte)时。在记录组件使用情况或创建组件库时。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Frontend Components description: Design reusable, composable UI components with single responsibility, clear interfaces, and proper state management. Use this skill when creating or refactoring React, Vue, Svelte, or other framework components. When defining component props, interfaces, or APIs. When managing component state or lifting state up to parent components. When building reusable UI elements like buttons, cards, forms, modals, or lists. When implementing component composition patterns. When working with component files (.jsx, .tsx, .vue, .svelte). When documenting component usage or creating component libraries.
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 new UI components in React, Vue, Svelte, or similar frameworks
- When refactoring existing components to improve reusability or composability
- When defining component props, interfaces, TypeScript types, or default values
- When managing local component state or deciding whether to lift state up
- When building reusable UI elements (buttons, cards, inputs, modals, dropdowns)
- When implementing component composition patterns (children, slots, render props)
- When working with component files (.jsx, .tsx, .vue, .svelte, .js)
- When splitting large components into smaller, focused sub-components
- When documenting component usage, props, or creating component libraries
- When encapsulating component logic and keeping internal details private
Instructions
For details, refer to the information provided in this file: frontend components