Skip to content
jacygaoPublic

Repository files navigation

squiz: peer review between coding agents. On a pull request's review thread, the reviewer finds that parseConfig() can return nil, Claude Code adds a nil check and a test, the reviewer confirms, and the thread is resolved.

Squiz

Squiz is a fully automated code review. When your coding agent finishes its work, a reviewer on a different harness and a different model reviews the pull request, and the two work every finding out in its review thread. It works as a plugin for Claude Code and for the GitHub Copilot CLI.

See it in a real pull request: #703.

Warning

Squiz is experimental. Expect bugs, and expect commands and settings to change between versions. Its Copilot support is experimental too, because it relies on Copilot's experimental features.

Prerequisites

  • Node 24 or later.
  • git, with gh signed in (gh auth login) for reviews on GitHub.
  • Your coding agent: Claude Code or the GitHub Copilot CLI.
  • Your reviewer: the GitHub Copilot CLI or pi.

Install

Claude Code

claude plugin marketplace add jacygao/squiz
claude plugin install squiz@squiz

Then, in a Claude Code session:

! squiz init

This lets you run squiz from your own terminal too, and lets the coding agent run its three squiz commands without asking. Run it again in a new session after each update.

Copilot

copilot plugin marketplace add jacygao/squiz
copilot plugin install squiz@squiz
copilot --experimental   # once, so squiz can wake your Copilot session
~/.copilot/installed-plugins/squiz/squiz/bin/squiz init   # once per machine

If you set COPILOT_HOME, use it in place of ~/.copilot. If Claude Code has squiz too, type ! squiz init there instead of the last line.

Set up a project

Let the coding agent run its three squiz commands without asking.

Claude Code: squiz init has already done this, for every project. It adds these rules to your own ~/.claude/settings.json, or to $CLAUDE_CONFIG_DIR/settings.json if you set that, beside any rules already there:

{
  "permissions": {
    "allow": ["Bash(squiz review *)", "Bash(squiz threads)", "Bash(squiz reply *)"]
  }
}

Copilot, when you start a session:

copilot --allow-tool='shell(squiz)'

Copilot matches a rule on the command's name alone, so this allows every squiz subcommand, not just the three. Other commands, and anything chained after squiz with && or ;, still ask. The three start reviews and post replies on GitHub as you.

That is all. A review starts each time the coding agent finishes its work on a branch with an open pull request.

Configure squiz

Every setting has a default, so a project needs no configuration file. To change one, put .squiz.json at the root of the repository's main worktree, the one holding .git. Every worktree of the repository reads it from there, and never its own:

Setting Default Range
venue github Where reviews happen: github, on the pull request, or local, on the working tree of a repository with no remote
reviewer pi The reviewer CLI, pi or copilot
rounds 3 The most rounds one review runs, 1 to 8
timeout 900 Seconds one round's reviewer may run, 60 to 3,600
tokens 10,000,000 Tokens one round may spend, 100,000 to 10,000,000
thinking medium How hard the reviewer thinks: off, minimal, low, medium, high, xhigh or max
model none The model the reviewer runs on, in its CLI's spelling: openai/gpt-5-mini for pi, gpt-5-mini for Copilot. Up to 200 letters, digits and . _ : / @ + -, starting with a letter, a digit or @. None runs it on the CLI's own default
copilotTokenFile none The absolute path of a file holding the token a Copilot reviewer signs in with. None reads ~/.config/squiz/copilot-token where it exists, and otherwise leaves Copilot on its own login

This one reviews with Copilot on a chosen model:

{
  "reviewer": "copilot",
  "model": "gpt-5-mini"
}

A value outside its range, or a key not in the table, is refused with an error naming it. Nothing checks that the reviewer's model differs from the coding agent's. Where Copilot writes and reviews, or its default model is the one Claude Code runs, set model to one the coding agent does not use.

Signing the Copilot reviewer in with a token

A Copilot reviewer signs in with your copilot login where it finds one. On a machine with no login, put a token in a file instead:

mkdir -p ~/.config/squiz
printf '%s\n' "$TOKEN" > ~/.config/squiz/copilot-token
chmod 600 ~/.config/squiz/copilot-token

Squiz reads that file when .squiz.json names no copilotTokenFile, and says nothing where it does not exist. To keep the token elsewhere, name its file in copilotTokenFile. A file that setting names and squiz cannot read fails the review, while a default file it cannot read is a warning in squiz doctor. The file holds the token alone, and must sit outside the repository, where the reviewer cannot read it. COPILOT_GITHUB_TOKEN is no substitute: Copilot leaves it out of the environment its hooks run in.

Check the setup

Run squiz doctor in the repository you want reviewed: ! squiz doctor in Claude Code, or squiz doctor in a shell once squiz init has linked it. It prints a line for each dependency and exits 1 where a required one is missing or signed out:

git 2.54.0
Venue github (/Users/jacy/squiz/.squiz.json)
gh 2.97.0, signed in as jacygao
Claude Code 2.1.292
Node 24.15.0
tmux 3.7b
Herdr 0.9.3
squiz link: none on PATH. Not required in Claude Code, whose own shell runs squiz; for another coding agent, run squiz init
Reviewer copilot 1.0.93 (/Users/jacy/squiz/.squiz.json), model gpt-6-astra, Copilot's default. Signed in with Copilot's own login; the check spent one request on gpt-6-astra

The last line names the reviewer and the model it will run on, read from the .squiz.json it names. For a Copilot reviewer, it checks the sign-in by sending one prompt to that model, which spends one request at that model's rate, and says whether it signed in with a token file or Copilot's own login. Where the Copilot CLI is installed, a line after Claude Code's says whether its experimental features are on, and warns where they are off.

squiz status lists the reviews running and finished in every worktree of the repository.

Contributing

Contributions are welcome. To work on squiz, load it from a checkout:

claude --plugin-dir <checkout>

Point it at a checkout outside the repository you are working in, because --plugin-dir ./ makes auto mode refuse subagent writes. Run npm run typecheck and npm test before opening a pull request. The design, with every setting and what each command prints, is in docs/specs/.