Loading...
Loading...
When the user asks for a code review, shares code for feedback, or says "review this", "check my code", "what's wrong with this". Also activate when reviewing a pull request or diff.
npx skill4agent add shawnpang/startup-founder-skills code-reviewstartup-context# Code Review: [Feature/File Name]
## Summary
One-paragraph assessment: what the PR does, whether it is ready to merge, needs minor fixes, or needs rework.
## Findings
### Critical (must fix before merge)
- **[CRT-1] Title** — file:line — description, why it matters, suggested fix with code example
### Major (should fix before merge)
- **[MAJ-1] Title** — file:line — description, why it matters, suggested fix
### Minor (fix when convenient)
- **[MIN-1] Title** — file:line — description, suggestion
### Positive (things done well)
- **[POS-1] Title** — file:line — what was done well and why it matters
## Questions
Clarifying questions about non-obvious design choices before blocking on them.
## Suggested Tests
- Test case 1
- Test case 2| Severity | Definition | Action |
|---|---|---|
| Critical | Security vulnerability, data loss risk, crash in production, broken core functionality | Block merge |
| Major | Significant bug, performance regression, missing error handling on critical path, architectural violation | Should fix before merge |
| Minor | Style issue, naming improvement, minor optimization, documentation gap | Fix when convenient |
| Positive | Well-written code, good pattern usage, thoughtful error handling | Acknowledge and reinforce |
dangerouslySetInnerHTMLv-htmluser.postsfor user in userssecurity-reviewarchitecture-design# Code Review: POST /api/users Handler
## Summary
The handler creates users but has a critical SQL injection vulnerability and missing
input validation. Needs fixes before merge. Clean async/await usage is a positive.
## Findings
### Critical
- **[CRT-1] SQL Injection** — routes/users.js:14 — Email interpolated
directly into SQL string. Use parameterized queries:
`db.query('INSERT INTO users (email) VALUES ($1)', [email])`
### Major
- **[MAJ-1] No input validation** — routes/users.js:12 — Email from
`req.body` used with no validation. Add zod/joi schema validation.
- **[MAJ-2] Missing error handling** — routes/users.js:18 — DB errors
propagate as 500 with stack trace. Wrap in try/catch, return generic error.
### Positive
- **[POS-1] Clean async/await** — routes/users.js:11 — Easy to follow,
no callback nesting.
## Questions
- Is there a validation middleware already in the project that should be reused here?