analyze-pr-comments
Skill5 starsChanged 17 days agoMITView on GitHub
Use when user wants to list, analyze, review, or summarize GitHub PR comments on a pull request number or URL
In this repository50 other files it gives its agents.
- architecture-analyzeSkill
- architecture-tradeoffSkill
- askSkill
- code-smellsSkill
- debugging-rocprof-sysSkill
- exploration-explore-codeSkill
- git-commitSkill
- git-gh-clientSkill
- git-prepare-pull-requestSkill
- git-pull-request-statusSkill
- gitSkill
- grill-meSkill
- library-amd-smiSkill
- notify-meSkill
- planning-architectureSkill
- planning-baseSkill
- planning-bugfixSkill
- planning-docsSkill
- planning-featureSkill
- planning-refactorSkill
- programming-cmake-best-practicesSkill
- programming-cpp-constexprSkill
- programming-cpp-design-patternsSkill
- programming-cpp-naming-rulesSkill
- programming-cpp-policy-based-diSkill
- programming-cppSkill
- programming-cpp-stl-algorithmsSkill
- programming-pythonSkill
- pr-review-interactiveSkill
- pr-reviewSkill
- radisha-create-skillSkill
- radisha-helpSkill
- radisha-improve-skillSkill
- radisha-skillsSkill
- radisha-updateSkill
- refactoring-techniquesSkill
- review-architectureSkill
- rocprofsys-buildSkill
- rocprofsys-configureSkill
- rocprofsysSkill
- static-analysisSkill
- testing-gtest-gmockSkill
- testing-pytestSkill
- testing-testplanSkill
- therock-build-to-commitSkill
- therock-commit-in-buildSkill
- therock-first-build-with-commitSkill
- update-pr-descriptionSkill
- verify-pmc-metricsSkill
- watchSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Distinctive: line 19
If PR number/URL not provided, detect from current branch:
- Very specific: line 43
Use {owner} and {repo} from gh repo view --json nameWithOwner.
≈ “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.
Files
Analyze PR Comments
Fetch every comment on a GitHub PR, format them uniformly, distill reviewer intent, and provide a code-backed fix for each.
Triggering
- "analyze PR comments", "list comments on PR #N", "summarize PR feedback"
- User shares a PR URL or number and asks to review what reviewers said
Workflow
Step 1 — Resolve PR target
If PR number/URL not provided, detect from current branch:
gh pr view --json number,urlStep 2 — Fetch ALL comment types
GitHub has three distinct comment sources. Fetch all three:
# 1. Inline review comments (attached to code lines)
gh api repos/{owner}/{repo}/pulls/{PR}/comments \
--jq '.[] | {id, author: .user.login, body, path, line}'
# 2. PR conversation comments (not attached to code)
gh api repos/{owner}/{repo}/issues/{PR}/comments \
--jq '.[] | {id, author: .user.login, body}'
# 3. Review-level summary comments (review body text)
gh api repos/{owner}/{repo}/pulls/{PR}/reviews \
--jq '.[] | select(.body != "") | {id, author: .user.login, body, state}'Use {owner} and {repo} from gh repo view --json nameWithOwner.
Step 3 — Merge and number
Combine all three sets. Sort by created_at ascending. Assign sequential #N starting at 1. Skip bot accounts (e.g. github-actions[bot], dependabot[bot]).
Step 4 — Format each comment
Output exactly this structure for every comment:
#<N> <Author>
#<Original Comment>
<verbatim text — do NOT paraphrase, trim, or reformat>
#<Comment simplified>
<1-2 sentences: what the reviewer actually wants, not what they said>
#<Proposed fix with proof>
<code block that demonstrates the fix>
<if reviewer already included a code suggestion: propose a DIFFERENT valid implementation>Inline comments: prepend file context before the block:
File: path/to/file.go (line 42)Rules — DO NOT VIOLATE
| Rule | Violation |
| Quote original comment verbatim | Paraphrasing, trimming, summarizing |
| Proposed fix = actual code | "You should rename the function" (no code) |
| Alternative fix if reviewer proposed one | Copying or slightly rewording their suggestion |
| All 3 comment sources | Only fetching gh pr view --comments |
| Skip bots | Including CI/bot noise in the numbered list |
Red Flags (stop and correct)
- Writing "The reviewer suggests X" in the Original Comment section — that is paraphrase
- Proposed fix that contains no code block
- Less comments than expected — you likely missed inline review threads
- Proposed fix mirrors the reviewer's own code sample word-for-word
Example Output
File: internal/auth/session.go (line 87)
#1 alice
#Original Comment
This function is doing too much. It handles both validation and persistence in the same call which makes it hard to unit test.
#Comment simplified
Split the function into separate validation and save steps so each can be tested in isolation.
#Proposed fix with proof
```go
// Before
func saveSession(s Session) error {
if s.Token == "" {
return errors.New("token required")
}
return db.Save(s)
}
// After — two responsibilities, two functions
func validateSession(s Session) error {
if s.Token == "" {
return errors.New("token required")
}
return nil
}
func persistSession(s Session) error {
return db.Save(s)
}
// Caller composes them
func handleSave(s Session) error {
if err := validateSession(s); err != nil {
return err
}
return persistSession(s)
}
## Required Background
Uses `gh` CLI — if unavailable, invoke **git-gh-client** first to verify installation and authentication.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
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.

