address-pr

A workflow for handling comments on a GitHub pull request, including comments from people and automated review tools. It evaluates each comment, changes the code or explains the decision, and manages the review discussion.

In plain words
What is it for?
Use it with a pull request number to inspect review comments, fix valid issues, explain rejected suggestions, reply to reviewers, and resolve addressed threads.
Why use it?
It helps ensure that review feedback is not missed or left unresolved. A single process keeps code changes, replies, and discussion status together.

Command for Claude Code

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/xsovad06/sova/address-pr
Clone the repo
git clone --depth 1 https://github.com/xsovad06/sova

Made for: Claude Code.

Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,032 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00027 $0.03032
Opus 5 $0.00014 $0.01516
Sonnet 5 $0.00005 $0.00606
Haiku 4.5 $0.00003 $0.00303

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

Security

Grade A, and why

address-pr scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/address-pr.md · 257 lines

How it starts

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

Address PR Review Comments

Score each review comment, address all of them (fix or acknowledge with justification), and reply on GitHub. Handles both human reviewers and automated review bots (Sourcery, CodeRabbit, etc.).

# Benchmark logging (entry)
bash .claude/benchmark/log.sh "address_pr_start" "" "" 2>/dev/null || true

CRITICAL: Complete ALL Steps

This command runs as a headless agent. You MUST execute every step below through to completion. In headless mode, producing a text-only summary without a tool call causes the process to exit immediately, so NEVER output a final summary without having completed steps 8-17 first (squash, rebase, push, reply, resolve, dismiss). If you discover that all findings are already addressed, you MUST still complete steps 9-10 (rebase and push) to resolve any merge conflicts, then skip to step 11 to handle thread resolution before the summary.

Incomplete execution is worse than failure: a run that fixes code but never commits/pushes wastes the cost and leaves the PR unchanged.

Instructions

  1. Get the PR number from $ARGUMENTS.

  2. Fetch review data:

    gh pr view <PR_NUMBER> --json comments,reviews,body,title,headRefName
    gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments
    gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/reviews
    
  3. Verify you are in the correct working directory: this is the most critical safety check. Working in the wrong directory means modifying the wrong branch and leaving garbage uncommitted changes on main.

    a. Check the current branch:

    git branch --show-current
    

    b. If the output matches headRefName from step 2, you are in the right place. Continue to step 4.

    c. If they differ, find the worktree for the PR branch:

    git worktree prune
    HEAD_BRANCH_REF="branch refs/heads/${HEAD_BRANCH}"
    WORKTREE_PATH=$(git worktree list --porcelain | grep -F -B2 "$HEAD_BRANCH_REF" | grep "^worktree " | head -1 | sed 's/^worktree //')
    

    If WORKTREE_PATH is non-empty, navigate into it and verify:

    cd "$WORKTREE_PATH"
    VERIFIED=$(git branch --show-current)
    echo "Verified branch: $VERIFIED"
    

    If VERIFIED does not equal HEAD_BRANCH, STOP and report: the worktree exists but is on the wrong branch.

Read the full file on GitHub · 257 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 · 257 lines · 27 tokens per session scan A 59db335ea0e1

Subscribe to this mod's changes

address-pr is a command published in the GitHub repository xsovad06/sova (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 27 tokens to every session and 3,032 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.