fix-pr-feedback

A workflow for handling reviewer comments on a mathlib pull request, a proposed code change submitted for review. It applies fixes locally, waits for approval before pushing, and monitors automated checks afterward.

In plain words
What is it for?
Use it to fetch all review comments, address or explain each one, commit the changes using project conventions, push after approval, and watch CI to completion.
Why use it?
It prevents reviewer feedback from being missed and avoids sending unapproved changes, while ensuring the pull request is followed through CI, the automated build and test checks.

Command

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/cbirkbeck/mathlib-quality/fix-pr-feedback
Clone the repo
git clone --depth 1 https://github.com/CBirkbeck/mathlib-quality
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,748 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.00026 $0.07748
Opus 5 $0.00013 $0.03874
Sonnet 5 $0.00005 $0.01550
Haiku 4.5 $0.00003 $0.00775

Measured 2d ago against content hash 129721225cda, 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-feedback 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.

commands/fix-pr-feedback.md · 821 lines

How it starts

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

/fix-pr-feedback — Address PR Reviewer Comments

Pull every reviewer comment on a mathlib PR, implement the fixes locally, stop and wait for user approval before pushing, then push and watch CI to completion.

The non-negotiable rules:

  • Never push before the user has reviewed and approved the changes. No exceptions.
  • Every comment must be accounted for — addressed, deferred with a reason, or marked unable-to-address with a reason. Silent skipping is a defect.
  • After pushing, the skill must wait for CI — it's not done until checks finish.
  • Every commit and any PR description update follows the conventions in "PR description, commit messages, dependencies" below — short, concrete, dependencies stated, Claude co-author footer.

Usage

/fix-pr-feedback <PR_number>
/fix-pr-feedback <PR_url>
/fix-pr-feedback                  # If currently on a branch with an open PR, auto-detect

If only inline review comments are visible without a PR number, you can also paste them:

/fix-pr-feedback --comments "<pasted comments>"

But the workflow assumes a real PR (the CI-watching phase needs one).


PR description, commit messages, dependencies

Every commit this skill creates and every PR description update it performs follows these conventions. They apply equally to the initial fix commits in Phase 3 and to any re-push fixes in Phase 7.

PR description

Default behaviour: do not touch the PR description. The user wrote it; the fixes are responses, not a re-statement of the PR. Update the description only when one of the following is true:

  • The fix changes the scope of the PR (new files, removed features, a different conclusion)
  • The fix introduces or resolves a dependency on another PR
  • A reviewer explicitly asked for the description to be updated
  • You are creating a new follow-up PR for deferred items

When you do update it, follow these rules:

  • Short. A one-line summary, then 1–5 bullets naming the substantive changes. No background paragraphs. No "this PR addresses the following comments" walls of text — comments are visible in the PR thread; don't duplicate them.
  • Re-tighten, never accrete. Across review rounds the description must not grow by appending — rewrite it back down to the one-liner + bullets, and keep it factually in sync with the code (if notation or naming changed during review, the description changes with it). Reviewer @loefflerd on mathlib4#41251: "As so often happens with AI-generated PR's, the PR description is getting longer and longer with each iteration. Please keep it a bit more to the point."
  • Concrete. Each bullet names what changed, not why in the abstract. "Renames wt_eq_zeroweight_eq_zero" not "Improves naming consistency".
  • Lists dependencies. If the PR depends on another PR being merged first (a mathlib bump, a sister-project PR, an upstream contribution), state them on a dedicated line:

Read the full file on GitHub · 821 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 · 821 lines · 26 tokens per session scan A 129721225cda

Subscribe to this mod's changes

fix-pr-feedback is a command published in the GitHub repository CBirkbeck/mathlib-quality (32 stars, last pushed 13d ago), licensed MIT. It adds 26 tokens to every session and 7,748 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.