ai-sdlc: Command for Claude Code

.claude/commands/fix-pr.md

fix-pr is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 17 tokens per session (710 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

Written for Claude Code: argument-hint in frontmatter.

This is ai-sdlc-framework/ai-sdlc's own configuration. It tells Claude Code how to work on ai-sdlc itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ai-sdlc configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ai-sdlc-framework/ai-sdlc. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ai-sdlc-framework/ai-sdlc/main/.claude/commands/fix-pr.md
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/github.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/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 fix-pr

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 710 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.00017 $0.00710
Opus 5.5 $0.00007 $0.00284
Sonnet 5.5 $0.00003 $0.00142
Haiku 4.5 $0.00002 $0.00071

Measured 17d ago against content hash 2f7060d24cb7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 17d 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. 17d ago Changed 2f7060d24cb7
  2. 1mo 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 (421 stars, last pushed today), licensed Apache-2.0. It adds 17 tokens to every session and 710 once invoked, about $0.0001 per session on Opus 5.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.