# Skill: Review a Pull Request with hunkbot

You are helping the user set up hunkbot on this Mac and review a GitHub pull request with it. hunkbot is a command line, `hunkbot`: it reads every part of the pull request with two finders on Claude Code, checks each finding by code against the code, has another model verify it, and keeps only what holds up. You run it and tell the user what it says. You never review the code yourself, never add findings of your own, and never restate a dropped finding as real.

## Step 1: Gather Context

Fetch and read these pages first:

https://docs.hunkbot.com/quickstart.md
https://docs.hunkbot.com/review-a-pull-request.md
https://docs.hunkbot.com/post-a-review.md

What hunkbot is, in short, is at https://hunkbot.com/llms.txt; every page of the docs is listed at https://docs.hunkbot.com/llms.txt, and every page has a Markdown version at its address plus `.md`.

## Step 2: Check the Machine

1. Run `hunkbot --version`. If it answers, go to 3.
2. If it does not, hunkbot is not installed. Today it is built from its repository, on macOS (arm64); a release installable from npm is planned. If the current folder is hunkbot's repository, build and install it as https://docs.hunkbot.com/install.md says. Otherwise tell the user hunkbot is not installed on this Mac and not yet published, point them to https://hunkbot.com, and stop. Never install a package of that name from npm or anywhere else in its place.
3. Run `hunkbot doctor`. For each line that says `no`, run the command it names (`hunkbot doctor <check>`) and follow its steps. A step that signs the user in (`gh auth login`, Claude Code, Codex) is theirs to do: tell them the command, never sign in for them. Codex and the bot are optional; a review runs without them, Claude Code then verifying in a fresh context.
4. Run `hunkbot skills install`. It says its plan first; tell the user what it will write. Once installed, the user can ask for a review in their own words ("review PR 4332 with hunkbot"), and the skill takes over from this page.

## Step 3: Name the Pull Request

- If the user named a pull request, use it: its address, `owner/name#n`, or its number inside its repository.
- If not, and the current folder is a repository, find the current branch's with `gh pr view --json number,url`.
- If there is none, ask the user which pull request to review. Never guess one.

## Step 4: Review

Run `hunkbot review <pull request>`, without `--post`. A review takes minutes: run it in the background where you can, tell the user it is running, and let it finish. It prints its progress, then the review in Markdown, and keeps it whole in `~/.hunkbot/reviews/`.

Read its exit code:

- `0`: the review is whole.
- `1`: blocked by a gate (`--gate`).
- `2`: incomplete. Part of the change was not reviewed: say which, and never call the review whole.
- `3`: not reviewed. The repository's `.hunkbot.toml` leaves out the pull request's author: tell the user whose pull requests it reviews, and run it again with `--any-author` only on their word.
- Anything else: hunkbot could not run. Show the user its message, and run `hunkbot doctor` again.

## Step 5: Tell the User

In the user's language: the verdict, then each confirmed finding (its severity, its file and line, its title, what goes wrong), then how many findings are possible and how many dropped, and what was not reviewed, if any. Say it as hunkbot said it.

## Step 6: Post, on the User's Word

Posting writes a summary comment and one GitHub review on the pull request, for the whole team to see. Ask the user first. On their yes, run `hunkbot post <the same pull request>`. Only the confirmed findings are posted, and a finding already posted is never posted twice.

## Done

The work is done when the review was told to the user and, if they asked, posted. Tell them they can now ask for a review in their own words, and that https://docs.hunkbot.com/skill.md says what else the skill does: answering the replies on hunkbot's comments, keeping the team's feedback.
