logical-commit

Create logically atomic git commits by staging individual diff hunks with conventional commit messages.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/tsmes/conaro --skill logical-commit-tsmes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: logical-commit
Source: https://github.com/tsmes/conaro/tree/main/.claude/skills/logical-commit
Command: npx skills add https://github.com/tsmes/conaro --skill logical-commit-tsmes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Unstaged changes often mix multiple unrelated modifications across files, making it hard to produce clean, reviewable commit history. This Skill analyzes your working tree, groups changes by logical purpose, and stages them hunk-by-hunk so each commit is independently revertible. ## Core Features & Use Cases - Hunk-level staging: Uses the bundled extract-hunks.sh script to list and extract individual diff hunks, applying them to the staging area one at a time with git apply --cached. - Logical grouping: Groups changes by feature or purpose rather than by file, separating refactors, bug fixes, and new features into distinct commits. - Conventional commit messages: Generates properly formatted messages using prefixes like feat, fix, refactor, perf, docs, and test. - Use Case: You modified install.js with four unrelated changes (config addition, error handling, file tracking, cleanup refactor). The Skill lists the hunks, stages the two related to file tracking together, commits them, then repeats for the remaining groups. ## Quick Start Ask the assistant to analyze my current unstaged git changes and split them into logical atomic commits using the logical-commit skill.

Frequently Asked Questions about logical-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split unstaged git changes into multiple commits?▼

List the hunks in each modified file with extract-hunks.sh, then stage individual hunks using git apply --cached and commit each logical group separately. Hunks renumber after each staging, so list again before extracting the next one.

How do I stage only part of a file in git?▼

Extract a single hunk from the file's diff and pipe it to git apply --cached, which stages only that change without modifying the working directory. Repeat for additional hunks belonging to the same logical commit.

What is a logically atomic commit?▼

A logically atomic commit is the smallest meaningful change that adds value while remaining manageable, grouped by purpose rather than by file. Each commit should be independently revertible without breaking the codebase.

Does staging hunks with git apply --cached modify my working files?▼

No, git apply --cached only updates the staging area and leaves working directory files untouched. After staging, git diff shows the remaining unstaged changes with renumbered hunks.

What commit message format does conventional commits use?▼

Conventional commits use a type prefix like feat, fix, refactor, perf, docs, test, or chore, followed by a concise description. An optional body explains why and what changed, and a footer can note breaking changes or issue references.