agentleFS
notum-cznotum-cz/strapi-next-monorepo-starter/.claude/skills/resolve-review-suggestions/SKILL.md

resolve-review-suggestions

Skill316 starsChanged 5 months agoMITView on GitHub

Use when the user wants unresolved GitHub pull request review comments addressed and closed with the authenticated GitHub CLI (`gh`) — e.g. "resolve review suggestions", "address PR comments", "fix review comments", "handle requested changes", "apply review feedback", "/resolve-review-suggestions". GitHub-only; unsupported for GitLab, Bitbucket, Azure Repos, or local-only branches. Requires an explicit GitHub PR number or PR URL.

  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    GitHub only: Do not use this skill for GitLab, Bitbucket, Azure Repos, or local-only review feedback.

    line 21
  2. Distinctive:

    Be automated: Ask only when the PR argument is missing or invalid, the current worktree has unrelated dirty changes, or a comment needs a …

    line 27
  3. Distinctive:

    If no argument was provided, stop and ask the user for the PR number or URL.

    line 38
  4. Very specific:

    If gh is missing or unauthenticated, stop and tell the user to install/authenticate GitHub CLI.

    line 49
  5. Distinctive:

    If the current branch is not the PR head branch, switch only when the worktree is clean:

    line 62
  6. Distinctive:

    If the worktree has existing unrelated changes, stop and tell the user.

    line 68
  7. Distinctive:

    If there are more than 100 threads, rerun with pagination.

    line 111
  8. Distinctive:

    Do not resolve Not relevant or Needs user threads.

    line 128
  9. Distinctive:

    After edits, run the narrowest useful validation:

    line 134
  10. Distinctive:

    If validation cannot run because the local toolchain is unavailable, say so in the final report.

    line 140
  11. Distinctive:

    If files changed, stage explicit files only:

    line 144
  12. Distinctive:

    If hooks fail, fix the issue and create a new commit attempt.

    line 152
  13. Distinctive:

    Never resolve a thread just because it is inconvenient, stale-looking, or disagreed with.

    line 169
  14. Distinctive:

    Do not merge the PR.

    line 192
  15. Distinctive:

    Do not dismiss reviews; only resolve review threads that were addressed.

    line 193
  16. Distinctive:

    Do not close top-level PR comments.

    line 194
  17. Distinctive:

    If a reviewer requested a larger design change that does not fit the PR, leave it open and ask the user.

    line 195

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “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

Resolve Review Suggestions

Load unresolved GitHub pull request review threads, implement the relevant ones, push the fixes, and resolve the conversations that are actually addressed. List irrelevant or out-of-scope comments for the user instead of closing them.

Requirements

  • GitHub only. Do not use this skill for GitLab, Bitbucket, Azure Repos, or local-only review feedback.
  • Authenticated GitHub CLI required. gh must be installed and gh auth status must pass before loading comments or changing the PR.
  • Explicit PR required. The user must provide a GitHub PR number or PR URL; do not infer from branch names.

This skill handles GitHub review threads, not ordinary top-level PR comments; top-level comments can be read for context, but GitHub has no "resolve conversation" action for them.

Be automated. Ask only when the PR argument is missing or invalid, the current worktree has unrelated dirty changes, or a comment needs a product decision.

Phase 1 — Resolve the PR

Require $ARGUMENTS. Do not infer a PR from the current branch name or current branch's GitHub PR.

ShapeMeaning
Pure digits or #123PR number
github.com/<org>/<repo>/pull/<n> URLPR number

If no argument was provided, stop and ask the user for the PR number or URL. If the argument is not one of the supported shapes, stop and ask for a valid GitHub PR number or URL.

Verify access:

command -v gh
gh auth status
gh pr view <num> --json number,title,url,headRefName,baseRefName,state,isDraft
gh repo view --json owner,name

If gh is missing or unauthenticated, stop and tell the user to install/authenticate GitHub CLI. Do not fall back to unauthenticated REST calls for this skill because resolving conversations requires authenticated GraphQL access.

Abort if the PR is closed or merged.

Phase 2 — Prepare the branch

Check the worktree:

git status --short
git branch --show-current

If the current branch is not the PR head branch, switch only when the worktree is clean:

gh pr checkout <num>

If the worktree has existing unrelated changes, stop and tell the user. Never overwrite or stash user work silently.

Phase 3 — Load unresolved review threads

Fetch unresolved review threads with GraphQL so thread ids are available for resolution:

gh api graphql \
  -F owner="<owner>" \
  -F name="<repo>" \
  -F number=<num> \
  -f query='
query($owner: String!, $name: String!, $number: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $number) {
      reviewThreads(first: 100) {
        nodes {
          id
          isResolved
          isOutdated
          path
          line
          originalLine
          startLine
          diffSide
          comments(first: 50) {
            nodes {
              id
              author { login }
              body
              url
              createdAt
              path
              diffHunk
            }
          }
        }
      }
    }
  }
}' --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'

If there are more than 100 threads, rerun with pagination. Also fetch regular comments for context only:

gh pr view <num> --comments

Phase 4 — Triage

For every unresolved thread, inspect the latest reviewer comment, its earlier thread context, and the referenced code.

Classify each thread:

  • Implement — concrete, relevant to this PR, and safely fixable now.
  • Already addressed — current code already satisfies it; verify before resolving.
  • Not relevant — obsolete, out of scope, conflicts with project conventions, duplicates another thread, or asks for a product decision.
  • Needs user — ambiguous or requires a decision the agent cannot safely make.

Do not resolve Not relevant or Needs user threads. List them for the user with the comment URL and a one-line reason.

Phase 5 — Implement relevant comments

Apply direct fixes for Implement threads. Keep edits tightly scoped to the review feedback.

After edits, run the narrowest useful validation:

  • Code or config changed: pnpm lint and pnpm typecheck when available.
  • Tests changed or behavior changed: run the relevant unit or Playwright command from apps/docs/docs/reference/commands.md.
  • Strapi schemas changed: run bash .claude/skills/strapi-schema-check/scripts/check.sh.

If validation cannot run because the local toolchain is unavailable, say so in the final report.

Phase 6 — Commit and push

If files changed, stage explicit files only:

git add <file...>
git commit -m "fix: address PR review suggestions"
git push

If hooks fail, fix the issue and create a new commit attempt; do not bypass hooks. If there are no file changes, skip commit/push.

Phase 7 — Resolve addressed conversations

Resolve only threads classified as Implement or Already addressed after verifying the fix is present in the current branch:

gh api graphql \
  -F threadId="<thread-id>" \
  -f query='
mutation($threadId: ID!) {
  resolveReviewThread(input: { threadId: $threadId }) {
    thread { id isResolved }
  }
}'

Never resolve a thread just because it is inconvenient, stale-looking, or disagreed with. If it was not implemented or verified as already addressed, leave it open and report it.

Report

Print:

PR: <url>
Branch: <headRefName>
Implemented: <n> threads
Already addressed: <n> threads
Resolved on GitHub: <n> threads
Not relevant / left open:
- <url> — <reason>
Needs user:
- <url> — <question>
Validation:
- <command>: pass | fail | not run (<reason>)
Pushed: <commit or "no changes">

Notes

  • Do not merge the PR.
  • Do not dismiss reviews; only resolve review threads that were addressed.
  • Do not close top-level PR comments; summarize them if they influenced the work.
  • If a reviewer requested a larger design change that does not fit the PR, leave it open and ask the user.

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.