| name | self-review |
| description | Repo-specific pre-PR self-review. Runs a prioritised code review of the current diff and fans out to the domain-specific check subagents in .claude/agents/ instead of shallowly re-checking the same things by hand. Use before opening a PR, and whenever the user asks to "self-review", "review before pushing", or "/self-review".
|
Self-review
Run this before opening a PR. Report only - never silently fix findings,
surface them.
Scope
- Branch changes:
git diff <default-branch>...HEAD
- Uncommitted:
git diff HEAD
Priority table
| P | Category | Check |
|---|
| 1 | Bugs | Logic errors, off-by-one, null refs, unhandled exceptions |
| 1 | Security | Injection, exposed secrets, broken auth, missing input validation |
| 2 | Design | SOLID/DRY violations, wrong abstraction, unnecessary coupling |
| 2 | Performance | N+1 queries, blocking calls |
| 3 | Readability | Confusing names, dead code, missing edge cases |
| 4 | Style | Formatting, naming convention deviations |
Stop when the code is clean - don't invent issues.
Domain-specific checks - delegate, don't reinvent
Diff touches one of these? Run the matching subagent and fold its findings
in rather than re-checking the same thing shallowly yourself:
| Diff touches | Also run |
|---|
backend/src/Api/** (endpoint, Request record) or a DTO an endpoint returns | nswag-check |
backend/src/Domain/** or backend/src/Infrastructure/Persistence/** | ef-migration-check |
| A new endpoint/command/query/handler, or a type moved between layers | architecture-check |
A .tsx component or page under frontend/src/ | a11y-check |
frontend/src/locales/en.json/de.json, or a new t("...") call | i18n-check |
Output format
## Self-review: <branch or file>
### Must fix (P1)
- `file:line` - problem. Fix: action.
### Worth fixing (P2)
- `file:line` - problem. Fix: action.
### Minor (P3-P4)
- `file:line` - issue.
### Looks good
- What was clean.
Skip empty sections. Don't pad. Same pattern in several places? Say it once,
note the repetition. Don't review generated files (<auto-generated> header,
e.g. frontend/src/client/api-client.ts, backend/tests/IntegrationTests/ApiClient.cs)
or EF migrations (**/Migrations/*.cs). Missing tests on new logic = P2.