git-commit-user

Analyze Git diffs and stage hunks to organize changes into logical commits.

Updated Nov 16, 2022
One-click install
npx skills add https://github.com/kos3nz/dotfiles --skill git-commit-user
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit-user
Source: https://github.com/kos3nz/dotfiles/tree/main/.config/agents/skills/git-commit-user
Command: npx skills add https://github.com/kos3nz/dotfiles --skill git-commit-user

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Intelligently manage Git commits by determining the right granularity: a single commit when changes are cohesive or multiple commits when changes span distinct concerns.

Core Features & Use Cases

  • Hunk-level staging: stage only the relevant hunks to create precise commits.
  • Automatic commit granularity: analyzes diffs and decides between one or many commits.
  • Soft-reset decomposition: when asked to decompose a past commit or range, softly reset to bring changes back into the working tree for regrouping.
  • Focused workflows: supports prompts like "decompose the last commit" or "split these changes into commits" to organize history cleanly.

Quick Start

Ask me to organize your current changes into logical commits and I will analyze the diff, stage appropriate hunks, and commit with proper granularity.

Frequently Asked Questions about git-commit-user

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

FAQPage Schema
How do I split unstaged Git changes into multiple logical commits?

To split unstaged Git changes into multiple logical commits, the Skill analyzes your working tree diffs and stages relevant hunks individually to create precise, separate commits based on logical concerns.

What is hunk-level staging in Git and when should I use it?

Hunk-level staging in Git allows you to stage specific portions of a modified file rather than the entire file. You should use it when changes span distinct concerns and require precise, isolated commit granularity.

How do I decompose a past Git commit into smaller commits?

To decompose a past Git commit, the Skill performs a soft-reset to bring the committed changes back into the working tree, then analyzes the diffs to regroup and stage the hunks into multiple smaller logical commits.

Does this commit organization workflow support both staged and unstaged changes?

Yes, this commit organization workflow supports both staged and unstaged changes by evaluating your current Git status and applying deterministic decision logic to determine the correct commit granularity.

What's the best way to organize a mixed Git diff into cohesive commit units?

The best way to organize a mixed Git diff into cohesive units is to use automated diff-analysis that evaluates change cohesion, stages appropriate hunks, and determines whether to apply a single commit or multiple commits.