split-pr

A change-planning helper that examines the current Git difference and suggests how to divide a large set of code changes into smaller pull requests.

In plain words
What is it for?
Use it to inspect changed files, commits, and line counts, then propose an atomic pull-request structure for the work.
Why use it?
Smaller, logically grouped pull requests are easier for others to understand and review, especially when one change currently mixes several kinds of work.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/stacklok/toolhive/split-pr
Any agent
npx skills add stacklok/toolhive --skill split-pr
Clone the repo
git clone --depth 1 https://github.com/stacklok/toolhive

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,785 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.01785
Opus 5 $0.00010 $0.00892
Sonnet 5 $0.00004 $0.00357
Haiku 4.5 $0.00002 $0.00178

Measured yesterday against content hash 2dea7c48dbba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

split-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/split-pr/SKILL.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Split Large PR into Smaller Changes

Purpose

Help developers break down large changesets into logical, reviewable pull requests. This skill analyzes the current diff and proposes a splitting strategy that keeps changes atomic and reviewable.

Instructions

1. Analyze Current Changes

Run these commands to understand the scope:

# Get detailed file statistics
git diff main...HEAD --stat

# List all changed files
git diff main...HEAD --name-only

# Show commit history for context
git log main...HEAD --oneline

# Count non-generated files changed
git diff main...HEAD --name-only | grep -v 'vendor/' | grep -v '\.pb\.go$' | grep -v 'zz_generated' | grep -v '^docs/' | wc -l

# Count lines changed (excluding generated code)
git diff main...HEAD --stat -- . ':(exclude)vendor/*' ':(exclude)*.pb.go' ':(exclude)zz_generated*' ':(exclude)docs/*' | tail -1

2. Evaluate Size and Complexity

Assess whether the changes exceed recommended limits:

  • Target limits per PR:
    • < 10 files changed (excluding tests, generated code, docs)
    • < 400 lines of code changed (excluding tests, generated code, docs)
    • Changes represent one logical unit of work

If changes exceed these limits or mix multiple concerns, proceed to split analysis.

3. Identify Logical Groupings

Examine the changed files and identify natural boundaries:

  • By component/package: Group changes by the package or component they affect
  • By layer: Separate model changes, business logic, API changes, CLI changes
  • By concern: Separate refactoring from new features, bug fixes from enhancements
  • By dependency: Identify which changes depend on others

Use these commands to help:

# Group changed files by directory
git diff main...HEAD --name-only | grep -v 'vendor/' | grep -v '\.pb\.go$' | cut -d'/' -f1-2 | sort | uniq -c

# Show changes by package
git diff main...HEAD --name-only | grep '\.go$' | grep -v '_test\.go$' | cut -d'/' -f1-3 | sort | uniq -c

4. Propose Split Strategy

Read the full file on GitHub · 212 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 212 lines · 20 tokens per session scan A 2dea7c48dbba

Subscribe to this mod's changes

split-pr is a skill published in the GitHub repository stacklok/toolhive (2,056 stars, last pushed yesterday), licensed Apache-2.0. It adds 20 tokens to every session and 1,785 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

network-rca

Kubernetes network root cause analysis skill powered by Kubeshark MCP. Use this skill whenever the user wants to investigate past incidents, perform retrospective traffic analysis, take or manage traffic snapshots, extract PCAPs, dissect L7 API calls from historical captures, compare traffic patterns over time, detect…

kubeshark/kubeshark · 163 tokens

kfl

KFL2 (Kubeshark Filter Language) reference. This skill MUST be loaded before writing, constructing, or suggesting any KFL filter expression. KFL is statically typed — incorrect field names or syntax will fail silently or error. Do not guess at KFL syntax without this skill loaded. Trigger on any mention of KFL, CEL…

kubeshark/kubeshark · 203 tokens

security-audit

Kubernetes network security audit skill powered by Kubeshark MCP. Use this skill whenever the user wants to audit a cluster for security threats, detect compromised workloads, find malicious traffic patterns, hunt for indicators of compromise (IOCs), check for data exfiltration, identify C2 (command and control)…

kubeshark/kubeshark · 182 tokens

install

Kubeshark installation and deployment skill. Use this skill whenever the user wants to install Kubeshark, deploy Kubeshark to a Kubernetes cluster, set up Kubeshark, configure Kubeshark helm values, generate a Kubeshark config file, customize Kubeshark deployment, troubleshoot Kubeshark installation, upgrade…

kubeshark/kubeshark · 257 tokens

qa-find-bugs

Drive the live product at https://dashboard.bex.co as a signed-in QA user (QAEMAIL / QAPASSWORD from .env), hunt real bugs across the hosting features, research each fix down to file:line, file the non-duplicate findings to the w6 board through /pm, and /ship the scheduled milestone. Use when the user asks to QA the…

bex-co/bex · 96 tokens

pm

Inspect and maintain the repository's .pm workstreams, inbox notes, milestones, and tasks. Use when the user asks for PM board status or requests a supported board mutation such as creating, promoting, adding, or completing work.

bex-co/bex · 48 tokens