agentleFS
charlesmsiegelcharlesmsiegel/coding-skills/skills/fix-pr/SKILL.md

fix-pr

Skill2 starsChanged 4 months agoMITView on GitHub

Work through the review feedback on a pull request — collect every inline thread, decide what each one actually asks for, fix what should be fixed, and answer what shouldn't. Use when the user says "fix the PR comments", "address the review feedback", "handle the review on PR 42", "respond to the reviewer", "my PR has changes requested", or "what's blocking this PR". Pulls resolved state and CI status too, so settled threads are not re-litigated and a red build is not mistaken for a review problem. A reviewer suggestion that is wrong gets a reasoned reply, not a silent implementation — complying with bad feedback is a failure mode, not politeness. Requires the gh CLI.

16 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use rebase, review-pr and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • raineSkill

    rebase

    Rebase the current branch with smart conflict resolution.

    Also in 3 projects that use this

  • DockerSkill

    review-pr

    Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.

    Also in 4 projects that use this

  • SentrySkill

    deslop

    Strip AI-generated noise from the diff before pushing — extra comments a human wouldn't write, defensive try/catch in trusted code paths, casts to any, inline imports in Python, and other style inconsistencies with the surrounding file. Use this immediately before commit so the diff stays clean.

    Also in 3 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 4 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Verify: Run the repo's tests and linters.

    line 59

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fix PR Review Feedback

Turn a pile of review comments into a set of committed fixes plus a set of honest replies. The deliverable is both — a PR where every thread got an answer, not one where every thread got a code change.

Let SKILL=/path/to/this/skill — the directory holding this SKILL.md. Commands run from the repository being worked on, not from the skill directory. Needs Python 3.11+, git, and an authenticated gh with network access; fetch_pr_feedback.py queries the GraphQL API through gh and can do nothing without it. If gh auth status fails, say so — never reconstruct review threads from memory or from the diff.

Collect everything first

python "$SKILL/scripts/fetch_pr_feedback.py"            # the current branch's PR
python "$SKILL/scripts/fetch_pr_feedback.py" 42         # a specific PR
python "$SKILL/scripts/fetch_pr_feedback.py" 42 --repo owner/name
python "$SKILL/scripts/fetch_pr_feedback.py" --format json   # for programmatic triage
python "$SKILL/scripts/fetch_pr_feedback.py" --all      # include already-resolved threads

gh pr view --comments shows review bodies but not the inline comments, and the inline comments are where the actual requests live. This script pulls both, plus:

  • resolved / outdated state per thread — so settled discussions stay settled and threads pointing at moved code are flagged rather than acted on blindly;
  • suggestion blocks — reviewer-authored patches that can be applied verbatim;
  • CI status — because a red build is a different problem from a review comment, and fixing it first often resolves several comments at once.

Threads are sorted so unresolved ones on current code come first.

Workflow

  1. Read the failing checks before the comments. A broken build is usually cheaper to fix and frequently the root of several review remarks. Fixing it first can make part of the review moot.
  2. Read the diff you are being reviewed on. gh pr diff 42. Feedback is not interpretable without it, and a comment on line 61 means nothing until you know what line 61 became.
  3. Triage every thread before changing anything. Classify each as must-fix, nit, question, or wrong suggestion — references/triaging-feedback.md has the rubric and, more importantly, the standard for pushing back. Triage the whole set first; reviewers routinely make the same point in three places, and one fix should close all three.
  4. Fix in coherent commits, not one commit per comment. Group by the change being made. A reviewer re-reading the PR wants to see "extract the validation" once, not five commits each moving one line.
  5. Verify. Run the repo's tests and linters. If a comment pointed at a real bug, add the test that would have caught it — a fix with no test invites the same comment on the next PR.
  6. Answer every thread, including the ones you did not act on. references/replying.md covers what a good reply contains and how to post it. An unanswered thread reads as ignored, and it is the fastest way to make a reviewer repeat themselves.
  7. Summarize for the author-facing turn: what changed, what you pushed back on and why, and what still needs their decision.

Do not comply with feedback that is wrong

This is the discipline the whole skill hangs on. A reviewer is a person with partial context, working fast, sometimes wrong. Silently implementing a mistaken suggestion is not deference — it puts a defect in the codebase and denies the reviewer the correction. Both of you end up worse off.

So: when a suggestion would break something, contradicts a constraint the reviewer can't see, or rests on a misreading of the code, say so with the evidence and leave the code alone. When you genuinely can't tell whether they're right, say that too and ask — do not guess and do not quietly split the difference.

The inverse also holds: do not argue to protect your own work. The question is never who is right, only what the code should be.

Boundaries

  • Never resolve a thread you did not satisfy. Resolving is the author's signal that the point was addressed; using it to clear a queue destroys its meaning.
  • Never force-push over review history unless the user asks. Reviewers navigate by commit; rewriting the branch orphans their comments.
  • Never post replies without the user's go-ahead. Replies are public, attributed to them, and hard to take back — draft them, show them, then post.
  • Stay in scope. Reviewers often mention adjacent problems. Note them; fix them only if the user says so. A PR that grows during review never lands.

Reference index (load on demand)

Load this when…File
Classifying feedback and deciding whether to comply, push back, or ask — with the standard of evidence each needsreferences/triaging-feedback.md
Writing and posting the replies, and closing out the reviewreferences/replying.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.