fix-pr

A workflow for taking a GitHub pull request (a proposed code change) from reviewer feedback and failing checks to a tested fix commit.

In plain words
What is it for?
Use it to resolve open pull-request comments and failing continuous-integration checks in an isolated worktree, then push a verified fix or prepare one without pushing.
Why use it?
It removes the need to manually collect review comments, inspect failed checks, create a safe workspace, test changes, and push the result.

Skill for Claude CodeCodex

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 skills/griffinwork40/agent-framework/fix-pr
Any agent
npx skills add griffinwork40/agent-framework --skill fix-pr
Clone the repo
git clone --depth 1 https://github.com/griffinwork40/agent-framework

Made for: Claude Code, Codex.

Per session 168 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,993 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 97% copy Near-identical to another mod 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.00168 $0.01993
Opus 5 $0.00084 $0.00996
Sonnet 5 $0.00034 $0.00399
Haiku 4.5 $0.00017 $0.00199

Measured 2d ago against content hash 07ae5b92882c, 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 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.

Origin

This is a copy

97% identical to fix-pr — 1 line differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/fix-pr/SKILL.md · 112 lines

How it starts

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

Sub-agent contract

/contract

fix-pr turns "review feedback / red CI on PR N" into a pushed fix commit with test evidence, using worktree isolation so the operator's working tree is never disturbed. It is the composition the operator previously chained by hand: /resolve-style feedback interpretation + managed worktree + budget-bounded fix subagent + test gate + push.

Skip when: the fix is a one-line suggestion the operator pointed at directly (apply inline); the PR is already green with all threads resolved (report and stop); or the work is local-only and unpushed (use /ship).


Phase 0 — Input gate & preflight (inline, fail closed)

Parse $ARGUMENTS:

  • pr — PR number or URL (required). If absent, stop: "fix-pr requires a PR number or URL."
  • repo — repo path from --repo; default: current working directory's git root.
  • no_push — from --no-push: produce the fix in a kept worktree + diff summary, no remote mutation.
  • re_review — from --re-review: after pushing, re-trigger /review (top-level only — see Phase 6 guard).

Preflight (all inline bash; any failure → Blocked, do not improvise):

  1. gh auth status — must be authenticated. Fail closed if not.
  2. gh pr view <pr> --json state,headRefName,headRepositoryOwner,isCrossRepository,mergeable,url — PR must be OPEN.
  3. Fork guard: if isCrossRepository is true and the authenticated account cannot push to the head repo, emit Blocked naming the fork and stop. Never attempt workarounds.
  4. Record head_branch — this is the ONLY branch this skill will ever push to.

Phase 1 — Feedback harvest (inline)

Reviewer feedback lives in three distinct GitHub stores — miss any one and the fix is silently partial. Harvest all three, then the gates:

  1. Inline review comments: gh api repos/{owner}/{repo}/pulls/<pr>/comments — comments anchored to a diff line (each carries path/line/diff_hunk).
  2. Review summary bodies: gh pr view <pr> --json reviews — the top-level body of each APPROVE / REQUEST_CHANGES / COMMENT review submission.
  3. Issue-level conversation comments: gh pr view <pr> --json comments (equivalently gh api repos/{owner}/{repo}/issues/<pr>/comments). A PR is also an issue, and its plain conversation comments ("also update the docs", "rename this before merge") live on the issues endpoint — the pulls/<pr>/comments endpoint does NOT return them. Skipping this source is the known gap: reviewers who leave feedback as normal PR comments are otherwise dropped entirely, and a PR can have actionable conversation comments with zero inline review comments.

Read the full file on GitHub · 112 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 · 112 lines · 168 tokens per session scan A 07ae5b92882c

Subscribe to this mod's changes

fix-pr is a skill published in the GitHub repository griffinwork40/agent-framework (23 stars, last pushed 7d ago), licensed Apache-2.0. It adds 168 tokens to every session and 1,993 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to fix-pr, differing in 1 line, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens

imagegen

Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…

openai/codex · 113 tokens