check-pr
Skill433 starsChanged 22 days agoMITView on GitHub
Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions. Waits for pending checks to complete, categorizes issues as actionable or informational, and optionally fixes and resolves them. Use when the user wants to check a PR/MR/CL, address review feedback, or prepare a change for submission.
- Commits and pushes
12 other projects use a version of this, 5 of them edited.
Adopted by
Most recently taken up by
- storybookjs/storybooktheir own version, first seen Nov 8, 2026
- patrickjaja/claude-desktop-extratheir own version, first seen Nov 8, 2026
- blamechris/chroxytheir own version, first seen Nov 8, 2026
- kellykampen/agent-skillsword for word, first seen Nov 1, 2026
- danielcherubini/skillstheir own version, first seen Oct 25, 2026
- ever-works/skillsedited, first seen Oct 9, 2026
Other versions12 projects use a version of this.
Word for word · 2
- basementstudio/website-2k25★ 266100% same
- kellykampen/agent-skills★ 2100% same
Edited · 5
- paperclipai/paperclip★ 112k58% same
- haseeb-heaven/gworkspace-agent★ 8299% same
- Bboyfarouk/skills★ 271% same
- ever-works/skills★ 158% same
- yxhta/skills★ 135% same
Wrote their own version · 5
- storybookjs/storybook★ 91ksame name
- patrickjaja/claude-desktop-extra★ 734same name
- danielcherubini/skills★ 14same name
- blamechris/chroxy★ 8same name
- shinobiashi/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- cli-reviewSkill
- greploopSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 50
If a number was provided, use it.
- Very specific: line 116
Before analyzing, ensure all status checks have completed.
- Distinctive: line 135
If any are failing, identify which ones and the failure reason.
- Very specific: line 146
Look for bot review comments (e.g.
- Distinctive: line 180
If there are actionable items:
- Distinctive: line 183
Ask the user if they want to fix the issues.
- Distinctive: line 184
If yes, make the fixes, then:
- Distinctive: line 186
GitHub/GitLab: commit and push:
- Distinctive: line 202
After addressing comments, resolve the corresponding review threads.
- Very specific: line 233
If hasNextPage is true, repeat with -f cursor=ENDCURSOR to get remaining threads.
- Very specific: line 268
If checking a chain of PRs/MRs/CLs, process them sequentially.
“Common” is measured: kept by at least 6 in 10 of the 9 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.
Files
Check PR
Analyze a pull request (GitHub), merge request (GitLab), or shelved changelist (Perforce) for review comments, status checks, and description completeness, then help address any issues found.
Inputs
- PR/MR/CL number (optional): If not provided, detect the PR/MR for the current branch, or the default pending changelist for p4.
Instructions
0. Detect platform
First check if the user is working in a Perforce depot by looking for a .p4config file or P4CLIENT/P4PORT environment variables:
# Check for Perforce environment
if p4 info >/dev/null 2>&1; then
VCS="perforce"
else
# Fall back to git remote detection
REMOTE_URL=$(git remote get-url origin)
if echo "$REMOTE_URL" | grep -qi "gitlab"; then
VCS="gitlab"
else
VCS="github"
fi
fiFor self-hosted GitLab instances whose hostname doesn't contain "gitlab", the user can override by passing --vcs gitlab as an input. For Perforce, the user can override by passing --vcs perforce.
1. Identify the PR/MR/CL
If a number was provided, use it. Otherwise, detect it:
GitHub:
gh pr view --json number -q .numberGitLab:
glab mr view --output json | jq '.iid'Perforce:
# List pending changelists for the current user/client
p4 changes -s pending -u $P4USER -c $P4CLIENTKey field differences between platforms:
- GitHub:
number,headRefName,headRefOid - GitLab:
iid,source_branch,sha - Perforce: changelist number (CL),
shelvedfiles for in-review CLs
2. Fetch PR/MR/CL details
GitHub:
gh pr view <PR_NUMBER> --json title,body,state,reviews,comments,headRefName,statusCheckRollup
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/comments
gh api --paginate "repos/{owner}/{repo}/issues/<PR_NUMBER>/comments?per_page=100"GitHub PRs are also issues, so general PR comments live on the issue comments endpoint. Greptile may edit a single general PR comment on each review cycle instead of creating a new review or comment. Always inspect the latest Greptile-authored general comment by updated_at, including any "Prompt to fix all with AI" section, before concluding that the PR is clear.
GitLab:
glab mr view <MR_IID> --output json
# Fetch discussions (inline diff comments are type "DiffNote"; general comments have null type)
glab api "projects/:fullpath/merge_requests/<MR_IID>/discussions"For GitLab, paginate discussions if needed (add ?per_page=100&page=N).
Perforce:
# Get changelist description, files, and status
p4 describe -s <CL_NUMBER>
# Get shelved files (for in-review CLs)
p4 describe -S <CL_NUMBER>
# Get the diff of the shelved changelist
p4 diff2 //...@=<CL_NUMBER> //...@=<CL_NUMBER>
# List review comments (if using p4 review workflow)
p4 review -c <CL_NUMBER>Key Perforce CL fields:
Change: changelist numberStatus:pending,submitted,shelvedDescription: the CL description / commit messageFiles: list of files in the CL
3. Wait for pending checks
Before analyzing, ensure all status checks have completed. If any checks are PENDING or IN_PROGRESS (GitHub) / running or pending (GitLab), poll every 30 seconds until all checks reach a terminal state.
GitHub: poll statusCheckRollup from gh pr view.
GitLab:
glab api "projects/:fullpath/merge_requests/<MR_IID>/pipelines"Pipeline statuses: running, pending, success, failed, canceled, skipped. Poll until no pipeline has running or pending status.
Perforce: Perforce doesn't have built-in CI checks natively. If the team uses a review tool (Swarm, etc.) or an external CI triggered by shelve events, check the relevant system. Otherwise, proceed to analysis immediately.
4. Analyze the PR/MR
Once all checks are complete, evaluate these areas:
A. Status Checks
- Are all CI checks passing?
- If any are failing, identify which ones and the failure reason.
B. PR/MR Description
- Is the description complete and follows team conventions?
- Are all required sections filled in?
- Are there TODOs or placeholders that need updating?
C. Review Comments
- Inline code review comments that need addressing
- Look for bot review comments (e.g. from
greptile-apps[bot]on GitHub, or the Greptile bot user on GitLab, linters, etc.) - Human reviewer comments
- Perforce: review comments from
p4 reviewor external review tools
D. General Comments
- Discussion comments on the PR/MR
- For GitHub, check the issue comments endpoint and use
updated_atto catch bot comments edited in place. Greptile's latest edited summary can contain actionable items even when there are no new inline comments. - Bot comments (deploy previews, etc.) — usually informational
- Perforce: CL description should include a clear summary, affected files rationale, and testing notes
5. Categorize issues
For each issue found, categorize as:
| Category | Meaning |
| Actionable | Code changes, test improvements, or fixes needed |
| Informational | Verification notes, questions, or FYIs that don't require changes |
| Already addressed | Issues that appear to be resolved by subsequent commits |
6. Report findings
Present a summary table:
| Area | Issue | Status | Action Needed |
| Status Checks | CI build failing | Failing | Fix type error in src/api.ts |
| Review | "Add null check" — @reviewer | Actionable | Add guard clause |
| Description | TODO placeholder in test plan | Actionable | Fill in test plan |
| Review | "Looks good" — @teammate | Informational | None |
7. Fix issues (if requested)
If there are actionable items:
- Switch to the PR/MR's branch (git) or ensure files are open in the correct CL (Perforce) if not already.
- Ask the user if they want to fix the issues.
- If yes, make the fixes, then:
GitHub/GitLab: commit and push:
git add <files>
git commit -m "address review feedback"
git pushPerforce: open files for edit, make changes, and re-shelve:
p4 edit <file>
# make changes
p4 shelve -f -c <CL_NUMBER>8. Resolve review threads
After addressing comments, resolve the corresponding review threads.
Perforce — Perforce does not have a native "resolve thread" concept. Instead, mark comments as addressed by updating the CL description or by responding in the review tool being used (Swarm, etc.). If using p4 review:
# Mark files as reviewed after addressing feedback
p4 review -c <CL_NUMBER>GitHub — fetch unresolved thread IDs (paginate if needed — see the GraphQL reference):
gh api graphql -f query='
query($cursor: String) {
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUMBER) {
reviewThreads(first: 100, after: $cursor) {
pageInfo { hasNextPage endCursor }
nodes {
id
isResolved
comments(first: 1) {
nodes { body path }
}
}
}
}
}
}'If hasNextPage is true, repeat with -f cursor=ENDCURSOR to get remaining threads.
Then resolve threads that have been addressed or are informational:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "THREAD_ID"}) {
thread { isResolved }
}
}'Batch multiple resolutions into a single mutation using aliases (t1, t2, etc.).
GitLab — fetch unresolved discussions (see the GitLab API reference):
glab api "projects/:fullpath/merge_requests/<MR_IID>/discussions?per_page=100"Filter for discussions where "resolved": false. Collect each discussion's id.
Resolve each discussion individually (GitLab has no batch resolution):
glab api --method PUT \
"projects/:fullpath/merge_requests/<MR_IID>/discussions/<DISCUSSION_ID>" \
--field resolved=trueRepeat for each unresolved discussion ID.
9. Multiple PRs/MRs/CLs
If checking a chain of PRs/MRs/CLs, process them sequentially.
Perforce — to check multiple changelists at once:
p4 changes -s pending -u $P4USER -c $P4CLIENT -lOutput format
Summarize:
- PR/MR/CL title or description and current state
- Platform detected (GitHub / GitLab / Perforce)
- Status checks summary (passing/failing/pending) — or N/A for Perforce
- Total issues found
- Actionable items with descriptions
- Items that can be ignored with reasons
- Recommended next steps
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.

