.agents/skills/backend-code-review/SKILL.md
Use this skill whenever the user asks to review, analyze, or improve backend code (e.g., .py) under the api/ directory. Supports the following review modes:
api/..., api/app.py).Do NOT use this skill when:
.tsx, .ts, .js, web/).api/ (unless the user explicitly asks to review backend-related changes outside api/).Follow these steps when using this skill:
Notes when using this skill:
File:Line references when a file path and line numbers are available; otherwise, use the most specific identifier you can.api/models/ or api/migrations/, follow references/db-schema-rule.md to perform the reviewselect(...), session.execute(...), joins, CRUD) and is not under api/repositories, api/core/repositories, or api/extensions/*/repositories/, follow references/repositories-rule.md to perform the reviewCheck for:
Check for:
Check for:
Check for:
When this skill invoked, the response must exactly follow one of the two templates:
# Code Review Summary
Found <X> critical issues need to be fixed:
## π΄ Critical (Must Fix)
### 1. <brief description of the issue>
FilePath: <path> line <line>
<relevant code snippet or pointer>
#### Explanation
<detailed explanation and references of the issue>
#### Suggested Fix
1. <brief description of suggested fix>
2. <code example> (optional, omit if not applicable)
---
... (repeat for each critical issue) ...
Found <Y> suggestions for improvement:
## π‘ Suggestions (Should Consider)
### 1. <brief description of the suggestion>
FilePath: <path> line <line>
<relevant code snippet or pointer>
#### Explanation
<detailed explanation and references of the suggestion>
#### Suggested Fix
1. <brief description of suggested fix>
2. <code example> (optional, omit if not applicable)
---
... (repeat for each suggestion) ...
Found <Z> optional nits:
## π’ Nits (Optional)
### 1. <brief description of the nit>
FilePath: <path> line <line>
<relevant code snippet or pointer>
#### Explanation
<explanation and references of the optional nit>
#### Suggested Fix
- <minor suggestions>
---
... (repeat for each nits) ...
## β
What's Good
- <Positive feedback on good patterns>
## Code Review Summary
β
No issues found.