Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

pr-validate公关验证

Agent Skill

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

总安装

9,204

周安装

376

GitHub Stars

318

下载量

2,948
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/boshu2/agentops --skill pr-validate

简介

pr-validate 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 适用于验证 PR 是否符合项目规范、检查提交格式与依赖变更合法性。
  • 支持调用静态分析工具与规则引擎,输出结构化校验报告。
  • 安装前需确认对目标仓库的读取权限,注意是否会触发网络请求或执行外部命令。
  • 建议在使用前核对宿主环境兼容性,避免在不支持的系统中运行。

SKILL.md

PR Validate Skill

PR-specific validation that ensures changes are clean, focused, and ready.

Overview

Validates a PR branch for submission readiness by checking isolation, upstream alignment, scope containment, and quality gates.

Input: Branch name (default: current branch)

When to Use:

  • Before running $pr-prep
  • After $pr-implement completes
  • When suspicious of scope creep

Workflow

1.  Branch Discovery     -> Identify branch and upstream
2.  Upstream Alignment   -> FIRST: Check rebase status (BLOCKING)
3.  CONTRIBUTING.md      -> Verify compliance (BLOCKING)
4.  Isolation Check      -> Single type, thematic files
5.  Scope Check          -> Verify changes match intended scope
6.  Quality Gate         -> Tests, linting (non-blocking)
7.  Report Generation    -> Summary with pass/fail

Phase 2: Upstream Alignment (BLOCKING - CHECK FIRST)

# Fetch latest upstream
git fetch origin main

# How many commits behind?
BEHIND=$(git rev-list --count HEAD..origin/main)
echo "Behind upstream: $BEHIND commits"
CheckPass Criteria
Minimal divergence< 20 commits behind
No conflictsMerge/rebase would succeed

Phase 4: Isolation Check (BLOCKING)

# Commit type analysis
git log --oneline main..HEAD | sed 's/^[^ ]* //' | grep -oE '^[a-z]+(\([^)]+\))?:' | sort -u

# File theme analysis
git diff --name-only main..HEAD | cut -d'/' -f1-2 | sort -u
CheckPass Criteria
Single commit typeAll commits share same prefix
Thematic filesAll changed files relate to PR scope
Atomic scopeCan explain in one sentence

Phase 5: Scope Check

# Infer scope from commit messages
SCOPE=$(git log --format="%s" main..HEAD | grep -oE '\([^)]+\)' | sort -u | head -1)

# All files should be within expected scope
git diff --name-only main..HEAD | grep -v "$SCOPE"

Report Generation

Pass Output

PR Validation: PASS

Branch: feature/suggest-validation (5 commits)
Upstream: main (in sync)

Checks:
  [OK] Isolation: Single type (refactor)
  [OK] Upstream: 0 commits behind
  [OK] Scope: 100% in internal/suggest/
  [OK] Quality: Tests pass

Ready for $pr-prep

Fail Output

PR Validation: BLOCKED

Checks:
  [FAIL] Isolation: Mixed types (refactor, fix, docs)
  [WARN] Upstream: 15 commits behind

Resolutions:
1. ISOLATION: Split branch by commit type
   git checkout main && git checkout -b refactor/suggest
   git cherry-pick <refactor-commits>

Run $pr-validate again after resolution.

Resolution Actions

Mixed Commit Types

# Cherry-pick to clean branch
git checkout main
git checkout -b ${BRANCH}-clean
git cherry-pick <relevant-commits-only>

Upstream Divergence

# Rebase on latest upstream
git fetch origin main
git rebase origin/main

Anti-Patterns

DON'TDO INSTEAD
Analyze stale branchCheck upstream FIRST
Skip validationRun before $pr-prep
Ignore scope creepExtract unrelated changes
Mix fix and refactorSeparate PRs by type

Examples

Validate PR Before Submission

User says: "Validate this PR branch for isolation and scope creep."

What happens:

  1. Check upstream alignment and branch freshness.
  2. Detect scope creep and unrelated file changes.
  3. Output remediation steps and pass/fail status.

Pre-Prep Gate

User says: "Run PR validation before I run $pr-prep."

What happens:

  1. Execute isolation and scope checks.
  2. Confirm quality gate readiness.
  3. Return a go/no-go recommendation.

Troubleshooting

ProblemCauseSolution
Validation reports stale branchUpstream advancedRebase/merge from upstream then rerun
Scope creep detectedExtra files or mixed objectivesSplit unrelated changes into follow-up PR
Alignment check failsBranch diverged from target expectationsReconcile base branch and acceptance criteria
Output unclearFindings not prioritizedSort findings by blocker vs non-blocker severity

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

39.3%
按下载量换算1,159

Claude

28.09%
按下载量换算828

Cursor

19.12%
按下载量换算564

Gemini CLI

8.91%
按下载量换算263

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills