Code review
Review code for quality, correctness, security, and adherence to project conventions. Use before opening a PR, when asked to review code, or when self-reviewing changes before committing. Triggers include "review this code", "self-review", "PR review", "check my changes", "before I push".From its SKILL.md
npx -y skills add tapway/tapway-superpowers --skill code-reviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.2 KB, as published. Nobody here has run it
Skill: Code Review
When to invoke: Before opening a PR, when asked to review code, when reviewing your own changes before committing.
Two Modes
Requesting a Review (self-review before PR)
- Run
git diff main...HEADto see all changes - Apply the checklist below
- Fix all Critical and Warning issues before opening PR
- Open PR with the template from
.github/pull_request_template.md
Receiving a Review (responding to reviewer feedback)
- Read every comment β don't skim
- For each comment: Acknowledge, Fix, or Discuss (never silently ignore)
- Re-run tests after all fixes
- Request re-review only when all items are resolved
Review Checklist
π΄ Critical (block merge)
- No secrets, credentials, or API keys in code
- No SQL string interpolation (use parameterized queries)
- All user inputs validated (Zod on frontend, Pydantic on backend)
- Auth/authorization checks on all non-public endpoints
- No
console.log/printwith sensitive data in production paths - No
anytype in TypeScript (unless explicitly annotated with reason)
π‘ Warnings (should fix, discuss if not)
- Error cases all handled (no silent failures)
- No N+1 queries (use
.select_related()/ eager loading) - Functions < 50 lines; files < 300 lines
- Tests cover the happy path AND the key error paths
- Naming is clear β no abbreviations, no
data,stuff,temp - No scope creep (Karpathy): Every changed line traces to the stated goal. Flag changes to files or logic outside the PR's scope β even if they seem like improvements
- No unnecessary abstractions: Don't extract single-use code into helpers, don't add flexibility that isn't needed yet
π΅ Suggestions (nice to have)
- Simplicity check: Could this be shorter? If 200 lines can become 50, say so
- Is there a reusable utility here?
- Missing docstring on public function?
- Would a type alias make this more readable?
Database Layers (if the diff touches SQLAlchemy/DB code)
For diffs that touch models, queries, migrations, or DB-backed endpoints, run the
db-reviewer subagent in addition to this checklist β it covers N+1 detection,
index coverage, migration safety, and EXPLAIN ANALYZE in depth:
Run the db-reviewer agent over this diff (N+1, indexes, migrations, query plans).
Output Format
## Code Review
### Summary
[1-2 sentence overview of what the change does]
### Issues
**Critical**
- [ ] `src/api/auth.py:42` β SQL query uses string interpolation β use `db.execute(text(...), {"param": value})`
**Warnings**
- [ ] `UserService.create()` doesn't handle duplicate email β add try/except for `IntegrityError`
**Suggestions**
- [ ] Extract the token validation into a shared `verify_token()` utility
### Verdict
β Request Changes / β
Approve