chunk-pr

chunk-pr is a skill for Claude Code from mostafa-drz/claude-skills. It costs 4 tokens per session (3,967 once invoked), scanned A, original, MIT.

A workflow for splitting one large pull request, a proposed set of code changes, into several smaller pull requests.

In plain words
What is it for?
Use it to inspect a branch, suggest logical change groups, choose a base branch, set a target size, and preview or approve the resulting sequence.
Why use it?
Smaller changes are easier to review and merge, while the workflow keeps the user in control of each proposed part and destructive action.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; names the AskUserQuestion tool; positional $N argument.

Good fit Use it to inspect a branch, suggest logical change groups, choose a base branch, set a target size, and preview or approve the resulting sequence.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mostafa-drz/claude-skills/chunk-pr
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.

Any agent
npx skills add mostafa-drz/claude-skills --skill chunk-pr
Clone the repo
git clone --depth 1 https://github.com/mostafa-drz/claude-skills

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 chunk-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/mostafa-drz/claude-skills/chunk-pr/github.svg)](https://agentmods.dev/skills/mostafa-drz/claude-skills/chunk-pr)
Your own site
<a href="https://agentmods.dev/skills/mostafa-drz/claude-skills/chunk-pr"><img src="https://agentmods.dev/badge/skills/mostafa-drz/claude-skills/chunk-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 chunk-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/mostafa-drz/claude-skills/chunk-pr"><img src="https://agentmods.dev/badge/skills/mostafa-drz/claude-skills/chunk-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,967 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.
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.00004 $0.03967
Opus 5 $0.00002 $0.01983
Sonnet 5 $0.00001 $0.00793
Haiku 4.5 $0.00000 $0.00397

Measured 10d ago against content hash 3d41107f583c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

chunk-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 10d 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.

code/chunk-pr/SKILL.md · 308 lines

How it starts

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

Chunk PR

Break one big PR into a sequence of small, logical, merge-safe PRs. Suggest, don't decide — the user approves every chunk and every destructive action.

Preferences

Read ~/.claude/skills/chunk-pr/preferences.md using the Read tool. If not found, no preferences are set.

Context

On startup, use Bash to detect: current branch (git branch --show-current), base upstream, commits ahead, total lines changed (git diff {base}...HEAD --shortstat), and repo (gh repo view --json nameWithOwner -q .nameWithOwner). Skip any that fail. Do NOT run destructive commands at this stage.

Command routing

Check $ARGUMENTS:

  • help → display help then stop
  • config → interactive setup then stop
  • reset → delete ~/.claude/skills/chunk-pr/preferences.md, confirm, stop
  • anything else (including empty) → run the chunking workflow

Flags (parsed from $ARGUMENTS)

  • --base <branch> — override target base (default: auto-detect or preference)
  • --max-lines <N> — target max lines per chunk (default: 400 or preference)
  • --strategy <kind>conservative (more/smaller), balanced (default), aggressive (fewer/larger)
  • --dry-run / --plan-only — stop after presenting the plan; don't create branches or PRs
  • --draft — open chunks as draft PRs (default)
  • --ready — open chunks as ready-for-review (overrides --draft)
  • --no-push — create local branches only, skip push/PR creation
  • --no-linear — skip Linear linking
  • Positional — PR number (e.g. 234), PR URL, branch name, or commit range (main..HEAD). If omitted, use current branch.

Help

Chunk PR — Split a big PR into a sequence of smaller, merge-safe ones

Usage:
  /chunk-pr                                Analyze current branch
  /chunk-pr <pr-number>                    Analyze a specific PR
  /chunk-pr <pr-url>                       Analyze a PR by URL (same or other repo)
  /chunk-pr <branch>                       Analyze a local branch
  /chunk-pr main..HEAD                     Analyze a commit range
  /chunk-pr --max-lines 300                Prefer chunks under 300 lines
  /chunk-pr --strategy conservative        More, smaller chunks
  /chunk-pr --dry-run                      Plan only — don't touch git
  /chunk-pr config                         Set preferences
  /chunk-pr reset                          Clear preferences
  /chunk-pr help                           This help

What it does:
  1. Identify the subject PR / branch / range
  2. Classify commits and files into logical groups
  3. Propose an ordered, dependency-aware split plan
  4. Let you approve, reorder, merge, or re-split chunks
  5. On approval, create branches + draft PRs + Linear links
  6. Leave the parent branch untouched

Current preferences:
  (shown above under Preferences)

Read the full file on GitHub · 308 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 10d ago First seen · 308 lines · 0 tokens per session scan A 3d41107f583c

Subscribe to this mod's changes

chunk-pr is a skill published in the GitHub repository mostafa-drz/claude-skills (4 stars, last pushed 28d ago), licensed MIT. It adds 4 tokens to every session and 3,967 once invoked, about $0.0000 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-31.

Related

Other skills, from other repositories

git-pushing

Stage, commit, and push git changes with conventional commit messages. Use when user wants to commit and push changes, mentions pushing to remote, or asks to save and push their work. Also activates when user says "push changes", "commit and push", "push this", "push to github", or similar git workflow requests.

mhattingpete/claude-skills-marketplace · 70 tokens

iterate

Diverge-converge workflow: spin up N agents on isolated worktrees, each exploring a different approach to the same problem. Compare results side-by-side (with optional preview ports), pick a winner, merge it back. Use when the user says /iterate, 'try multiple approaches', 'explore different directions', or wants to…

SZoloth/skill-pack · 73 tokens

bootstrap-project

Use when setting up a new project with the full opinionated workflow — session memory, commit hooks, copyright headers, ROADMAP, and CLAUDE.md. Invoke with "bootstrap project", "setup project", "new project setup", or /bootstrap-project.

jkm-4314/claude-code-skills · 54 tokens

session-end

Use when the user says "end session", "wrap up", "let's stop here", or invokes /session-end.

jkm-4314/claude-code-skills · 27 tokens

metrics

Computes development quality and velocity metrics from git history and tracks improvement over time. Measures fix ratios, rework hotspots, test coverage, DORA metrics, and code churn.

tinh2/skills-hub-registry · 37 tokens

recall

Reconstructs the development cycle from git history, distills sequential/parallel patterns, and produces actionable insights for improving future iterations. Triggers: recall, retrospective, development analysis, what happened, dev cycle analysis.

tinh2/skills-hub-registry · 46 tokens