github-pr

A command for reviewing GitHub pull requests, which are proposed code changes shared for team review. It covers reading the changes, discussing findings, posting inline comments, checking fixes, and approving or requesting changes.

In plain words
What is it for?
Use it to review a pull request, resume a saved review, check whether requested fixes were made, or help an author handle and respond to review comments.
Why use it?
It keeps the review work in one guided process instead of making you track comments, fixes, and approval steps separately. It requires the GitHub CLI (`gh`) to be installed and signed in.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/restarter/lets-workflow/github-pr
Clone the repo
git clone --depth 1 https://github.com/restarter/lets-workflow
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,466 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.10466
Opus 5 $0.00010 $0.05233
Sonnet 5 $0.00004 $0.02093
Haiku 4.5 $0.00002 $0.01047

Measured 2d ago against content hash 5429a77e2668, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

github-pr scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

1. Delete PR folder: `rm -rf "$PR_DIR"` (removes state + all temp files)
plugins/lets/commands/github-pr.md · 1,226 lines

How it starts

The opening of the file, as written. The whole thing — 1,226 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub PR Review Lifecycle

Full GitHub PR review lifecycle: analyze code, discuss findings with user, post inline comments, follow-up on fixes, approve or request changes.

GitHub only (the full posting lifecycle). This command drives inline comments / follow-up / approve / merge exclusively via the gh CLI. For Bitbucket, /lets:review <PR> already reviews a PR end to end (fetch + diff + discussion + summary post via bbb); only the inline/approve/merge lifecycle here stays GitHub-only for now. LETS_PR_FLOW=local users finish tasks via /lets:done.

Requires: gh CLI installed and authenticated.

IMPORTANT: If the spec below invokes any deferred tool (e.g. AskUserQuestion), you MUST load and call it as specified. Never skip the call, never substitute a default answer of your own — the tool invocation is part of the contract. This is critical.

Usage

/lets:github-pr <PR-url-or-number>     # Start new review
/lets:github-pr                        # Resume from saved state
/lets:github-pr --follow-up            # Check if fixes addressed comments
/lets:github-pr --respond [PR]         # Author: triage review comments, fix, reply
/lets:github-pr --approve              # Approve PR
/lets:github-pr --merge                # Merge PR
/lets:github-pr --status               # Show current review state
/lets:github-pr --cancel               # Clean up state, abandon review

Step 1: Detect Mode

Verify gh CLI

gh auth status 2>&1 || echo "gh not authenticated"

If gh not available or not authenticated, stop: "gh CLI required. Run gh auth login."

Parse argument

Interpret user intent:

  • PR URL or number -> extract PR number
  • --follow-up -> Phase 3
  • --respond -> Phase R (author respond)
  • --approve -> Phase 4
  • --merge -> merge only
  • --status -> show state and exit
  • --cancel -> clean up state and exit
  • No argument, no flag -> check for existing state files

Check for existing state

LETS_PROJECT_ROOT=$(git rev-parse --show-toplevel)
PR_DIR="$LETS_PROJECT_ROOT/.lets/execution/pr-{number}"
STATE_FILE="$PR_DIR/review.json"

Read the full file on GitHub · 1,226 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 1,226 lines · 20 tokens per session scan C 5429a77e2668

Subscribe to this mod's changes

github-pr is a command published in the GitHub repository restarter/lets-workflow (17 stars, last pushed 9d ago), licensed MIT. It adds 20 tokens to every session and 10,466 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.