Review with Crit skill

Review code changes, a plan, a live page (running dev server), or a local HTML file with Crit inline comments and structured human feedback.

by tomasz-tomczyk·MIT license·★ 1,168 Stars on the repo·GitHub ↗

Use now

Files of Review with Crit

tomasz-tomczyk/main1 file shown
SKILL.md
Show the full text141 lines

Review with Crit

This is the interactive, human-in-the-browser review cycle. Run it only after the user explicitly invokes /crit or directly asks to use Crit. A generic request to review code, a plan, a diff, a PR, or a page does not count.

Review and revise code changes, plans, live pages (running dev servers, staging URLs), or local HTML files using crit for inline comment review.

Step 1: Pass arguments to crit

The CLI auto-detects the review mode from its arguments. Do not ask the user which mode to use. Pass arguments through:

crit <arguments>               # file, dir, URL, .html — CLI auto-detects mode
crit --pr <num|url>            # GitHub PR (range mode)
crit --mr <iid|url>            # GitLab MR (range mode)
crit --range <base>..<head>    # commit range (range mode)
crit                           # no args → branch diff

If no arguments, check conversation context:

  1. A plan file was written earlier in this conversation → crit <plan-file>
  2. Otherwise → bare crit (branch diff)
<important if="the user wants to open the review from another device — e.g. a phone over Tailscale"> Keep crit on loopback and reverse-proxy in. Same Step 1 args still apply (file, bare `crit`, etc.):
crit --public-url "https://<machine>.ts.net" --allow-unauthenticated-network --no-open [args…]
# then: tailscale serve --bg --https=443 http://127.0.0.1:<port>
  • --public-url only changes the URL crit prints — it does not expose the server.
  • --allow-unauthenticated-network is required with --public-url (even on loopback) and with any non-loopback --host. Crit has no auth: anyone who can reach the URL can read the repo and post comments that may trigger agents. Confirm the user wants that blast radius.
  • Do not bind --host to a Tailscale/LAN IP — proxy with tailscale serve (or an SSH tunnel). Get <port> from crit's startup output, or fix it with -p. Relay the URL crit prints (the public one), not localhost.</important>

Step 2: Launch crit and block until review completes

CRITICAL — you MUST run this step. Do NOT skip it. Do NOT proceed without it.

Run crit in the foreground and block until it exits:

crit <plan-file>   # specific file
crit               # git mode

If a crit server is already running from earlier in this conversation, crit automatically connects to it. Starting from scratch, it spawns the daemon, opens the browser, and blocks until the user clicks "Finish Review".

crit prints the review URL on startup (e.g. Started crit daemon at http://localhost:<port>). Relay it verbatim:

"Crit is open at http://localhost:<port>. Leave inline comments, then click Finish Review."

Do NOT proceed until crit completes. Do NOT ask the user to type anything. Do NOT read the review file early. Wait for the foreground command to finish — that is how you know the human is done reviewing.

Step 3: Read the review output

When crit completes, read stdout and follow its instructions. Check stderr for approved: true or approved: false.

When a comment has quote, anchor, or drifted:

  • quote: the specific text the reviewer selected — focus your changes on the quoted text rather than the entire line range
  • anchor: use it to locate the current position of the content; line numbers may be stale after edits
  • drifted: true: original content was removed or heavily rewritten — line numbers are approximate at best

Fallback (mid-round re-entry, plan hooks, or headless workflows): crit comments / crit comments --json. Use crit comments --plan <slug> for plan-mode reviews.

Step 4: Address each review comment

For each unresolved comment:

  1. Understand what the comment asks for
  2. If it contains a suggestion block, apply that specific change
  3. Revise the referenced file (plan or code file from the diff)
  4. Reply with what you did: crit comment --reply-to <id> --author 'Amp' '<what you did>' (reply bodies support markdown)
  5. Do not pass --resolve. Resolving is the reviewer's call. Only add --resolve if the user explicitly asks.

Editing the plan file triggers Crit's live reload — the user sees changes in the browser immediately.

<important if="you are revising in plan mode"> Re-emit the revised plan inside `<proposed_plan>...</proposed_plan>` so Crit can review the new version. </important>
When replying to multiple comments

Use --json for a single bulk call instead of one invocation per comment:

echo '[
  {"reply_to": "c_a1b2c3", "body": "Fixed"},
  {"reply_to": "c_d4e5f6", "body": "Refactored as suggested"}
]' | crit comment --json --author 'Amp'

For long or multi-line bodies, write the JSON to a file and pass --file. Use --file, not a < redirect.

crit comment --json --file /tmp/replies.json --author 'Amp'

Step 5: Signal completion and start next round

CRITICAL — you MUST run this step. Do NOT skip it. Do NOT proceed without it.

The finish prompt on stdout includes the command to run again — use it to start a new round.

On subsequent calls, crit automatically signals round-complete first, then blocks until the next "Finish Review" click.

Tell the user: "Changes applied. Review the diff in your browser and click Finish Review when ready."

Do NOT proceed until crit completes. When it does, return to Step 3. If the user finishes with zero comments, the review is approved — stop the loop and proceed.

Sharing

If the user asks for a URL, a shareable link, or to share the review:

crit share <file>

Always relay the full output to the user — copy the URL directly into your response. Don't make them dig through tool output.

To remove a shared review:

crit unpublish [file...]
QR codes

Only use --qr in real terminal environments with monospace rendering. Skip it in mobile apps or web chat UIs — Unicode block characters won't render.

crit share --qr <file>
1---
2name: crit
3description: "Review code changes, a plan, a live page (running dev server), or a local HTML file with Crit inline comments and structured human feedback. Use only when the user explicitly invokes /crit or directly asks to use Crit; a generic review request does not count."
4---
5 
6# Review with Crit
7 
8This is the interactive, human-in-the-browser review cycle. Run it only after
9the user explicitly invokes `/crit` or directly asks to use Crit. A generic
10request to review code, a plan, a diff, a PR, or a page does not count.
11 
12Review and revise code changes, plans, live pages (running dev servers, staging URLs), or local HTML files using `crit` for inline comment review.
13 
14## Step 1: Pass arguments to `crit`
15 
16The CLI auto-detects the review mode from its arguments. **Do not ask the user which mode to use.** Pass arguments through:
17 
18```
19crit <arguments> # file, dir, URL, .html — CLI auto-detects mode
20crit --pr <num|url> # GitHub PR (range mode)
21crit --mr <iid|url> # GitLab MR (range mode)
22crit --range <base>..<head> # commit range (range mode)
23crit # no args → branch diff
24```
25If no arguments, check conversation context:
26 
271. A plan file was written earlier in this conversation → `crit <plan-file>`
282. Otherwise → bare `crit` (branch diff)
29 
30<important if="the user wants to open the review from another device — e.g. a phone over Tailscale">
31Keep crit on loopback and reverse-proxy in. Same Step 1 args still apply (file, bare `crit`, etc.):
32 
33```bash
34crit --public-url "https://<machine>.ts.net" --allow-unauthenticated-network --no-open [args…]
35# then: tailscale serve --bg --https=443 http://127.0.0.1:<port>
36```
37 
38- `--public-url` only changes the URL crit prints — it does **not** expose the server.
39- `--allow-unauthenticated-network` is required with `--public-url` (even on loopback) and with any non-loopback `--host`. Crit has no auth: anyone who can reach the URL can read the repo and post comments that may trigger agents. Confirm the user wants that blast radius.
40- **Do not bind `--host` to a Tailscale/LAN IP** — proxy with `tailscale serve` (or an SSH tunnel). Get `<port>` from crit's startup output, or fix it with `-p`. Relay the URL crit prints (the public one), not localhost.
41</important>
42 
43## Step 2: Launch crit and block until review completes
44 
45**CRITICAL — you MUST run this step. Do NOT skip it. Do NOT proceed without it.**
46 
47Run `crit` in the foreground and block until it exits:
48 
49```bash
50crit <plan-file> # specific file
51crit # git mode
52```
53 
54If a crit server is already running from earlier in this conversation, `crit` automatically connects to it. Starting from scratch, it spawns the daemon, opens the browser, and blocks until the user clicks "Finish Review".
55 
56`crit` prints the review URL on startup (e.g. `Started crit daemon at http://localhost:<port>`). Relay it verbatim:
57 
58> **"Crit is open at http://localhost:<port>. Leave inline comments, then click Finish Review."**
59 
60**Do NOT proceed until `crit` completes.** Do NOT ask the user to type anything. Do NOT read the review file early. Wait for the foreground command to finish — that is how you know the human is done reviewing.
61 
62## Step 3: Read the review output
63 
64When `crit` completes, read **stdout** and follow its instructions. Check **stderr** for `approved: true` or `approved: false`.
65 
66When a comment has `quote`, `anchor`, or `drifted`:
67- `quote`: the specific text the reviewer selected — focus your changes on the quoted text rather than the entire line range
68- `anchor`: use it to locate the current position of the content; line numbers may be stale after edits
69- `drifted: true`: original content was removed or heavily rewritten — line numbers are approximate at best
70 
71**Fallback** (mid-round re-entry, plan hooks, or headless workflows): `crit comments` / `crit comments --json`. Use `crit comments --plan <slug>` for plan-mode reviews.
72 
73## Step 4: Address each review comment
74 
75For each unresolved comment:
76 
771. Understand what the comment asks for
782. If it contains a suggestion block, apply that specific change
793. Revise the referenced file (plan or code file from the diff)
804. Reply with what you did: `crit comment --reply-to <id> --author 'Amp' '<what you did>'` (reply bodies support markdown)
815. **Do not pass `--resolve`.** Resolving is the reviewer's call. Only add `--resolve` if the user explicitly asks.
82 
83Editing the plan file triggers Crit's live reload — the user sees changes in the browser immediately.
84 
85<important if="you are revising in plan mode">
86Re-emit the revised plan inside `<proposed_plan>...</proposed_plan>` so Crit can review the new version.
87</important>
88 
89### When replying to multiple comments
90 
91Use `--json` for a single bulk call instead of one invocation per comment:
92 
93```bash
94echo '[
95 {"reply_to": "c_a1b2c3", "body": "Fixed"},
96 {"reply_to": "c_d4e5f6", "body": "Refactored as suggested"}
97]' | crit comment --json --author 'Amp'
98```
99 
100For long or multi-line bodies, write the JSON to a file and pass `--file`. Use `--file`, not a `<` redirect.
101 
102```bash
103crit comment --json --file /tmp/replies.json --author 'Amp'
104```
105 
106## Step 5: Signal completion and start next round
107 
108**CRITICAL — you MUST run this step. Do NOT skip it. Do NOT proceed without it.**
109 
110The finish prompt on stdout includes the command to run again — use it to start a new round.
111 
112On subsequent calls, `crit` automatically signals round-complete first, then blocks until the next "Finish Review" click.
113 
114Tell the user: **"Changes applied. Review the diff in your browser and click Finish Review when ready."**
115 
116**Do NOT proceed until `crit` completes.** When it does, return to Step 3. If the user finishes with zero comments, the review is approved — stop the loop and proceed.
117 
118## Sharing
119 
120If the user asks for a URL, a shareable link, or to share the review:
121 
122```bash
123crit share <file>
124```
125 
126**Always relay the full output to the user** — copy the URL directly into your response. Don't make them dig through tool output.
127 
128To remove a shared review:
129 
130```bash
131crit unpublish [file...]
132```
133 
134### QR codes
135 
136Only use `--qr` in real terminal environments with monospace rendering. Skip it in mobile apps or web chat UIs — Unicode block characters won't render.
137 
138```bash
139crit share --qr <file>
140```
141 

Discussion