api-code-review
Review backend code with a senior lead standard, focused on bugs, regressions, contract drift, clean architecture risks, and test gaps in apps/api and related shared contracts.
- License 许可
- MIT
- 最近更新
- 2026-08-18
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- api-code-review
- description
- Review backend code with a senior lead standard, focused on bugs, regressions, contract drift, clean architecture risks, and test gaps in apps/api and related shared contracts.
02 资源文件 3
- 参考文档agents/openai.yaml289 B
- 参考文档references/context.md1.1 KB
- 参考文档templates/checklist.md685 B
03 SKILL.md 正文
Skill: API Code Review
Context (Required)
- Folder scope + key patterns:
references/context.md - Review checklist:
templates/checklist.md
Use this skill when the user asks for review of backend changes, an API PR, or an audit of server-side implementation quality. Review like a senior lead: hunt bugs, regressions, contract drift, layering violations, and test gaps. Not a cosmetic review.
Workflow
1. Define the Review Surface
Read the diff or target files, then map the relevant surface:
apps/api/src/interfaces/httpapps/api/src/applicationapps/api/src/domainapps/api/src/infrastructurepackages/schemaspackages/typesdocs/openapi
If the change touches an endpoint, validator, DTO, or response shape, audit contract artifacts too.
2. Prioritize Real Risk
Find issues in this priority order:
- functional bugs and endpoint regressions
- clean architecture violations / boundary leakage
- validator, DTO, schema, type, and OpenAPI drift
- error handling and status code mismatch
- wrong persistence / queue side effects
- test gaps for important behavior
3. Audit Against Repo Standards
Check strictly:
- flow stays
route -> controller -> service -> use case - request validation does not leak into the wrong layer
- repository interface and implementation stay aligned
- errors bubble to
errorHandler, not handled ad hoc - request/response contract stays in sync with
packages/schemas,packages/types, anddocs/openapi - important behavior changes have relevant tests
4. Format the Review Output
The review must lead with findings, ordered by severity.
Format per finding:
- severity
[P1],[P2], or[P3] - short title
- affected file/area
- why this is a bug/risk/regression
- what should be fixed
After findings, you may add:
- open questions / assumptions
- residual risks or testing gaps
- brief change summary if needed
If no findings, state explicitly that there are none, then call out remaining risks or coverage gaps.
5. Do Not Silently Fix
This skill defaults to review, not implementation. Do not change code unless the user explicitly asks for a fix after the review.
Prohibitions
- NEVER open a review with praise or summary before findings.
- NEVER focus on style nits with no real impact on correctness or maintainability.
- NEVER skip drift between endpoint behavior and OpenAPI / shared types.
- NEVER treat the layering as clean just because tests pass; verify boundaries explicitly.
- NEVER fix code silently when the user only asked for a review.
Pre-Completion Checklist
- [ ] Review scope mapped from diff or target files
- [ ] Backend layering checked
- [ ] Contract artifacts checked when endpoint changes
- [ ] Findings ordered by severity
- [ ] No summary ahead of findings
- [ ] If no findings, residual risk or test gap still called out
- [ ] All files end with a newline (EOF)
04 同仓库更多 Skills
web-slicing
Convert screenshot/Figma designs into pixel-perfect frontend UI with reusable components. Use when the task focuses on visual and layout implementation.
web-seo-geo-friendly
Optimize public Next.js App Router pages for SEO and GEO (Generative Engine Optimization). Use when the user explicitly requests SEO/GEO optimization on public pages.
web-code-review
Review frontend code with a firm senior-lead standard, focusing on bugs, regressions, architecture risks, and test gaps in apps/web and the shared contracts the frontend depends on.
web-bugfix
Fix frontend bugs with minimum-touch changes, keep other surfaces stable, and sync schema, types, hooks, constants, tests, and related docs when impacted.
web-api-integrated
Integrate API endpoints into the frontend with Zod schemas, response types, constants, and react-query hooks. Use when implementing endpoints from an API contract, Postman, or Swagger.
skill-creator
Create a new skill from scratch with full structure — SKILL.md, references, templates, openai.yaml, Claude wrapper, and registration in manifest + AGENTS.md + CLAUDE.md.