1---
2name: reviewing-code
3description: Rigorously reviews changes, commits, PRs, and patches. Use when asked to review code, a PR, a diff, changes, or when the user says "review", "code review", or "look over this" or similar.
4license: GPL-3.0-or-later
5metadata:
6 author: Amolith <amolith@secluded.site>
7---
8
9Run a code review using the preferred tool.
10
11## Selection
12
13If a native code review tool is already available, use it directly. Otherwise, prefer the following in this order:
14
15```
16command -v kodus; command -v coderabbit; command -v amp
17```
18
19If CodeRabbit is rate-limited, use another. If none are usable, tell the user and stop.
20
21## CLI usage
22
23```bash
24kodus review --prompt-only --staged
25kodus review --prompt-only --branch main # Compare changes against branch
26kodus review --prompt-only --commit abc123
27kodus review --prompt-only src/auth.ts
28
29coderabbit review --prompt-only # all changes
30coderabbit review --prompt-only --type committed
31coderabbit review --prompt-only --type uncommitted
32coderabbit review --prompt-only --base main
33
34amp review # uncommitted changes
35amp review "HEAD~1"
36amp review "main...HEAD"
37amp review -f src/auth.ts
38amp review -i "explicit, detailed instructions to focus on something(s) in particular"
39```
40
41_Never_ impose a timeout.
42
43## Output
44
45Display issues as a numbered list:
46
47```
481. category (severity) - [file-basename](file-path#range): verbatim finding from the code review tool
49```
50
51Then ask:
52
53- If other code review tools are available: "Would you like me to fix any of these issues, rerun that, run it differently, or check with [Kodus, CodeRabbit, or Amp] as well?", only listing the available options
54- If only the one is: "Would you like me to fix any of these issues, rerun that, or run it differently?"
55
56If told to fix anything, do so, then go through the same review flow again and stop to present the follow-up review.