anclax-develop-feature
1
总安装量
1
周安装量
#42885
全站排名
安装命令
npx skills add https://github.com/cloudcarver/anclax --skill anclax-develop-feature
Agent 安装分布
opencode
1
codex
1
claude-code
1
Skill 文档
Anclax Development Workflow
Use Anclax generated types as the contract between layers and keep specs/SQL as the source of truth.
Core flow
- Inspect
anclax.yamlto learn generation paths and enabled generators. - Update sources first:
- OpenAPI:
api/v1.yaml - Tasks:
api/tasks.yaml - DB schema:
sql/migrations - Queries:
sql/queries
- OpenAPI:
- Run
anclax genafter any spec/SQL/Wire changes. - Implement code against generated interfaces and types.
- Add unit tests for service logic with mocks.
Layering rules
- Handler: parse HTTP, call service, map errors to HTTP responses.
- Service: implement business logic, accept and return
apigentypes. - Model: use
pkg/zcore/modeland sqlc-generated queries. - Async tasks: define in
api/tasks.yaml, implementtaskgen.ExecutorInterface, enqueue viataskgen.TaskRunner.
References and Examples
- CRUD operations: End-to-end CRUD flow and mapping examples.
- OpenAPI Spec: Conventions for OpenAPI specs in Anclax.
- Business Logic: Service-layer rules and error handling.
- Database: SQL/schema rules and transaction helpers.
- Dependency Injection: Wire DI conventions.
- Async Tasks: Task definitions, execution, retries, and hooks.