commit-split

A workflow for dividing uncommitted code changes into several small, focused Git commits. Git commits are saved checkpoints for tracking and reviewing changes.

In plain words
What is it for?
Use it to group changes by purpose, stage complete files or individual parts of files, and create commits that follow the repository’s existing message style.
Why use it?
It removes the need to sort a large pile of edits by hand. It also checks that the split did not change any code.

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/2ykwang/agent-skills/commit-split
Any agent
npx skills add 2ykwang/agent-skills --skill commit-split
Clone the repo
git clone --depth 1 https://github.com/2ykwang/agent-skills

Made for: Claude Code, Codex.

Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,536 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00140 $0.01536
Opus 5 $0.00070 $0.00768
Sonnet 5 $0.00028 $0.00307
Haiku 4.5 $0.00014 $0.00154

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

Security

Grade A, and why

commit-split 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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/stage_hunks.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

This is a copy

100% identical to commit-split — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/commit-split/SKILL.md · 132 lines

How it starts

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

commit-split

Split uncommitted changes into atomic, reviewable commits. Two things matter: the user shouldn't have to classify contexts by hand (analysis and proposal are this skill's job), and the result must be verifiable (prove not a single byte of code differs before and after the split).

Flow: read state → analyze changes → propose a plan → user confirms → execute → verify losslessness. Don't ask the user to classify anything before proposing. Analyze first, present a plan, let the user adjust it.

Step 0. Read state

git status --porcelain      # change list; staged/unstaged/untracked
git branch --show-current
git log --oneline -20       # learn the commit message convention
git rev-parse HEAD          # record the starting point (used for verification)
git diff HEAD | git patch-id --stable   # fingerprint of the original change (used for lossless verification)

Stop on: merge/rebase in progress, or conflicted files. Report the state and halt.

Watch out for:

  • Changes already staged — tell the user. The split can't preserve the existing staging, so get agreement on "unstage everything and re-split the whole thing", then run git restore --staged ..
  • Untracked files — include them in the plan table but mark them separately. If they look like build junk (logs, scratch files), suggest excluding them from the commits.

Step 1. Analyze changes

Read the full git diff HEAD and the contents of untracked files, then identify logical units. Don't group by filename — you have to read the diff to spot "two contexts mixed in one file", and spotting that is the whole reason this skill exists.

Grouping rules, in priority order:

  1. Things that break apart — a new function and its call sites, a signature change and its callers, an implementation and its tests go in one commit
  2. Different intent, different commit — feature / bugfix / refactor / config / docs are separate
  3. Different domain, different commit — unrelated modules stay apart even when the intent matches

Read the full file on GitHub · 132 lines

Files

What ships with it

3 files 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. 2d ago First seen · 132 lines · 140 tokens per session scan A e1fca1d5e248

Subscribe to this mod's changes

commit-split is a skill published in the GitHub repository 2ykwang/agent-skills (18 stars, last pushed 28d ago), licensed MIT. It adds 140 tokens to every session and 1,536 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to commit-split, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

command-development

This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash…

mahmoud20138/Tradecraft · 99 tokens

to-issues

Decompose a PRD and/or SPEC into implementable, vertically-sliced Issues with real blocking edges, then create them in your chosen platform (GitHub or Local). Use after /prd (and optionally /prd-to-spec) to turn requirements into agent-ready tickets. Triggers on: create issues, to-issues, 创建issue, 拆解issue, 生成卡片, 创建卡片…

smallnest/goal-workflow · 96 tokens

listenhub-tts

使用 ListenHub API 将文本转换为语音(TTS)。支持三种模式:快速合成(/v1/tts)、 多角色脚本(/v1/speech)、长文本流式合成(/v1/flow-speech/episodes)。 音色未指定时自动获取音色列表供用户选择,默认使用 chat-girl-105-cn(晓曼)。 Use when user says: "tts", "text to speech", "语音合成", "文字转语音", "朗读", "生成语音", "生成音频", "转音频", "text to audio".

smallnest/goal-workflow · 138 tokens

article-icons

Illustrate an article (Markdown, HTML, etc.) with animated-style icons from itshover.com/icons. Fetches icons as clean inline SVG and places them at section headings, key concepts, lists, and callouts. Triggers on: /article-icons, 配图, 给文章配图标, add icons to article, illustrate with icons.

smallnest/goal-workflow · 74 tokens

ship-it

Code commit, PR creation, merge, and issue closure workflow via GitHub CLI (gh). Triggers after a goal (GitHub Issue) implementation is complete — commit code, push branch, create PR, merge, then close the issue. Use when the user says "提交代码", "commit and merge", "创建PR", "合入", "关闭issue", "ship-it", or when a goal…

smallnest/goal-workflow · 96 tokens

coding-worktree-recovery

Use this skill when coding-agent work is interrupted, an agent exits without a clean commit, multiple controllers target the same checkout, or the checkout produces inconsistent file/Git behavior.

AtlasOmnia/hermes-custom-pack · 56 tokens