git-commit

Commits Git changes with Conventional Commits messages, splitting unstaged work into logical units.

Updated Jul 4, 2023
One-click install
npx skills add https://github.com/kohdice/dotfiles --skill git-commit-kohdice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/kohdice/dotfiles/tree/main/config/agents/skills/git-commit
Command: npx skills add https://github.com/kohdice/dotfiles --skill git-commit-kohdice

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing consistent, well-scoped Git commit messages and deciding how to group changes into meaningful commits is repetitive and error-prone, especially when the working tree mixes unrelated edits. ## Core Features & Use Cases - Staged-only commits: When files are already staged, commits exactly those contents as a single commit without touching unstaged changes. - Automatic commit splitting: When nothing is staged, analyzes the full diff and untracked files, then splits changes into logical commits ordered by dependency (config, implementation, tests, docs). - Conventional Commits formatting: Generates type(scope): message subjects (feat, fix, refactor, test, style, chore, docs, ci, perf) matched to the repository's recent commit style. - Use Case: After finishing a feature that touched a config file, source code, and tests, ask for a commit and receive three separate, properly ordered Conventional Commits instead of one messy dump. ## Quick Start Ask the assistant to commit my current changes using the git-commit skill.

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I commit only staged files in Git?▼

Run git commit without staging anything new; only the contents already in the index are recorded. This skill inspects git diff --cached first and commits exactly the staged set, never auto-adding unstaged changes.

How to split large Git changes into multiple commits?▼

Group changes by kind (feature, fix, refactor, docs) and by scope or module, then stage and commit each unit separately in dependency order. This skill automates that split by reading the full diff and untracked files before planning the commit sequence.

What is the Conventional Commits format?▼

Conventional Commits uses the pattern type(scope): message, where type is one of feat, fix, refactor, test, style, chore, docs, ci, or perf. The subject stays lowercase, imperative, around 50 characters, with an optional body explaining motivation.

Can this skill push commits to a remote repository?▼

No. The skill never runs any git push variant, even when asked to commit and push. After committing, it asks the user to confirm the push as a separate, explicit action.

What happens when a pre-commit hook fails?▼

The underlying problem is fixed and a new commit is created rather than using --amend, since the failed hook run produced no commit. Hooks are never bypassed with --no-verify or --no-gpg-sign.

Why avoid git add -A when committing changes?▼

git add -A and git add . can unintentionally include secrets, credential files, or large binaries. Staging files explicitly by name prevents accidental inclusion, and detected secrets trigger a warning instead of a commit.