git-commit

Enforce atomic conventional git commits with automated pre-commit checks.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/marcd35/health-tracker-9000 --skill git-commit-marcd35
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/marcd35/health-tracker-9000/tree/main/.claude/skills/git-commit
Command: npx skills add https://github.com/marcd35/health-tracker-9000 --skill git-commit-marcd35

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures every code change is committed atomically and with a consistent, readable history by enforcing conventional commit messages and running pre-commit checks.

Core Features & Use Cases

  • Atomic commits: each commit represents a single logical change.
  • Conventional commits: follows the conventional commit spec to improve changelog generation.
  • Pre-commit checks: runs ESLint, TypeScript type checks, and tests via Husky + lint-staged before commit.
  • Use Case: in a feature branch, you modify a module and a test; you commit these separately with clear messages to enable precise code reviews and changelog generation.

Quick Start

Use the git commit workflow to ensure code quality:

  • Stage changes: git add .
  • Start commit: git commit
  • Edit message following the conventional format, for example: feat(api): add daily summary endpoint
  • Save and exit
  • If a hook fails, fix issues and re-run git commit

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I enforce conventional commits with Husky and lint-staged?

To enforce conventional commits with Husky and lint-staged, you use a pre-commit hook to automatically run ESLint, TypeScript type checks, and tests before finalizing the commit.

What is an atomic git commit and when do I need it?

An atomic git commit represents a single logical change, ensuring one-commit-per-change discipline. You need it in feature branches to enable precise code reviews and accurate changelog generation.

How do I format a conventional commit message for a feature branch?

To format a conventional commit message, structure it with a type and scope, such as feat(api): add daily summary endpoint. This format improves readability and automated changelog generation.

Can I run ESLint and TypeScript checks automatically before a git commit?

Yes, you can run ESLint and TypeScript checks automatically before a git commit by configuring Husky and lint-staged to intercept the commit process and validate staged files.

What happens if a pre-commit hook fails during a git commit?

If a pre-commit hook fails during a git commit, the commit is aborted. You must fix the reported linting or type check issues and re-run the git commit command.

Do I need lint-staged to enforce one commit per change?

Yes, lint-staged is required to run automated pre-commit checks on staged files, ensuring one-commit-per-change discipline by validating code quality before the commit finalizes.