agentleFS
ByronScottJonesByronScottJones/Agents/skills/get-pr-comments/SKILL.md

get-pr-comments

Skill7 starsChanged 2 months agoMITView on GitHub

Use when an agent needs to retrieve GitHub pull request review comments, review threads, or general review feedback. Supports an explicit repository and PR number or the active pull request, with optional filtering for unresolved, resolved, inline, and timeline comments. Read-only: never changes or resolves review threads.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use check-compiler-errors, new-branch-and-pr and 2 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.
  • cogine-aiSkill

    check-compiler-errors

    Run compile and type-check commands and report failures

    Also in 3 projects that use this

  • cogine-aiSkill

    new-branch-and-pr

    Create a fresh branch, complete work, and open a pull request

    Also in 3 projects that use this

  • MicrosoftSkill

    run-smoke-tests

    Run smoke tests to verify extension functionality in a real VS Code environment. Use this when checking if basic features work after changes.

    Also in 3 projects that use this

  • +1 more from cogine-ai

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    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. Very specific:

    If pullRequest is supplied, require owner and repository unless the GitHub integration can infer them unambiguously.

    line 31
  2. Distinctive:

    Read both sources when available:

    line 47
  3. Distinctive:

    Never resolve, reply to, edit, label, approve, or otherwise mutate the PR.

    line 57
  4. Distinctive:

    Use the separate review-comment workflow when an action is requested.

    line 58
  5. Very specific:

    Use null for unavailable scalar values and an empty array for unavailable collections.

    line 107
  6. Very specific:

    If no active PR exists, request or report owner, repository, and pullRequest.

    line 113
  7. Distinctive:

    If GitHub authentication fails, report that authentication is required and do not substitute local Git history for review comments.

    line 114
  8. Distinctive:

    If the PR exists but comments are unavailable, return the PR metadata and a limitation explaining which comment source was unavailable.

    line 116
  9. Distinctive:

    If the result is truncated, say so and preserve the available comments.

    line 118
  10. Distinctive:

    If cached and refreshed results disagree, prefer the refreshed result and note that the PR changed during retrieval.

    line 119
  11. Distinctive:

    Use the bundled Bash script only when the structured GitHub tools are unavailable or the caller explicitly requests a local CLI fallback:

    line 124
  12. Distinctive:

    Run the script from the repository root or use its absolute path.

    line 145
  13. Distinctive:

    When another workflow will address the feedback, pass along the normalized thread IDs and whether each thread is resolved.

    line 151

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Get Pull Request Comments

Retrieve pull request review feedback in a predictable, read-only form. Use this skill before addressing review comments, summarizing review feedback, or deciding whether a PR needs changes.

Parameters

Accept these parameters when the caller provides them:

ParameterTypeDefaultMeaning
ownerstringrepository owner from workspaceGitHub repository owner.
repositorystringrepository name from workspaceGitHub repository name.
pullRequestintegeractive PRPull request number.
activebooleantrue when no PR number is givenUse the checked-out active PR.
refreshbooleanautomaticForce a fresh GitHub read.
includeResolvedbooleanfalseInclude resolved inline review threads.
includeTimelinebooleantrueInclude general PR reviews and timeline comments.
includeSystembooleanfalseInclude bot/system events that are not review feedback.
filestringall filesLimit inline comments to a repository-relative file path.
authorstringall authorsLimit comments to a GitHub login.
formatsummary or jsonsummarySelect human-readable output or normalized structured output.

If pullRequest is supplied, require owner and repository unless the GitHub integration can infer them unambiguously. If neither pullRequest nor active is supplied, use the active PR only when one is available; otherwise report the missing repository and PR parameters.

Retrieval Procedure

  1. Determine the target using the parameters.
  2. For the active PR, call the active pull request tool once without forcing a refresh.
  3. Inspect lastUpdatedAt. If the cached result is less than three minutes old, call the same tool again with refresh: true. Otherwise use the cached result unless the caller explicitly set refresh: true.
  4. For an explicit PR number, use the GitHub pull request or issue/PR details tool that returns review threads and timeline comments. Do not use repository text search as the primary retrieval method.
  5. Read both sources when available:
    • reviewThreads for inline comments, thread state, and file locations.
    • timelineComments for general reviews, change requests, and non-inline feedback.
  6. Filter the result:
    • Exclude resolved threads unless includeResolved is true.
    • Exclude system-only events unless includeSystem is true.
    • Apply file and author filters to both inline comments and timeline comments when the fields exist.
  7. Preserve the original comment text, author, file, line or position, timestamp, thread ID, resolution state, and comment type when available.
  8. Never resolve, reply to, edit, label, approve, or otherwise mutate the PR. Use the separate review-comment workflow when an action is requested.

Normalized Output

For format: summary, return:

  1. Repository and PR identity.
  2. PR title, state, and URL when available.
  3. Retrieval timestamp and whether the result was refreshed.
  4. Unresolved inline threads first, grouped by file and ordered by severity or source order when severity is unavailable.
  5. General review and timeline feedback next.
  6. Resolved threads only when requested.
  7. A short note for skipped filters, unavailable fields, or retrieval limitations.

For format: json, return an object with this shape:

{
  "repository": "owner/name",
  "pullRequest": 0,
  "title": "",
  "state": "",
  "url": "",
  "retrievedAt": "",
  "refreshed": false,
  "reviewThreads": [
    {
      "id": "",
      "isResolved": false,
      "canResolve": false,
      "file": "",
      "comments": [
        {
          "author": "",
          "body": "",
          "commentType": "",
          "createdAt": "",
          "line": null,
          "position": null
        }
      ]
    }
  ],
  "timelineComments": [],
  "limitations": []
}

Use null for unavailable scalar values and an empty array for unavailable collections. Do not invent line numbers, authors, timestamps, or resolution states.

Failure Handling

  • If no active PR exists, request or report owner, repository, and pullRequest.
  • If GitHub authentication fails, report that authentication is required and do not substitute local Git history for review comments.
  • If the PR exists but comments are unavailable, return the PR metadata and a limitation explaining which comment source was unavailable.
  • If the result is truncated, say so and preserve the available comments.
  • If cached and refreshed results disagree, prefer the refreshed result and note that the PR changed during retrieval.

CLI Fallback

Use the bundled Bash script only when the structured GitHub tools are unavailable or the caller explicitly requests a local CLI fallback:

skills/get-pr-comments/scripts/get-pr-comments.sh \
  --owner OWNER \
  --repo REPOSITORY \
  --pr NUMBER \
  --format json

The script requires bash, gh, jq, and git. It supports --file, --author, and --include-system filters, uses paginated REST responses, and cleans up temporary files automatically. It never changes the pull request.

The REST fallback returns reviewComments and timelineComments, but its reviewThreads array is empty because REST does not provide GraphQL thread resolution state. Its limitations array must be preserved and surfaced to the caller. Do not claim that unresolved or resolved filtering was applied when the fallback was used.

Run the script from the repository root or use its absolute path. Do not copy its output into a committed file unless the caller explicitly requests an export.

Review Handoff

When another workflow will address the feedback, pass along the normalized thread IDs and whether each thread is resolved. Do not resolve threads in this skill; the addressing workflow owns implementation, replies, and resolution.

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.