agentleFS
vstorm-covstorm-co/agenticos/.claude/skills/pr-comments/SKILL.md

pr-comments

Skill241 starsChanged 30 days agoApache-2.0View on GitHub

Use this skill when user asks to address PR review comments. It will fetch all comments, present them in a structured format.

18 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use worktree, jira and 6 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.
  • MicrosoftSkill

    worktree

    Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.

    Also in 3 projects that use this

  • MicrosoftSkill

    jira

    Jira issue workflows for search, issue updates, transitions, comments, field discovery, and interactive credential setup via the Jira REST API. Use when you need to configure Jira access, search with JQL, inspect an issue, create or update work items, move an issue between statuses, post comments, or discover required fields for issue creation.

    Also in 3 projects that use this

  • simo97Skill

    write-a-skill

    Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 4 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 3 projects that use this

  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 3 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this exact query (replace NUMBER with the PR number):

    line 44
  2. Distinctive:

    Read each file mentioned in the threads

    line 204
  3. Distinctive:

    After all fixes are applied:

    line 214
  4. Very specific:

    Run the project's verification command.

    line 215
  5. Distinctive:

    If it fails → fix before committing

    line 216
  6. Very specific:

    Commit all fixes together: fix: Address PR review comments

    line 217
  7. Distinctive:

    All fixes go in one commit: No per-thread commits.

    line 220
  8. Distinctive:

    Read the target file before making any fix

    line 231
  9. Distinctive:

    Run the verification command after all fixes are applied, not per fix

    line 232
  10. Distinctive:

    All fixes go in a single commit

    line 233
  11. Distinctive:

    If a comment is ambiguous, ask rather than guess

    line 234
  12. Distinctive:

    If a comment suggests a large refactor, flag it first

    line 235

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

Skill: PR Review Comments

Fetch all review comments from a PR, present them in a structured format, then systematically address each one.

Inputs

Determine from conversation context or user's message:

  • PR number or URL — if not given, detect from current branch: gh pr view --json number -q .number
  • Include nits — default: skip. User may say "include nits"
  • Include outdated — default: skip. User may say "include outdated"
  • Include resolved — default: skip. User may say "include resolved"
  • List only — if user just wants to see comments without fixing

Steps

1. Fetch all review threads

IMPORTANT: Use GraphQL, NOT REST. The REST endpoints (pulls/N/comments, pulls/N/reviews) do NOT return isResolved or isOutdated. Only GraphQL has this data.

OWNER=$(gh repo view --json owner -q .owner.login)
REPO=$(gh repo view --json name -q .name)

Be on the PR's own branch before reading a single file. The comments come from the PR number; the edits, the commit and the push go to whatever is checked out. Given a PR number while another branch is out, every fix lands on an unrelated branch and the PR that was asked about is untouched:

HEAD_REF=$(gh pr view NUMBER --json headRefName -q .headRefName)
[ "$(git branch --show-current)" = "$HEAD_REF" ] || gh pr checkout NUMBER

Refuse to continue if the checkout fails or the working tree is dirty - a fix applied over somebody else's uncommitted work is not a fix.

Run this exact query (replace NUMBER with the PR number):

gh api graphql -F owner="$OWNER" -F name="$REPO" -F pr=NUMBER -f query='
query($owner: String!, $name: String!, $pr: Int!) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $pr) {
      title
      url
      comments(first: 100) {
        nodes {
          body
          author { login }
          createdAt
          url
        }
        pageInfo { hasNextPage endCursor }
      }
      reviews(first: 100) {
        nodes {
          body
          author { login }
          state
          url
        }
        pageInfo { hasNextPage endCursor }
      }
      reviewThreads(first: 100) {
        nodes {
          isResolved
          isOutdated
          path
          line
          startLine
          resolvedBy { login }
          comments(first: 20) {
            nodes {
              body
              originalLine
              author { login }
              createdAt
              replyTo { id }
            }
          }
        }
        pageInfo { hasNextPage endCursor }
      }
    }
  }
}'

Every connection above asks for pageInfo, because first: 100 caps a page rather than proving the connection was read to the end. Paginate each one whose hasNextPage is true by adding its cursor and updating the query signature. Re-use the same nodes selection set as the first query (shown here so the snippet is directly executable). A PR with more than a hundred conversation comments or reviews is rare and exactly the PR this skill exists for, so do not assume one page covers it.

gh api graphql -F owner="$OWNER" -F name="$REPO" -F pr=NUMBER -F after="$CURSOR" -f query='
query($owner: String!, $name: String!, $pr: Int!, $after: String) {
  repository(owner: $owner, name: $name) {
    pullRequest(number: $pr) {
      comments(first: 100) {
        nodes {
          body
          author { login }
          createdAt
          url
        }
      }
      reviews(first: 100) {
        nodes {
          body
          author { login }
          state
          url
        }
      }
      reviewThreads(first: 100, after: $after) {
        nodes {
          isResolved
          isOutdated
          path
          line
          startLine
          resolvedBy { login }
          comments(first: 20) {
            nodes {
              body
              originalLine
              author { login }
              createdAt
              replyTo { id }
            }
          }
        }
        pageInfo { hasNextPage endCursor }
      }
    }
  }
}'

2. Filter threads

ConditionDefaultInclude when
isResolved: trueSkipuser asks for resolved
isOutdated: trueSkipuser asks for outdated
Nit commentSkipuser asks for nits

Nit detection: first comment body starts with nit:, nit -, nitpick (case-insensitive, first 50 chars).

3. Present in unified format

reviewThreads are per-file/per-line, so they group by path. The two other sources are not anchored to the diff, so present each as its own section:

  • Top-level conversation comments — pullRequest.comments.nodes (IssueComments from the Conversation tab).
  • Review summary bodies — pullRequest.reviews.nodes with a non-empty body (the note left alongside Approve / Request changes / Comment). Skip reviews whose body is empty — those carry only inline threads, already covered above.
## PR #<number>: <title>
<url>

**<N> actionable threads** (filtered: <X> resolved, <Y> outdated, <Z> nits)

---

### Inline threads

#### Thread 1 · `<path>`:<line> · @<author>
> <comment body>
>
> Reply by @<reply_author>:
> <reply body>

#### Thread 2 · `<path>`:<line> · @<author>
> <comment body>

---

### Conversation comments

#### @<author> · <createdAt> · <url>
> <comment body>

---

### Review summaries

#### @<author> · <state> · <url>
> <review body>

Group inline threads by file path, order by line number within file. Mark [outdated], [resolved by @login], [nit] if included via flags. Omit the "Conversation comments" or "Review summaries" section entirely when it has no entries.

4. Stop here if user only wants to list

5. Plan fixes

Before touching code:

  1. Read each file mentioned in the threads
  2. For each thread classify: fix (actionable), skip (question/discussion), or ask (unclear)
  3. Present the plan and wait for user confirmation

6. Apply all fixes

For each fix:

  1. State which thread you're addressing
  2. Apply the fix (Edit tool)

After all fixes are applied:

  1. Run the project's verification command. In this repository that is make check from the repository root - the Python project lives under backend/, so a bare uv run pre-commit at the root fails to spawn it. Substitute the equivalent in other repos.
  2. If it fails → fix before committing
  3. Commit all fixes together: fix: Address PR review comments
  4. Push to remote

All fixes go in one commit. No per-thread commits.

7. Summary

Fixed: N · Skipped: M · Needs input: K
Commit: <hash> <message>

Rules

  • Read the target file before making any fix
  • Run the verification command after all fixes are applied, not per fix
  • All fixes go in a single commit
  • If a comment is ambiguous, ask rather than guess
  • If a comment suggests a large refactor, flag it first

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.