agentleFS
IcodeNetIcodeNet/agent-skills/skills/address-pr-feedback/SKILL.md

address-pr-feedback

Skill0 starsChanged 4 months agoMITView on GitHub

One-shot pass to address PR review comments: fetch threads, apply validated fixes, lint/test affected files, commit, push, reply, and offer to resolve. Use when the user asks to address review comments on a PR or points to a PR link/number. For continuous monitoring until merge-ready, use pr-babysitter instead.

  • Deletes or force-pushes
  • Commits and pushes

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Remove unused components or exports flagged by reviewers.

    line 31
  2. Distinctive:

    When a reviewer asks "do we have a component for this?", search the codebase for an existing shared component before writing a new one.

    line 32
  3. Very specific:

    If a comment touches an externally consumed surface, apply the contract-guard skill before changing it.

    line 33
  4. Very specific:

    Run lint only on the changed files, the way the repo's pre-commit hook would.

    line 37
  5. Distinctive:

    Ask the user whether addressed comments should be marked resolved.

    line 60
  6. Very specific:

    Always derive OWNER, REPO, PR_NUMBER at runtime from gh.

    line 88
  7. Distinctive:

    Don't run the full test suite for a small change — affected files only.

    line 89
  8. Distinctive:

    Never resolve a thread whose fix wasn't validated.

    line 90

“Common” is measured: kept by at least 6 in 10 of the 6 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

Address PR Feedback

A single pass over a PR's review comments: fix what's valid, reply to everything, push.

1. Get PR context

Derive the repo and PR number at runtime — never hard-code them:

gh repo view --json nameWithOwner -q .nameWithOwner
gh pr view --json number -q .number   # PR from current branch, if not given explicitly
  • Fetch review comments: gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments --paginate
  • Fetch PR details: gh pr view <PR_NUMBER> --json title,body,files
  • Summarise for the user: which comments need code changes, which are discussion-only.

2. Apply code changes

  • Address each comment that requires a code change — validate first (see the pr-babysitter validation gate: confirmed defect vs preference; behavior impact understood).
  • Remove unused components or exports flagged by reviewers.
  • When a reviewer asks "do we have a component for this?", search the codebase for an existing shared component before writing a new one.
  • If a comment touches an externally consumed surface, apply the contract-guard skill before changing it.

3. Lint

Run lint only on the changed files, the way the repo's pre-commit hook would. Check package.json scripts or the pre-commit config (e.g. lefthook.yml, .husky/) for the right command. Fix errors before proceeding.

4. Run affected tests

Find the test command in the repo's package scripts. Run only the tests affected by the changes — not the full suite — following the repo's test conventions.

5. Commit and push

Stage only the files you changed. Commit with a clear message in the repo's convention. Push. If asked to rebase: git fetch origin main, git rebase origin/main, then git push --force-with-lease.

6. Reply to PR comments

Post a reply to each addressed comment:

gh api repos/<OWNER>/<REPO>/pulls/<PR_NUMBER>/comments/<COMMENT_ID>/replies \
  -X POST -f body="<message>"

Thank reviewers, confirm what was done ("Done — switched to the shared component. Thanks!"), keep the tone friendly. For declined suggestions, explain the reasoning with evidence.

7. Offer to resolve threads

Ask the user whether addressed comments should be marked resolved. If yes:

  1. Fetch review thread node IDs (variableized GraphQL):
gh api graphql -f query='
  query($owner: String!, $repo: String!, $pr: Int!) {
    repository(owner: $owner, name: $repo) {
      pullRequest(number: $pr) {
        reviewThreads(first: 100) {
          nodes { id isResolved comments(first: 1) { nodes { databaseId body } } }
        }
      }
    }
  }' -f owner="<OWNER>" -f repo="<REPO>" -F pr=<PR_NUMBER>
  1. Match threads to the comments replied to by databaseId, then resolve each:
gh api graphql -f query='
  mutation($threadId: ID!) {
    resolveReviewThread(input: { threadId: $threadId }) { thread { isResolved } }
  }' -f threadId="<THREAD_NODE_ID>"

Notes

  • Always derive OWNER, REPO, PR_NUMBER at runtime from gh.
  • Don't run the full test suite for a small change — affected files only.
  • Never resolve a thread whose fix wasn't validated; reply with analysis instead.

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.