git-commit

Creates git commits with convention-following messages from working tree changes.

Updated May 11, 2026
One-click install
npx skills add https://github.com/mmnavarr/harness --skill git-commit-mmnavarr
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/mmnavarr/harness/tree/main/skills/git-commit
Command: npx skills add https://github.com/mmnavarr/harness --skill git-commit-mmnavarr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing clear, consistent commit messages is tedious and often skipped, leaving repositories with vague history that is hard to review or revert. This Skill automates the full commit workflow, from inspecting changes to producing well-structured messages that match repository conventions. ## Core Features & Use Cases - Context-aware commits: Inspects git status, diffs, branch state, and recent history before committing, and stops cleanly when there is nothing to commit. - Convention detection: Follows project instructions, infers patterns from recent commit history, or falls back to conventional commit format (feat, fix, docs, refactor, and more). - Logical commit splitting: Groups changed files into separate commits when they represent distinct concerns, without splitting hunks within files. - Safety guardrails: Warns before committing directly to main or the default branch, handles detached HEAD states, and stages specific files to avoid leaking sensitive files like .env. - Use Case: After finishing a feature and an unrelated bug fix in one session, ask to commit your changes and receive two separate, properly formatted commits with messages matching your repo's style. ## Quick Start Ask the assistant to commit my current changes with a clear message following the repository's commit conventions.

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I write a good git commit message automatically?▼

This Skill inspects your changes, recent commit history, and project instructions to generate a message matching your repo's conventions. If no pattern exists, it defaults to conventional commit format like type(scope): description with an optional explanatory body.

How to split unrelated changes into separate git commits?▼

The Skill scans changed files for naturally distinct concerns and groups them at the file level into separate commits. It avoids splitting hunks within a file and keeps splitting lightweight, typically two or three logical commits.

Can I commit changes while in a detached HEAD state?▼

Yes, but the Skill first warns you and asks whether to create a feature branch so the work is attached to a branch. If you decline, it proceeds with the detached HEAD commit.

What happens if I try to commit directly on the main branch?▼

The Skill detects when the current branch is main, master, or the remote default branch and asks whether to continue or create a feature branch first. It uses the platform's blocking question tool to get your decision before committing.

Does git add -A risk committing sensitive files like .env?▼

Yes, staging everything can include credentials or unrelated changes. This Skill stages specific files by name instead of using git add -A or git add . to avoid accidentally committing sensitive files.