设计与 UI
dev-create-component
Use when adding a new UI component to the project - handles templates, props, and scoped styles.
herbert-julio-azion · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add HerbertJulio/specialist-agent --skill dev-create-component技能说明
name: dev-create-component description: "Use when adding a new UI component to the project - handles templates, props, and scoped styles." user-invocable: true argument-hint: "[ComponentName]" allowed-tools: Read, Write, Edit, Bash, Glob, Grep
Create an Astro component following docs/ARCHITECTURE.md section 5.
Component: $ARGUMENTS
Steps
-
Read
docs/ARCHITECTURE.mdsection 5. -
Determine the type:
- Feature component ->
src/components/ComponentName.astro - Shared component ->
src/shared/components/ComponentName.astro - Layout ->
src/layouts/LayoutName.astro
- Feature component ->
-
Create the component with the standard template:
---
interface Props {
// type all props
}
const { prop1, prop2 } = Astro.props
---
<div class="component-name">
<!-- clean template -->
</div>
<style>
/* scoped styles */
</style>
-
Checklist:
Propsinterface defined- Props destructured from
Astro.props - PascalCase.astro filename
- Scoped
<style>tag - No JavaScript shipped (zero JS)
- No event handlers (use island if needed)
-
Validate:
npx astro check