surgical-pr-fix

surgical-pr-fix is an agent for Claude Code from arrrrny/zuraffa. It costs 40 tokens per session (1,271 once invoked), scanned A, original, MIT.

A focused repair agent for one failing automated test in a GitHub pull request. It finds the failure, makes the smallest fix, reruns that test file, then commits and pushes the change.

In plain words
What is it for?
Use it to inspect a failed GitHub Actions job, identify the actual failing test, apply a minimal correction, verify that test file, and update the pull request branch.
Why use it?
It limits changes to the reported failure instead of introducing unrelated edits or waiting for the entire test suite. This helps keep a pull request focused while checking that the fix works.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: mentions AGENTS.md; Copilot chat-mode frontmatter (tools: vscode/*).

Good fit Use it to inspect a failed GitHub Actions job, identify the actual failing test, apply a minimal correction, verify that test file, and update the pull request branch.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/arrrrny/zuraffa/surgical-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/arrrrny/zuraffa

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/arrrrny/zuraffa/surgical-pr-fix/github.svg)](https://agentmods.dev/agents/arrrrny/zuraffa/surgical-pr-fix)
Your own site
<a href="https://agentmods.dev/agents/arrrrny/zuraffa/surgical-pr-fix"><img src="https://agentmods.dev/badge/agents/arrrrny/zuraffa/surgical-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 surgical-pr-fix

Your own site · 80×15
<a href="https://agentmods.dev/agents/arrrrny/zuraffa/surgical-pr-fix"><img src="https://agentmods.dev/badge/agents/arrrrny/zuraffa/surgical-pr-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 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,271 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.00040 $0.01271
Opus 5 $0.00020 $0.00635
Sonnet 5 $0.00008 $0.00254
Haiku 4.5 $0.00004 $0.00127

Measured yesterday against content hash 9adcebd1451e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

surgical-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.

.github/agents/surgical-pr-fix.agent.md · 131 lines

How it starts

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

You are a surgical CI-fix agent for this repository. Your contract: fix exactly the failing CI test you were pointed at — nothing more. One failing test, one minimal fix. Never run the full test suite, never refactor, never tidy adjacent code.

Input

You are given a failing GitHub Actions job URL or a run/job id, optionally with the PR number. Extract run-id and job-id from https://github.com/arrrrny/zuraffa/actions/runs/<run-id>/job/<job-id>?pr=<n>.

Process

1. Identify the PR branch and failing job

gh run view <run-id> --repo arrrrny/zuraffa --json status,conclusion,headBranch,headSha
gh api repos/arrrrny/zuraffa/actions/runs/<run-id>/jobs \
  --jq '.jobs[] | select(.conclusion=="failure") | {name, html_url}'

2. Find the REAL failing test in the full job log

gh run view --job <job-id> --log-failed is unreliable (it can dump unrelated passing tests). Get the whole log and grep it:

gh run view --job <job-id> --repo arrrrny/zuraffa --log > /tmp/ci_log.txt
grep -n "##\[group\]❌" /tmp/ci_log.txt
  • Real failures look like: ##[group]❌ test/path/to/file_test.dart: <test name> (failed).
  • GOTCHA: plain lines also appear inside the stdout of PASSING tests (expected-error output). Only the ##[group]❌ ... (failed) marker is a real failure. If unsure, confirm a line exists for the same test file/name elsewhere in the log.
  • Usually there is exactly one real failure. Note its file path, test name, and the Expected: / Actual: block below it.

3. Read the failing test and the code it flags

Understand the exact contract the test enforces before touching anything.

4. Check out the PR branch

git fetch origin <headBranch> && git checkout <headBranch> \
  && git pull --ff-only origin <headBranch>

Confirm git rev-parse HEAD matches headSha from step 1 (a newer sha is fine if the PR moved).

5. Look for repo precedent before inventing a fix

Most CI failures on this repo have a prior twin:

Read the full file on GitHub · 131 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 · 131 lines · 40 tokens per session scan A 9adcebd1451e

Subscribe to this mod's changes

surgical-pr-fix is an agent published in the GitHub repository arrrrny/zuraffa (5 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 1,271 once invoked, about $0.0002 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-09-11.

Related

Other agents, from other repositories

pr-ghostwriter

Writes PR descriptions, commit messages, and changelog entries.

fatihkan/badi · 16 tokens

git-workflow

Enhanced git commit specialist with conventional commits, semantic versioning, and git-town integration. Enforces best practices and safety protocols.

FortiumPartners/ensemble · 29 tokens

card-implementer

A fresh-context implementer that completes one defined task card within an approved file list. It follows test-driven development (TDD), meaning it first confirms a test fails, then makes it pass, and finally runs the broader checks.

XRenSiu/claude-code-forge · 93 tokens

mr-description-creator-default

Generate MR/PR descriptions from git changes and apply directly via gh (GitHub) or glab (GitLab) CLI. Analyzes commits, file changes, and changelogs for breaking changes, features, fixes, and impacts. Supports custom templates.

GantisStorm/essentials-claude-code · 59 tokens

part-implementer

Craft implement phase worker. Executes exactly one plan part via strict TDD and lands it as one atomic conventional commit. Spawned by the craft implement phase — do not auto-select.

scolladon/craft · 41 tokens

commit-message-generator

Cassidy - The Chronicler 📝. Git commit message specialist who writes messages that tell the story of why changes happened. Invoke when creating commits. Reads project conventions, explains motivation and reasoning, scales verbosity to impact. Makes code archaeology easier for future developers.

TechNickAI/claude_telemetry · 56 tokens