13 Phelan164
build-backend Skill
构建或修改后端 API、服务、后台任务、持久化和集成,同时保持契约、授权、数据完整性和失败行为。用于服务端功能、数据库变更、后台处理、后端缺陷和服务重构;仅前端或仅基础设施的工作不适用。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Build Backend
Domain contract
- Trace changed behavior from input through validation, authorization, domain
logic, persistence, side effects, and response mapping.
- Preserve published contracts unless the request explicitly changes them.
- Enforce authorization at a trustworthy server-side boundary.
- Validate untrusted input before domain or persistence operations.
- Keep multi-write operations atomic where partial state would violate invariants.
- Design external calls for timeouts, retries, idempotency, and duplicate delivery where applicable.
- Do not query or mutate production data without explicit authorization.
- Do not fabricate migration, framework, or API behavior; verify version-sensitive details.
- Avoid broad service abstractions that are used once.
Execute and verify
Read references/contracts-and-data.md when the task changes a public API, schema, transaction, job, or integration.
Implement the smallest change at the owning layer. Cover success, invalid
input, authorization, and material failure paths. Prefer:
reproducing/focused test → contract/integration test → type/lint → build
For migrations, validate forward behavior and document rollback or roll-forward strategy.