pr-fix

pr-fix is a command for Claude Code from Smirnov-Labs/claude-skills. It costs 13 tokens per session (1,293 once invoked), scanned A, original, MIT.

A command that repeatedly checks an open pull request’s reviewer comments and automated checks, fixes problems, and pushes new commits until the pull request is clean.

In plain words
What is it for?
Use it after creating a pull request to address code-review comments and continuous-integration failures. CI is automated testing and other checks that run when code changes.
Why use it?
It removes the repeated cycle of reading feedback, investigating failed CI checks, making fixes, and sending them back for another review.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it after creating a pull request to address code-review comments and continuous-integration failures. CI is automated testing and other checks that run when code changes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/smirnov-labs/claude-skills/pr-fix
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.

Clone the repo
git clone --depth 1 https://github.com/Smirnov-Labs/claude-skills

Made for: Claude Code.

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 pr-fix

README.md
[![agentmods](https://agentmods.dev/badge/commands/smirnov-labs/claude-skills/pr-fix/github.svg)](https://agentmods.dev/commands/smirnov-labs/claude-skills/pr-fix)
Your own site
<a href="https://agentmods.dev/commands/smirnov-labs/claude-skills/pr-fix"><img src="https://agentmods.dev/badge/commands/smirnov-labs/claude-skills/pr-fix/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-fix

Your own site · 80×15
<a href="https://agentmods.dev/commands/smirnov-labs/claude-skills/pr-fix"><img src="https://agentmods.dev/badge/commands/smirnov-labs/claude-skills/pr-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 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,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00013 $0.01293
Opus 5 $0.00006 $0.00647
Sonnet 5 $0.00003 $0.00259
Haiku 4.5 $0.00001 $0.00129

Measured 11d ago against content hash c55eabb839b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pr-fix 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 11d 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/pr-fix.md · 146 lines

How it starts

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

PR Fix Command

You are entering an autonomous loop that drives a pull request to a clean state. Each round: read CI status + all reviewer feedback, fix what's blocking, commit, push, wait for new signal, repeat.

Prerequisites

The current branch MUST have an open PR. Verify with gh pr view --json number,state,headRefName. If no PR exists, tell the user to run /pr first and stop.

Process

Step 1: Identify the PR

Capture once and reuse throughout the loop:

PR_NUMBER=$(gh pr view --json number -q .number)
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)

Step 2: Run the Fix Loop

Execute up to 5 iterations. Each iteration is one full read → fix → push → wait cycle.

2a. Read PR state (all five surfaces)

You MUST fetch all of these every round — feedback lives in different endpoints and silently dropping any one of them is the most common failure mode of this command:

  1. CI checks — pass/fail/pending status for every workflow:

    gh pr checks $PR_NUMBER
    

    For a failing check, fetch logs:

    gh run view <run-id> --log-failed
    
  2. Issue comments — PR-level comments. This is where architect-gate posts the SAR review summary.

    gh api repos/$REPO/issues/$PR_NUMBER/comments
    
  3. Review comments — inline diff comments. This is where Codex and inline human reviewers post. If you skip this endpoint, you will silently miss Codex feedback entirely.

    gh api repos/$REPO/pulls/$PR_NUMBER/comments
    
  4. Reviews — top-level review bodies (approvals, request-changes, review summaries):

    gh api repos/$REPO/pulls/$PR_NUMBER/reviews
    
  5. Last-commit timestamp — anchor for distinguishing addressed vs. unaddressed feedback:

    git log -1 --format=%cI
    
2b. Classify the signal

For each piece of feedback, decide:

  • Already addressedcreated_at is older than the last commit on the branch AND the diff visibly resolves it. Skip.
  • Blocking — SAR severity ≥ 3, explicit "request changes" review, failing CI check, Codex inline comment flagging correctness/security/architecture. Must fix.
  • Nice-to-have — style nits, optional suggestions, low-severity SAR notes. Defer and report at the end.

Read the full file on GitHub · 146 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. 11d ago First seen · 146 lines · 13 tokens per session scan A c55eabb839b0

Subscribe to this mod's changes

pr-fix is a command published in the GitHub repository Smirnov-Labs/claude-skills (5 stars, last pushed 2mo ago), licensed MIT. It adds 13 tokens to every session and 1,293 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.