Token导航 LogoToken导航

Agent Skill · 开发

pr-split(公关分裂)

pr-split 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

pr-split 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 14,674。

总安装 674周安装 27GitHub Stars 450下载 218核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ag-grid/ag-charts --skill pr-split

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

pr-split 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。适用于将大型 PR 拆分为独立模块、隔离变更范围以简化审查与测试流程。

通过分析 diff 内容自动识别可拆分单元,支持生成多个子 PR 或分支建议。安装前需确认对目标仓库的分支与推送权限,注意是否会触发 git 操作。建议在使用前查阅原始 README 了解拆分策略与边界条件。

来源仓库内路径:skills/pr-split

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/ag-grid/ag-charts --skill pr-split;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

pr-split 怎么安装?

在终端执行 npx skills add https://github.com/ag-grid/ag-charts --skill pr-split。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

pr-split 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

pr-split 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

pr-split 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

pr-split 用的人多吗?

公开数据是累计安装 674 次,近一周安装 27 次,下载 218 次,GitHub 450 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

pr-split 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
pr-split

公关分裂 · 本页

674450只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

PR Split Instructions

Intent

Transform a large branch into a sequence of small, high-quality PRs that:

  • Each do ONE thing well
  • Are easy to review (500-1000 lines ideal)
  • Tell a coherent story in sequence
  • Pass all quality checks
  • Have clear, descriptive commit messages that explain WHY

The goal is reviewer experience, not mechanical splitting. Each PR should be something you'd be proud to send for review.

Help

If the user provides a command option of help:

  • Explain how to use this prompt.
  • Explain if they are missing any prerequisites or tooling requirements.
  • DO NOT proceed, exit the prompt immediately after these steps.

Phase 0: Prerequisites

Tooling Requirements

  • Git CLI must be available
  • GitHub CLI (gh) must be available and authenticated
  • Working tree must be clean (no uncommitted changes)
  • Must be on a feature branch, not the main branch

Verification

Verify the working tree is clean, not on main branch, and gh CLI is authenticated before proceeding.

Identify Base Branch

Determine the correct base branch — do not assume latest. The user's branch may have been created from a release branch. Run the shared detection script:

bash .rulesync/skills/git-conventions/detect-base-branch.sh

This iterates all origin/bX.Y.Z release branches (newest version first), compares merge-base distances, and prints BASE_BRANCH=<branch>. If a release branch is closer than origin/latest, it is selected. Otherwise latest is used. Store as BASE_BRANCH and use it everywhere this skill references the base branch.

Extract JIRA Ticket or Branch Prefix

Determine the commit message prefix from the branch name:

  1. Detect the project from the repo name (enclosing directory): Repo Branch Pattern JIRA Prefix ag-studio st-NNNNN/description ST- ag-charts ag-NNNNN/description AG- ag-grid ag-NNNNN/description AG- *(default)* ag-NNNNN/description AG-
  2. If branch matches the project's pattern: extract JIRA ticket (e.g., ST-12345, AG-12345)
  3. Otherwise: derive prefix from branch name (e.g., feature/null-keys becomes null-keys)

Store this prefix for use in commit messages and PR titles.

Phase 1: Understand the Changes

Use a sub-agent (type: Explore) to deeply analyse the changes:

1.1 Gather Information

  • Get the full diff against {BASE_BRANCH}
  • Review all commit messages and their content
  • Understand the scope: files changed, lines added/removed, packages touched

1.2 Analyse for Logical Units

Focus on content and purpose, not commit boundaries. Identify:

  • Distinct features or concerns: What separate things does this branch accomplish?
  • Logical dependencies: What must be merged first for later changes to make sense?
  • Natural boundaries: Package boundaries, code vs tests vs docs, refactoring vs features
  • Reviewer cognitive load: What groupings would be easiest to understand in isolation?

Key questions to answer:

  • Could a reviewer understand each proposed PR without seeing the others?
  • Does each PR have a single, clear purpose?
  • Are dependencies between PRs clear and minimal?

Phase 2: Design the Split

2.1 Present Split Options

After analysis, use AskUserQuestion to present 2-3 concrete split proposals based on content analysis:

Option types to consider:

  1. By logical unit (recommended default) - Group changes by feature or concern
  2. By package/module - Split across codebase boundaries (core, then community, then enterprise)
  3. Custom - User specifies split points

Guidelines:

  • Each option should include the number of PRs and what goes in each
  • Options must be based on actual content analysis, not commit preservation
  • Prioritize options that create coherent, reviewable units
  • Target 500-1000 lines per PR for optimal reviewability

Do NOT offer "By commit" splitting. If commits are already well-structured, the user can trivially do this themselves. The value of this command is reorganising changes into logical, reviewable units.

2.2 Handle User Choice

If user selects a pre-defined option: Proceed with that strategy.

If user selects "Custom": Ask for details on how many PRs and what goes in each.

2.3 Confirm the Split Plan

Present the detailed plan for confirmation:

## Proposed Split Plan

### PR 1: [Title]
- Purpose: [what this PR accomplishes]
- Files: [list or patterns]
- Lines: ~XXX

### PR 2: [Title]
- Purpose: [what this PR accomplishes]
- Files: [list or patterns]
- Lines: ~XXX
- Depends on: PR 1

[etc.]

Use AskUserQuestion to confirm before proceeding.

2.4 Validate the Plan

Run the /plan-review skill to check for completeness and correctness.

Phase 3: Execute the Split

3.1 Prepare a Clean Starting Point

Create a temporary branch that holds all changes as staged files:

  1. Record the current branch name
  2. Create a temporary branch from the current HEAD
  3. Soft reset to the merge base with {BASE_BRANCH} (converts all commits to staged changes)

3.2 Create PR Branches

For each PR in the plan:

First PR:

  • Branch from {BASE_BRANCH}
  • Bring in the relevant files from the temporary branch
  • Use git checkout <temp-branch> -- <files> for clean file extraction
  • Use git add -p for partial file staging when needed

Subsequent PRs:

  • Branch from the previous PR's branch
  • Bring in the next set of files
  • Maintain the dependency chain

3.3 Commit Message Quality

Each commit message must:

  • Start with the JIRA ticket or branch prefix
  • Use imperative mood ("Add", "Fix", "Refactor")
  • Explain WHAT changed and WHY (not just what files)
  • Be concise but complete
  • No LLM attribution or emoji

Good example:

AG-12345 Add null category handling for bar series

Previously, null categories caused bars to render at position 0.
Now they are filtered out during data processing, matching the
behaviour of line and area series.

Bad example:

AG-12345 Update files

3.4 Cleanup

After creating all PR branches:

  • Delete the temporary branch
  • Verify no uncommitted changes remain

Phase 4: Quality Iteration (CRITICAL)

This phase is essential. Each PR must be polished until reviewer-ready, not just "builds".

4.1 For Each PR Branch (in order)

  1. Rebase onto base

- First PR: rebase onto {BASE_BRANCH} - Subsequent PRs: rebase onto previous PR branch

  1. Run /pr-review (via sub-agent)

- Identify code quality issues - Check for logical coherence - Assess scope appropriateness

  1. Assess Logical Coherence

- Does this PR do ONE thing well? - Would a reviewer understand this in isolation? - Is the scope appropriate (500-1000 lines)? - Is anything missing that should be included? - Is anything included that belongs in a different PR?

  1. Assess Presentation Quality

- Is the commit message clear and descriptive? - Does it explain WHY, not just WHAT? - Would the PR title make sense in a changelog?

  1. Run Build Validation

- Run the project's pre-commit validation commands against each affected package - Ensure type checking, linting, and tests all pass before proceeding

  1. Fix Issues

- Code quality issues: fix and amend or add fixup commits - Commit message issues: git commit --amend to improve - Scope issues: consider re-splitting if the scope is wrong - Use code-fixup skill for complex fixes

  1. Iterate Until High Quality

- Repeat steps 2-6 until the PR is reviewer-ready - "Reviewer-ready" means: builds, tests pass, logical scope, clear purpose, good commit message - Ask yourself: "Would I be proud to send this for review?"

4.2 Quality Checklist

Before proceeding to create PRs, verify each branch meets these criteria:

  • Single, clear purpose
  • Appropriate scope (ideally 500-1000 lines)
  • Commit message explains the change and its motivation
  • All builds and tests pass
  • A reviewer could understand this PR in isolation
  • No obvious issues flagged by /pr-review

Phase 5: Create PRs and Push

5.1 Push Branches

Push each branch with upstream tracking:

git push -u origin "${branch_name}"

5.2 Create Draft PRs

For each branch, create a draft PR using gh pr create:

  • First PR targets {BASE_BRANCH}
  • Subsequent PRs target the previous PR's branch

PR Description Template:

## Summary

[Brief description of what this PR accomplishes and why]

## Position in Stack

PR N of M in the series.

**Previous PR:** #<number> (if applicable)
**Next PR:** #<number> (if applicable)

## JIRA

Jira: [TICKET-12345](https://jira.example.com/browse/TICKET-12345)

## Test Plan

- [ ] Unit tests pass
- [ ] Build succeeds
- [ ] Lint passes

Phase 6: Report Results

Output a summary of the created PRs:

# PR Split Complete

## Summary

Split `{original_branch}` into {N} stacked PRs.

## PR Chain

| # | Branch | PR | Description | Base |
|---|--------|-----|-------------|------|
| 1 | {branch-part-1} | #{pr1} | {desc1} | {BASE_BRANCH} |
| 2 | {branch-part-2} | #{pr2} | {desc2} | {branch-part-1} |
| ... | ... | ... | ... | ... |

## Dependency Diagram

{BASE_BRANCH} └── {branch-part-1} (PR #{pr1}) └── {branch-part-2} (PR #{pr2}) └── {branch-part-3} (PR #{pr3})

## Reviewer Instructions

1. Review PRs in order (1, 2, 3, ...)
2. Each PR shows only its incremental changes
3. To see cumulative changes up to PR N, compare `{branch-part-N}` to `{BASE_BRANCH}`
4. Approve and merge in order; later PRs will auto-update their base

Error Handling

Dirty Working Tree

  • Inform the user they need to commit or stash changes
  • Provide the command: git stash or git commit -am "WIP"
  • Exit without making changes

Merge Conflicts During Rebase

  • Pause and show the conflicts to the user
  • Ask if they want to resolve manually or abort
  • Do not attempt automatic conflict resolution

Build/Lint/Test Failures

  • Attempt to fix using code-fixup skill
  • If fixes fail after 2 attempts, ask the user for guidance
  • Do not push branches with known failures

GitHub CLI Failures

  • Provide manual instructions for creating the PR via GitHub web UI
  • Include the branch name, base branch, and suggested title/body

Sub-Agent Usage Summary

PhaseSub-Agent TypePurpose
1ExploreAnalyse code changes and identify logical groupings
2plan-review (skill)Validate the split plan
4general-purposeRun /pr-review for each branch
4code-fixup (skill)Fix build/lint/test issues

平台分布

Codex

33.26%
按下载量换算73

Claude

30.74%
按下载量换算67

Cursor

20.15%
按下载量换算44

Gemini CLI

8.91%
按下载量换算19

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

继续浏览同类 Skills