git-commit

Create atomic git commits with branch validation and optional lint and test checks.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/glhewett/public-skills --skill git-commit-glhewett
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/glhewett/public-skills/tree/main/git-commit
Command: npx skills add https://github.com/glhewett/public-skills --skill git-commit-glhewett

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers create focused, accurate git commits by validating branch context, running lint and test checks when available, and preventing unrelated files from being included in a commit.

Core Features & Use Cases

  • Branch safety checks: Verifies you are not on main or develop before allowing a commit to proceed.
  • Validation and selective committing: Runs lint and test scripts if present and halts when unrelated files are detected to avoid mixed-change commits.
  • Optional push workflow: Commits all related files with a complete message and optionally pushes to the remote, useful when preparing a feature branch for review or staging.

Quick Start

Use the git-commit skill to run validations, create a descriptive commit for the current feature changes, and push the commit by enabling the push-commit option.

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I create atomic git commits for focused changes?

To create atomic git commits, this skill validates your branch context, runs optional lint and test checks, and prevents unrelated files from being included. It commits only related files with a complete message to keep your feature branch workflow organized.

How do I prevent accidental commits to main or develop branches?

To prevent accidental commits to main or develop branches, this skill performs branch safety checks. It verifies your current branch context and halts the commit process if you are on a protected branch before any changes are applied.

Can I run lint and test scripts before committing my working tree changes?

Yes, you can run lint and test scripts before committing working tree changes. The skill automatically detects and executes these validation scripts when available, halting the commit process if checks fail to ensure code quality.

How do I push my local git commit to the remote repository after staging?

To push your local git commit to the remote repository, the skill offers an optional push workflow. After successfully committing your related files, you can enable the push-commit option to sync the feature branch with the configured remote.

Why does my git commit halt when unrelated files are detected?

Your git commit halts when unrelated files are detected to prevent mixed-change commits. This validation ensures atomic commits by blocking files that do not belong to the focused changes in your current working tree.