gh-pr-review
AGENTS.md175 starsChanged 11 months agoMITView on GitHub
Default scope: - Includes every reviewer and review state (APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED). - Threads are grouped by parent inline comment; replies are sorted by created_at ascending. - Optional fields are omitted rather than rendered as null. Useful filters: - --reviewer <login> — Limit to a specific reviewer login (case-insensitive). - --states <list> — Comma-separated list of review states. - --unresolved — Only include unresolved threads. - --not_outdated — Drop threads marked as outdated. - --tail <n> — Keep the…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- gh-pr-reviewSkill
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
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
- Very specific: line 33
Use the thread_id values with gh pr-review comments reply <PR number> to continue discussions.
- Very specific: line 46
Start a pending review: Use gh pr-review review --start <PR number> -R <owner>/<repo>
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
Documentation gh pr-review
You have a pre-installed gh pr-review extension that simplifies working with Pull Requests. Below are the commands for retrieving PR reviews/comments and replying to review comments in a thread, and open and sumbit a review.
Quick PR overview with gh
View details: gh pr-review review view <PR number> -R <owner>/<repo>
Default scope:
- Includes every reviewer and review state (APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED).
- Threads are grouped by parent inline comment; replies are sorted by
created_atascending. - Optional fields are omitted rather than rendered as
null.
Useful filters:
--reviewer <login>— Limit to a specific reviewer login (case-insensitive).--states <list>— Comma-separated list of review states.--unresolved— Only include unresolved threads.--not_outdated— Drop threads marked as outdated.--tail <n>— Keep the lastnreplies per thread (0 keeps all).
Example capturing the latest actionable work:
gh pr-review review report 51 -R agyn/repo \
--reviewer emerson \
--states CHANGES_REQUESTED,COMMENTED \
--unresolved \
--not_outdated \
--tail 2Reply to an inline comment
Use the thread_id values with gh pr-review comments reply <PR number> to continue discussions.
Example:
gh pr-review comments reply 51 -R owner/repo \
--thread-id PRRT_kwDOAAABbcdEFG12 \
--body "Follow-up addressed in commit abc123" Note: If you want to leave a high-level comment on a PR that isn’t tied to any specific review thread, you can use gh pr comment. This allows you to add general feedback directly to the pull request.
Submit Review
Start a pending review. Use
gh pr-review review --start <PR number> -R <owner>/<repo>gh pr-review review --start 42 -R owner/repo { "id": "PRR_kwDOAAABbcdEFG12", "state": "PENDING" }Add inline comments with the pending review ID. The
review --add-commentrequiersreview-ididentifierPRR_…. Usegh pr-review review --add-comment <PR number> -R <owner>/<repo> .... Example:gh pr-review review --add-comment 42 -R owner/repo \ --review-id PRR_kwDOAAABbcdEFG12 \ --path internal/service.go \ --line 42 \ --body "nit: use helper" { "id": "PRRT_kwDOAAABbcdEFG12", "path": "internal/service.go", "is_outdated": false, "line": 42 }Submit the review. Reuse the pending review
PRR_…identifier when finalizing. Successful submissions emit a status-only payload. Errors are returned as structured JSON for troubleshooting. Usegh pr-review review --submit <PR number> -R <owner>/<repo> .... Example:gh pr-review review --submit 42 -R owner/repo \ --review-id PRR_kwDOAAABbcdEFG12 \ --event REQUEST_CHANGES \ --body "Please add tests" { "status": "Review submitted successfully" }
Optimization Tips:
- The
gh pr-review review --add-commentcan be executed in batch instead of one by one to optimize performance. Grouping calls where possible is recommended.
Resolving review comments
To see a list of your unresolved threads, use gh pr-review review report with filters --unresolved and --reviewer <your login>
Mark an inline thread as resolved:
gh pr-review threads resolve 42 -R owner/repo --thread-id PRRT_kwDOAAABbcdEFG12
{
"thread_node_id": "PRRT_kwDOAAABbcdEFG12",
"is_resolved": true
}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.

