fix-pr

fix-pr is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 17 tokens per session (674 once invoked), scanned A, original, Apache-2.0.

A command for addressing failed checks and review findings on a GitHub pull request, which is a proposed code change awaiting review.

In plain words
What is it for?
Use it to inspect a pull request, check CI results, review findings, coverage details, and failure logs, then work through the issues.
Why use it?
It gathers build, test, lint, coverage, and review information in one workflow so problems can be analyzed and fixed 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/ai-sdlc-framework/ai-sdlc/fix-pr
Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/fix-pr.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/fix-pr)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/fix-pr"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/fix-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 674 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.00017 $0.00674
Opus 5 $0.00009 $0.00337
Sonnet 5 $0.00003 $0.00135
Haiku 4.5 $0.00002 $0.00067

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

Security

Grade A, and why

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

How it starts

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

Fix all issues on PR #$ARGUMENTS. Follow these steps exactly:

Step 1: Gather PR context

Run these commands to collect all failure information:

# Get PR details
gh pr view $ARGUMENTS --repo ai-sdlc-framework/ai-sdlc --json title,headRefName,body,state

# Get CI check status
gh pr checks $ARGUMENTS --repo ai-sdlc-framework/ai-sdlc

# Get review agent findings (latest review)
gh pr view $ARGUMENTS --repo ai-sdlc-framework/ai-sdlc --json reviews --jq '.reviews[-1].body'

# Get codecov patch details
gh api repos/ai-sdlc-framework/ai-sdlc/commits/$(gh pr view $ARGUMENTS --repo ai-sdlc-framework/ai-sdlc --json headRefOid --jq '.headRefOid')/check-runs --jq '.check_runs[] | select(.name | contains("codecov")) | {name: .name, conclusion: .conclusion, summary: .output.summary[0:500]}'

# Get CI failure logs if build/test failed
gh pr checks $ARGUMENTS --repo ai-sdlc-framework/ai-sdlc 2>&1 | grep "fail" | head -5

Step 2: Checkout the PR branch

gh pr checkout $ARGUMENTS

Step 3: Analyze and categorize issues

Categorize each issue as:

  • CI failure — build error, test failure, lint error, format error
  • Review finding (real) — legitimate bug, missing test, security issue
  • Review finding (false positive) — matches a pattern in .ai-sdlc/review-policy.md
  • Coverage gap — new lines not covered by tests

For false positives: update .ai-sdlc/review-policy.md with more specific calibration instead of fixing non-issues.

Step 4: Fix issues in priority order

  1. CI failures first — build must pass before anything else
  2. Coverage gaps — write missing tests
  3. Real review findings — fix legitimate bugs/issues
  4. Format/lint — run pnpm lint and pnpm format:check, fix any issues

Step 5: Verify fixes locally

pnpm build
pnpm test
pnpm lint
pnpm format:check

ALL of these must pass before committing.

Step 6: Commit and push

git add <specific files>
git commit -m "fix: address CI failures and review findings on PR #$ARGUMENTS"
git push

Read the full file on GitHub · 80 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. 4d ago First seen · 80 lines · 17 tokens per session scan A e875dfb937f9

Subscribe to this mod's changes

fix-pr is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (100 stars, last pushed 10d ago), licensed Apache-2.0. It adds 17 tokens to every session and 674 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-30.