# Logical Commits

> Decides how to group, order, and describe working-tree changes as focused commits. Use when splitting mixed changes in a project with no commit conventions of its own.

- Skill: `wkentaro/logical-commits` (Agent Skill)
- Install (CLI): `npx skillmds@latest add wkentaro/logical-commits`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wkentaro/logical-commits/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: wkentaro (https://skillmd.com/u/wkentaro)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/wkentaro/logical-commits

---


# git-hunk logical commits

Plan the entire commit series from the core skill's diff output before changing
the repository, and follow that skill's command workflow.

## Grouping

- Put one intent in each commit: one feature, fix, refactor, test, or formatting
  change.
- Group by intent, not file. Related hunks across files belong together;
  unrelated hunks in one file stay apart.
- Preserve incomplete or unrelated work when the user asks. If intent remains
  genuinely ambiguous after reading the diff, ask instead of guessing.

## Ordering

Each commit must stand alone: the build and tests would pass at every commit,
not only the last. Put prerequisites first: a refactor, rename, or signature
change precedes behavior that depends on it. Keep pure formatting separate.

## Messages

Follow any clear repository convention. Otherwise use a concise message
describing only that commit's change.

