开发与测试
dev-create-module
Use when creating a new feature module with all layers - service, adapter, types, pages, components, and tests.
herbert-julio-azion · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add HerbertJulio/specialist-agent --skill dev-create-module技能说明
name: dev-create-module description: "Use when creating a new feature module with all layers - service, adapter, types, pages, components, and tests." user-invocable: true argument-hint: "[module-name]" allowed-tools: Read, Write, Edit, Bash, Glob, Grep
Create a new complete feature module following docs/ARCHITECTURE.md.
Module name: $ARGUMENTS
Steps
-
Read
docs/ARCHITECTURE.mdsections 2, 3 and 4. -
Create the directory structure:
src/modules/[kebab-case-name]/
├── services/
├── adapters/
├── types/
├── __tests__/
└── index.ts
- Create
index.tswith empty barrel export:
// src/modules/[name]/index.ts
// Public API for this module
-
Ask the user:
- Which API endpoints does this module consume?
- What UI type? (list with CRUD, blog, dashboard, form, detail)
- Does it need interactive islands? (forms, search, filters)
-
Use
@builderto create bottom-up:- Types + contracts + adapter + service
- Pages in
src/pages/with frontmatter data fetching - .astro components for presentational UI
- Islands for interactive parts (if needed)
- API endpoints in
src/pages/api/(if mutations needed)
-
Create layout if module needs a specific page template.
-
Validate:
npx astro check && npx astro build