check-pr/SKILL.md
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.
npx skillsauth add greptileai/skills check-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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
fi
For 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.
If a number was provided, use it. Otherwise, detect it:
GitHub:
gh pr view --json number -q .number
GitLab:
glab mr view --output json | jq '.iid'
Perforce:
# List pending changelists for the current user/client
p4 changes -s pending -u $P4USER -c $P4CLIENT
Key field differences between platforms:
number, headRefName, headRefOidiid, source_branch, shashelved files for in-review CLsGitHub:
gh pr view <PR_NUMBER> --json title,body,state,reviews,comments,headRefName,statusCheckRollup
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/comments
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 CLBefore 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.
Once all checks are complete, evaluate these areas:
greptile-apps[bot] on GitHub, or the Greptile bot user on GitLab, linters, etc.)p4 review or external review toolsFor 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 |
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 |
If there are actionable items:
GitHub/GitLab: commit and push:
git add <files>
git commit -m "address review feedback"
git push
Perforce: open files for edit, make changes, and re-shelve:
p4 edit <file>
# make changes
p4 shelve -f -c <CL_NUMBER>
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=true
Repeat for each unresolved discussion ID.
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 -l
Summarize:
development
Iteratively improves a PR (GitHub) or MR (GitLab) until Greptile gives it a 5/5 confidence score with zero unresolved comments. Triggers Greptile review, fixes all actionable comments, pushes, re-triggers review, and repeats. Use when the user wants to fully optimize a PR/MR against Greptile's code review standards.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.