Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

check-pr检查公关

Agent Skill

check-pr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,376

周安装

101

GitHub Stars

89

下载量

832
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:check-pr(检查公关)
来源仓库:https://github.com/greptileai/skills
仓库路径:skills/check-pr
安装命令:
npx skills add https://github.com/greptileai/skills --skill check-pr
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/greptileai/skills --skill check-pr

简介

用于拉取请求审查,check-pr 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 支持 GitHub、适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • GitLab 和 Perforce 平台。
  • 可分析评论、状态检查和描述完整性并提供改进建议。
  • 自动检测当前分支或默认变更列表作为审查目标。

SKILL.md

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
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.

1. Identify the PR/MR/CL

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:

  • GitHub: number, headRefName, headRefOid
  • GitLab: iid, source_branch, sha
  • Perforce: changelist number (CL), shelved files 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

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 number
  • Status: pending, submitted, shelved
  • Description: the CL description / commit message
  • Files: 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 review or external review tools

D. General Comments

  • Discussion comments on the PR/MR
  • 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:

CategoryMeaning
ActionableCode changes, test improvements, or fixes needed
InformationalVerification notes, questions, or FYIs that don't require changes
Already addressedIssues that appear to be resolved by subsequent commits

6. Report findings

Present a summary table:

AreaIssueStatusAction Needed
Status ChecksCI build failingFailingFix type error in src/api.ts
Review"Add null check" — @reviewerActionableAdd guard clause
DescriptionTODO placeholder in test planActionableFill in test plan
Review"Looks good" — @teammateInformationalNone

7. Fix issues (if requested)

If there are actionable items:

  1. Switch to the PR/MR's branch (git) or ensure files are open in the correct CL (Perforce) if not already.
  2. Ask the user if they want to fix the issues.
  3. If yes, make the fixes, then:

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>

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=true

Repeat 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 -l

Output 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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.34%
按下载量换算311

Claude

33.06%
按下载量换算275

Cursor

17.42%
按下载量换算145

Gemini CLI

8.82%
按下载量换算73

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills