跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 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

  1. Read docs/ARCHITECTURE.md section 5.

  2. Determine the type:

    • Feature component -> src/components/ComponentName.astro
    • Shared component -> src/shared/components/ComponentName.astro
    • Layout -> src/layouts/LayoutName.astro
  3. 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>
  1. Checklist:

    • Props interface defined
    • Props destructured from Astro.props
    • PascalCase.astro filename
    • Scoped <style> tag
    • No JavaScript shipped (zero JS)
    • No event handlers (use island if needed)
  2. Validate: npx astro check