pr-fix

Apply fixes for unresolved PR review comments, resolve merge conflicts with the base branch, commit, push, resolve threads, and monitor CI. Optionally watches for new review comments and re-applies fixes automatically.

Command for Codex

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/morpho-org/sdks/pr-fix
Clone the repo
git clone --depth 1 https://github.com/morpho-org/sdks

Made for: Codex.

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 15,641 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.15641
Opus 5 $0.00000 $0.07820
Sonnet 5 $0.00000 $0.03128
Haiku 4.5 $0.00000 $0.01564

Measured yesterday against content hash f56a62b6e8af, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

.agents/commands/pr-fix.md · 899 lines

How it starts

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

pr-fix

Apply fixes for unresolved PR review comments, resolve merge conflicts with the base branch, commit, push, resolve threads, and monitor CI. Optionally watches for new review comments and re-applies fixes automatically.

Usage

/pr-fix <PR_NUMBER>
/pr-fix <PR_NUMBER> --watch

Examples

/pr-fix 123
/pr-fix 456 --watch

TWO-PHASE SKILL: Phase 1 (Steps 1-11, including the reconciliation pass; if Step 4 finds zero unresolved comments, the flow short-circuits Steps 5-9 and jumps straight to the reconciliation step + Step 11) does the initial fix pass. Phase 2 (Step 12) creates a continuous watcher via CronCreate if --watch was passed. If --watch is used, the skill is NOT complete until Step 12's CronCreate call succeeds and you report the job ID to the user.

Placeholder convention

Two classes of placeholders. Step 12 has a third — see "Placeholder discipline (CRITICAL)" inside Step 12 for the watcher's <UPPERCASE> (CronCreate-time) vs ${CYCLE_*} (cycle-derived) distinction.

Static (resolved once before any step that uses them)

Placeholder Source Description
<OWNER> parsed from git remote GitHub repo owner
<REPO> parsed from git remote GitHub repo name
<PR_NUMBER> user argument Pull request number
<BASE_BRANCH> gh pr viewbaseRefName PR base branch
<HEAD_BRANCH> gh pr viewheadRefName PR head branch
<HEAD_SHA> gh pr viewheadRefOid. Note: in the watcher this is re-derived per cycle as ${CYCLE_HEAD_SHA} from each cycle's push — do not bake the CronCreate-time value into reply text. Head commit full SHA
<HEAD_SHA_SHORT> first 7 chars of <HEAD_SHA> Head commit short SHA
<REPO_PATH> git rev-parse --show-toplevel Absolute path to repo root

Computed at runtime (do NOT include in any pre-flight static-placeholder check)

Placeholder Source Description
<commentId>, <threadId> per-thread, from Step 4 GraphQL GitHub IDs for replies / resolves
<comment_created_at> per-thread, from Step 4 GraphQL (createdAt field) Used by Step 5c freshness check
<reason>, <brief> per-finding Human-readable reason in skip / fix replies
<file1>, <file2>, <list of resolved files> per-merge-conflict Filenames in merge-conflict commit body
<N>, <X>, <Y>, <Z>, <W>, <M>, <R>, <H>, <F>, <SK>, <Q>, <D>, <P>, <A>, <ST> report templates counts in summary tables and sentinel lines

Read the full file on GitHub · 899 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. yesterday First seen · 899 lines · 0 tokens per session scan A f56a62b6e8af

Subscribe to this mod's changes

pr-fix is a command published in the GitHub repository morpho-org/sdks (40 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 15,641 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-09-01.