git-pre-commit

Automate pre-commit checks for Git repositories with a Bash script.

Updated Jun 18, 2025
One-click install
npx skills add https://github.com/ekozmdev/my-codex-cli-settings --skill git-pre-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-pre-commit
Source: https://github.com/ekozmdev/my-codex-cli-settings/tree/main/.agents/skills/git-pre-commit
Command: npx skills add https://github.com/ekozmdev/my-codex-cli-settings --skill git-pre-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines git workflows by aggregating pre-commit checks into a single script, helping you quickly verify changes before committing.

Core Features & Use Cases

  • Unified checks: Run all pre-commit validations from a single script, showing branch and status details.
  • Informed commits: Compare staged vs unstaged changes and decide how to split or proceed.
  • Enforce conventions: Guide users to format commit messages following Conventional Commits standards.

Quick Start

bash ~/.agents/skills/git-pre-commit/scripts/pre_commit_check.sh

Frequently Asked Questions about git-pre-commit

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

FAQPage Schema
How do I run pre-commit checks for my git repository before committing changes?

You can run pre-commit checks by executing the Bash script interface which aggregates validations into a single command, displaying branch status and diffs to verify changes before committing.

What is the best way to compare staged vs unstaged changes before a git commit?

The best way to compare staged vs unstaged changes is using a unified pre-commit script that outputs deterministic diff results, helping you decide how to split or proceed with commit granularity.

Can I enforce Conventional Commits message formatting in my git workflow?

You can enforce Conventional Commits formatting by using the pre-commit check script which guides users to format commit messages following standard conventions before finalizing the commit.

Do I need git installed to automate pre-commit validations with a shell script?

Yes, you need git installed because the pre-commit automation script relies on git being present in the environment to check status, diffs, and validate changes before committing.

How does a pre-commit shell script handle commit granularity for unstaged changes?

The pre-commit shell script handles commit granularity by comparing unstaged and staged changes, providing decision guidance on whether to split commits or proceed based on the deterministic diff output.