resolve-pr-comments

resolve-pr-comments is a command for coding agents from rios0rios0/guide. It costs 0 tokens per session (1,950 once invoked), scanned A, original, MIT.

A command for resolving unresolved review comments on the pull request connected to the current Git branch. A pull request is a proposed code change reviewed before it is merged.

In plain words
What is it for?
Use it to detect the branch's pull request, classify comments, make appropriate edits, reply with explanations, push changes, and resolve addressed threads.
Why use it?
It gathers open review threads and handles valid requested changes, so developers do not have to process each comment manually.

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/rios0rios0/guide/resolve-pr-comments
Clone the repo
git clone --depth 1 https://github.com/rios0rios0/guide

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for resolve-pr-comments

README.md
[![agentmods](https://agentmods.dev/badge/commands/rios0rios0/guide/resolve-pr-comments.svg)](https://agentmods.dev/commands/rios0rios0/guide/resolve-pr-comments)
Your own site
<a href="https://agentmods.dev/commands/rios0rios0/guide/resolve-pr-comments"><img src="https://agentmods.dev/badge/commands/rios0rios0/guide/resolve-pr-comments.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,950 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.00000 $0.01950
Opus 5 $0.00000 $0.00975
Sonnet 5 $0.00000 $0.00390
Haiku 4.5 $0.00000 $0.00195

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

Security

Grade A, and why

resolve-pr-comments 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 3d 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.

.github/workflows/generate-ai-rules/commands/resolve-pr-comments.md · 226 lines

How it starts

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

Detect the current branch's pull request and resolve its unresolved review comments. This command auto-detects the PR from the current Git branch, fetches unresolved review threads via GraphQL, classifies each comment, implements valid changes, replies with explanations, pushes, and resolves addressed threads.

For commit conventions, refer to the Git Flow rule. For lint verification, refer to the CI/CD rule.

Pre-flight

Step 1 -- Verify GitHub CLI authentication

gh auth status

If this fails, report the error and stop. The gh CLI must be installed and authenticated.

Step 2 -- Detect repository context

gh repo view --json nameWithOwner -q '.nameWithOwner'

Split the result into {owner} and {repo}.

Step 3 -- Auto-detect PR from current branch

gh pr view --json number,headRefName -q '.number'

This returns the PR number associated with the current branch. If it fails (no PR exists for the current branch), report: "No pull request found for the current branch. Switch to a branch with an open PR or create one first." and stop.

Store the returned number as {PR_NUMBER}. Then ensure the local branch is up to date:

git pull --rebase

Procedure

Step 4 -- Fetch unresolved review threads

Use the GitHub GraphQL API:

gh api graphql -f query='
  query($owner: String!, $repo: String!, $pr: Int!) {
    repository(owner: $owner, name: $repo) {
      pullRequest(number: $pr) {
        reviewThreads(first: 100) {
          nodes {
            id
            isResolved
            comments(first: 10) {
              nodes {
                databaseId
                body
                path
                line
                startLine
                author { login }
              }
            }
          }
        }
      }
    }
  }
' -f owner="{owner}" -f repo="{repo}" -F pr={PR_NUMBER}

Filter to threads where isResolved is false. If no unresolved threads exist, report "No unresolved review threads found on PR #{PR_NUMBER}." and stop.

Read the full file on GitHub · 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. 3d ago First seen · 226 lines · 0 tokens per session scan A ed35620712b5

Subscribe to this mod's changes

resolve-pr-comments is a command published in the GitHub repository rios0rios0/guide (2 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,950 tokens. 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.