为Paperclip新增或扩展贯穿真实浏览器、服务器、数据库和runner的端到端评估,整理测试数据、判定条件与证据,并在现有报告中查看操作结果。
- 新增完整用户操作流程的评估
- 更新测试数据与判定条件
- 在评估报告中加入截图和产物
检查GitHub、GitLab和Perforce变更中的评审意见、自动检查失败及说明缺漏,整理待办事项,并按请求协助修改和解决已处理的讨论。
Check a GitHub, GitLab, or Perforce PR/MR/CL for review comments, failing checks, and PR-body gaps. Use when asked to inspect, fix, or prepare a change for submission.
此技能检查GitHub的PR、GitLab的MR和Perforce的CL,整理评审意见、自动检查失败和变更说明中的缺漏。它将发现的问题分为需要处理、供参考和已经解决三类,并通过表格说明理由及下一步操作。根据请求,还可协助修改代码或说明、落实修改,以及将已处理的评审讨论标记为已解决。
适合在提交变更前进行检查,或在评审后确认还有哪些工作尚未完成。除了人工评论,也会查看机器人的意见和经过编辑的摘要。省略变更编号时,会根据当前分支等信息寻找对应的变更。
需要git,以及对应平台已完成认证的gh、glab或p4。GitHub必须有针对当前提交且已正常完成的Greptile检查,不能凭旧结果结束检查。GitLab和Perforce的Greptile集成也有相同的结果时效检查。许可证为MIT。
本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。
AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。
总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月20日 评估。仅供参考,安装前请同时查看原文。
安装前可以查看交给 AI 代理的指令内容。
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,headRefName,headRefOid -q '{number: .number, branch: .headRefName, head: .headRefOid}'
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,headRefOid,statusCheckRollup
OWNER_REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
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 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.
For GitHub PRs, do not treat an existing Greptile review, comment, or summary as current unless it is tied to the PR's exact current headRefOid. This is especially important after pushing a new commit to an existing PR: a Greptile review on an older commit is stale, even if the PR still has a Greptile comment or prior review.
Fetch the current head SHA immediately before the Greptile gate:
HEAD_SHA=$(gh pr view <PR_NUMBER> --json headRefOid -q .headRefOid)
Then inspect check-runs for that commit and require a completed Greptile run:
OWNER_REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
GREPTILE_CHECKS=$(gh api "repos/$OWNER_REPO/commits/$HEAD_SHA/check-runs?per_page=100" \
--jq '[.check_runs[] | select(.name | test("greptile"; "i"))]')
# A run only counts as a valid fresh pass when it has completed AND concluded cleanly.
# GitHub check-run conclusions: success, neutral, skipped, failure, timed_out,
# cancelled, action_required, stale. Treat success/neutral as clean;
# everything else (especially failure and action_required) must block.
FRESH_GREPTILE_COMPLETED=$(echo "$GREPTILE_CHECKS" \
| jq '[.[] | select(.status == "completed")] | length')
FRESH_GREPTILE_CLEAN=$(echo "$GREPTILE_CHECKS" \
| jq '[.[] | select(.status == "completed" and (.conclusion | IN("success","neutral")))] | length')
FRESH_GREPTILE_BLOCKING=$(echo "$GREPTILE_CHECKS" \
| jq '[.[] | select(.status == "completed" and ((.conclusion | IN("success","neutral")) | not))] | length')
if [ "$FRESH_GREPTILE_COMPLETED" = "0" ]; then
echo "Blocked: no completed Greptile review/check is tied to current PR head $HEAD_SHA."
echo "Request a fresh Greptile review against this head before marking the PR check done."
echo "Suggested trigger: gh pr comment <PR_NUMBER> --body \"@greptile review\""
exit 1
fi
if [ "$FRESH_GREPTILE_BLOCKING" != "0" ] || [ "$FRESH_GREPTILE_CLEAN" = "0" ]; then
echo "Blocked: Greptile completed on head $HEAD_SHA but did not conclude clean"
echo "(conclusion was failure/action_required/timed_out/cancelled/stale, or no clean run exists)."
echo "Address the findings, push, and re-run Greptile until it concludes success/clean on the new head."
exit 1
fi
If a Greptile check exists for the current head but is still pending or in progress, wait for it with the same polling pattern used by greploop rather than proceeding from older review material. If no Greptile check appears for the current head after a reasonable wait, report the PR as blocked on a fresh Greptile review for HEAD_SHA and stop. Do not mark the check complete from PR comments, PR reviews, or Greptile summaries that cannot be associated with the current head SHA.
For GitLab installations with Greptile integration, apply the same freshness rule against the MR's current head SHA:
# 1. Get the MR's current head SHA
MR_SHA=$(glab mr view <MR_IID> --output json | jq -r '.sha // .diff_refs.head_sha')
# 2. Find the latest pipeline for that EXACT sha, then the Greptile job within it.
LATEST_PIPELINE_ID=$(glab api "projects/:fullpath/merge_requests/<MR_IID>/pipelines" \
| jq -r --arg sha "$MR_SHA" '[.[] | select(.sha == $sha)] | sort_by(.id) | last | .id // empty')
if [ -n "$LATEST_PIPELINE_ID" ]; then
GREPTILE_JOBS=$(glab api "projects/:fullpath/pipelines/$LATEST_PIPELINE_ID/jobs" \
| jq --arg sha "$MR_SHA" '[.[] | select(.name | test("greptile"; "i"))
| {name, status, pipeline_sha: $sha}]')
else
GREPTILE_JOBS='[]'
fi
GREPTILE_JOB_SUCCESS=$(echo "$GREPTILE_JOBS" \
| jq '[.[] | select(.status == "success")] | length')
GREPTILE_JOB_BLOCKING=$(echo "$GREPTILE_JOBS" \
| jq '[.[] | select(.status != "success")] | length')
# 3. If Greptile integrates via MR notes instead of a CI job, require the newest
# Greptile note to reference the current head sha and report a clean review.
GREPTILE_NOTES=$(glab api "projects/:fullpath/merge_requests/<MR_IID>/discussions?per_page=100" \
| jq --arg sha "$MR_SHA" '[.[].notes[]
| select(.author.username | test("greptile"; "i"))]
| sort_by(.updated_at // .created_at)')
GREPTILE_NOTE_CLEAN=$(echo "$GREPTILE_NOTES" \
| jq --arg sha "$MR_SHA" 'if length == 0 then 0
elif ((last.body // "") | contains($sha) and test("Confidence Score:[[:space:]]*5/5|Confidence:[[:space:]]*5/5|\\b5/5\\b"; "i") and (test("Prompt To Fix|blocking issue|failed|action required"; "i") | not)) then 1
else 0 end')
if [ "$GREPTILE_JOB_SUCCESS" = "0" ] && [ "$GREPTILE_NOTE_CLEAN" = "0" ]; then
echo "Blocked: no successful Greptile job or completed-clean current-head Greptile note is tied to MR head $MR_SHA."
exit 1
fi
if [ "$GREPTILE_JOB_BLOCKING" != "0" ]; then
echo "Blocked: at least one Greptile job for MR head $MR_SHA did not succeed."
exit 1
fi
Block completion if, for MR_SHA, there is (a) no Greptile job or note at all (missing), (b) the newest Greptile job/note is tied to a different sha (stale), or (c) the Greptile job status is not success. A completed Greptile result for a different SHA is stale and must block completion.
For Perforce installations with Greptile integration, apply the same rule using the CL's current shelved-revision identity and the Greptile webhook/review artifact tied to it; a Greptile result for an earlier shelf is stale and must block completion.
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 toolsupdated_at to catch bot comments edited in place. Greptile's latest edited summary can contain actionable items even when there are no new inline comments.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 |
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:
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
为Paperclip新增或扩展贯穿真实浏览器、服务器、数据库和runner的端到端评估,整理测试数据、判定条件与证据,并在现有报告中查看操作结果。
为Paperclip Runner添加或扩展行为评估,定义判定条件、执行目标和报告验证数据,利用正常及异常证据验证结果,并保留执行记录与费用。
通过实际浏览器操作网页和应用,检查界面显示与运行情况。结合截图、简单表单填写、错误及网络请求记录,帮助复现问题并确认操作结果。
通过 Paperclip 分配的 AgentMail 收件箱,查看任务关联邮件、发送新邮件或回复,并核查投递结果;重试时保留相同标识,避免重复发送。
根据构想或现有代码仓库,梳理AI智能体的职责、汇报关系与工作交接,生成符合规范的公司或团队文件包,供组织协作和导入Paperclip使用。
将智能体对工具、权限或工作环境的不满,以简短自由文本记录到Paperclip。无需分析原因或提出解决方案,保留当时的直接反应,随后继续原本的任务。