Ordinary-claude-skills fetch-unresolved-comments
Fetch unresolved PR review comments using GitHub GraphQL API, filtering out resolved and outdated feedback.
install
source · Clone the upstream repo
git clone https://github.com/Microck/ordinary-claude-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Microck/ordinary-claude-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills_categorized/git-workflows/fetch-unresolved-comments" ~/.claude/skills/microck-ordinary-claude-skills-fetch-unresolved-comments-f8c81f && rm -rf "$T"
manifest:
skills_categorized/git-workflows/fetch-unresolved-comments/SKILL.mdsource content
Fetch Unresolved PR Review Comments
Uses GitHub's GraphQL API to fetch only unresolved review thread comments from a pull request.
When to Use
- You need to get only unresolved review comments from a PR
- You want to filter out already-resolved and outdated feedback
Instructions
-
Parse PR information:
- First check for environment variables:
- If
andPR_NUMBER
are set, read them and parseGITHUB_REPOSITORY
asGITHUB_REPOSITORY
and useowner/repo
directlyPR_NUMBER
- If
- Otherwise:
- Use
to get the current branch's PR URL and parse to extract owner, repo, and PR numbergh pr view --json url -q '.url'
- Use
- First check for environment variables:
-
Run the Python script:
GITHUB_TOKEN=$(gh auth token) \ uv run python .claude/skills/fetch-unresolved-comments/fetch_unresolved_comments.py <owner> <repo> <pr_number> -
Script options:
: Provide token explicitly (default: GITHUB_TOKEN or GH_TOKEN env var)--token <token>
-
Parse the JSON output: The script always outputs JSON with:
: Total number of unresolved comments across all threadstotal
: Review threads grouped by file path (each thread contains multiple comments in a conversation)by_file
Example JSON Output
{ "total": 3, "by_file": { ".github/workflows/resolve.yml": [ { "thread_id": "PRRT_kwDOAL...", "isOutdated": false, "line": 40, "startLine": null, "diffHunk": "@@ -0,0 +1,245 @@\n+name: resolve...", "comments": [ { "id": 2437935275, "body": "We can remove this once we get the key.", "author": "harupy", "createdAt": "2025-10-17T00:53:20Z" }, { "id": 2437935276, "body": "Good catch, I'll update it.", "author": "contributor", "createdAt": "2025-10-17T01:10:15Z" } ] } ], ".gitignore": [ { "thread_id": "PRRT_kwDOAL...", "isOutdated": false, "line": 133, "startLine": null, "diffHunk": "@@ -130,0 +133,2 @@\n+.claude/*", "comments": [ { "id": 2437935280, "body": "Should we add this to .gitignore?", "author": "reviewer", "createdAt": "2025-10-17T01:15:42Z" } ] } ] } }