toolhive: Skill for Claude Code

.claude/skills/split-pr/SKILL.md

split-pr is a skill for Claude Code from stacklok/toolhive. It costs 20 tokens per session (1,785 once invoked), scanned A, original, Apache-2.0.

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 Code

Written for Claude Code: installed under .claude/.

This is stacklok/toolhive's own configuration. It tells Claude Code how to work on toolhive itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything toolhive configures →

About the project

ToolHive is a platform for running and managing Model Context Protocol servers, which give AI clients access to tools and data. Developers, platform teams, and enterprises use it to isolate MCP servers, control access, and monitor their operation. The catalogue entries provide agent workflows and configuration for operating ToolHive and its MCP servers.

stacklok/toolhive · 2,307 stars · on GitHub · stacklok.com

Reuse

Borrowing it

Nothing to install: this file belongs to stacklok/toolhive. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/stacklok/toolhive/main/.claude/skills/split-pr/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/stacklok/toolhive

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for split-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/stacklok/toolhive/split-pr/github.svg)](https://agentmods.dev/skills/stacklok/toolhive/split-pr)
Your own site
<a href="https://agentmods.dev/skills/stacklok/toolhive/split-pr"><img src="https://agentmods.dev/badge/skills/stacklok/toolhive/split-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for split-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/stacklok/toolhive/split-pr"><img src="https://agentmods.dev/badge/skills/stacklok/toolhive/split-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00020 $0.01785
Opus 5.5 $0.00008 $0.00714
Sonnet 5.5 $0.00004 $0.00357
Haiku 4.5 $0.00002 $0.00178

Measured 1mo ago against content hash 2dea7c48dbba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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. 1mo ago 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,307 stars, last pushed today), licensed Apache-2.0. It adds 20 tokens to every session and 1,785 once invoked, about $0.0001 per session on Opus 5.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

clinical-trial-protocol-skill

Generate clinical trial protocols for medical devices or drugs. This skill should be used when users say "Create a clinical trial protocol", "Generate protocol for [device/drug]", "Help me design a clinical study", "Research similar trials for [intervention]", or when developing FDA submission documentation for…

Agent-Threat-Rule/agent-threat-rules · 70 tokens

claude-d3js-skill

This skill provides guidance for creating sophisticated, interactive data visualisations using d3.js.

Agent-Threat-Rule/agent-threat-rules · 25 tokens

adr-skill

Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses…

Agent-Threat-Rule/agent-threat-rules · 89 tokens

terraform-skill

Terraform infrastructure as code best practices.

Agent-Threat-Rule/agent-threat-rules · 10 tokens

create-auth-skill

Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.

Agent-Threat-Rule/agent-threat-rules · 66 tokens

prior-auth-review-skill

Automate payer review of prior authorization (PA) requests. This skill should be used when users say "Review this PA request", "Process prior authorization for [procedure]", "Assess medical necessity", "Generate PA decision", or when processing clinical documentation for coverage policy validation and authorization…

Agent-Threat-Rule/agent-threat-rules · 63 tokens