pre-commit

Validate code and commit messages against repository policies before pushes.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/hack-ink/skills --skill pre-commit-hack-ink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit
Source: https://github.com/hack-ink/skills/tree/main/pre-commit
Command: npx skills add https://github.com/hack-ink/skills --skill pre-commit-hack-ink

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3, and includes scripts (resource) components.

What problem does it solve?

This Skill enforces repository-specific commit and push policies, preventing invalid commits and ensuring code quality standards are met before code enters the repository.

Core Features & Use Cases

  • Automated Checks: Runs predefined scripts and commands to validate code style, formatting, and tests.
  • Commit Message Validation: Enforces a strict JSON schema for commit messages.
  • Hard Gate: Prevents commits or pushes until all checks pass, ensuring a clean and consistent codebase.
  • Use Case: Before pushing a new feature, this Skill will automatically run linters, formatters, and tests, and verify your commit message adheres to the cmsg/1 schema, stopping you if any check fails.

Quick Start

Run the pre-commit skill to validate your code and commit message before pushing.

Frequently Asked Questions about pre-commit

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

FAQPage Schema
How do I enforce code quality and commit message validation before pushing to Git?

You can enforce code quality and commit message validation by running automated pre-commit checks that verify formatting, tests, and strict schema adherence to block invalid Git pushes.

What is a commit message schema and how does it prevent invalid commits?

A commit message schema like cmsg/1 defines a strict JSON structure for commit messages. Enforcing it via pre-commit hooks prevents invalid commits from entering the repository by stopping non-compliant pushes.

How do I set up a hard gate to stop Git commits when repository policies fail?

To set up a hard gate, configure pre-commit hooks to run predefined validation scripts via Makefile.toml. This stops Git commits automatically whenever code style, formatting, or policy checks fail.

Do I need Python3 to run automated pre-commit validation scripts?

Yes, Python3 is required as a dependency to run the automated pre-commit validation scripts. It executes the commands that verify code quality and enforce repository-specific commit policies.

Can I use GitHub workflow verification and Makefile.toml together for CI/CD validation?

Yes, you can use Makefile.toml alongside GitHub workflow verification for CI/CD validation. This combination enforces repository-specific policies and ensures code quality standards are met before commits or pushes proceed.

Why are my Git commits failing the pre-commit hard gate during validation?

Git commits fail the pre-commit hard gate when automated checks detect code style issues, formatting errors, test failures, or commit messages that do not adhere to the strict cmsg/1 JSON schema.