split-pr

A command for breaking one large pull request—a proposed set of code changes—into smaller, focused pull requests. TDD means writing tests alongside each feature, while skeleton review means reviewing the basic structure before filling in all details.

In plain words
What is it for?
Use it when a pull request is too large, starting with a basic implementation and then adding complete features in independently useful steps.
Why use it?
Smaller changes are easier to review, and including tests with each feature makes their behavior clearer and safer to check.

Command for Claude Code

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 commands/liam-hq/liam/split-pr
Clone the repo
git clone --depth 1 https://github.com/liam-hq/liam

Made for: Claude Code.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 619 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.00018 $0.00619
Opus 5 $0.00009 $0.00309
Sonnet 5 $0.00004 $0.00124
Haiku 4.5 $0.00002 $0.00062

Measured 2d ago against content hash 18eb8017843f, 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 2d 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/commands/split-pr.md · 101 lines

How it starts

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

Task

Split the current large pull request into smaller, manageable PRs following t-wada's TDD practices and skeleton review methodology.

Core Principles

1. Skeleton Review Approach

Reference: https://note.com/knowledgework/n/n50fc54509dd5

First PR should be a skeleton implementation to enable early design feedback.

2. TDD Practice (t-wada style)

Follow t-wada's TDD practice: Each PR must contain both feature and test code together.

3. PR Size Constraints

  • Hard limit: 300 lines maximum
  • Target range: 100-200 lines (ideal)
  • Scope: Both implementation and test code count toward the limit

PR Structure

First PR: Skeleton Implementation

Purpose: Enable skeleton review for early architectural feedback
Contents:
- Core interfaces and contracts
- Basic class/module structure  
- Minimal implementation proving the approach
- Basic tests validating structure
- Clear TODOs for subsequent features

Subsequent PRs: Feature Increments

Purpose: Add one small, complete feature
Contents:
- Single feature implementation
- Comprehensive tests for that feature
- Updates to skeleton if needed
- Each PR independently valuable

PR Chaining Strategy

PR1 (Skeleton) → main branch
PR2 (Feature A) → PR1's branch
PR3 (Feature B) → PR2's branch
...continues as needed

Execution Process

Phase 1: Analysis

  1. Review all current changes
  2. Identify core abstractions and interfaces
  3. Map features to logical units
  4. Estimate line counts per unit

Phase 2: Planning

  1. Design skeleton structure

    • What interfaces are needed?
    • What's the minimal viable structure?
    • Which design patterns to showcase?
  2. Plan feature PRs

    • One feature = one PR
    • Each with complete test coverage
    • Dependencies between features
    • Expected 100-200 lines each

Phase 3: User Approval

Present a detailed split plan showing:

  • Skeleton PR contents and purpose
  • Each feature PR with:
    • Feature description
    • Test approach
    • Estimated line count
    • Dependencies

Read the full file on GitHub · 101 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. 2d ago First seen · 101 lines · 18 tokens per session scan A 18eb8017843f

Subscribe to this mod's changes

split-pr is a command published in the GitHub repository liam-hq/liam (5,100 stars, last pushed 4d ago), licensed Apache-2.0. It adds 18 tokens to every session and 619 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.