Smart Git Commit

Automate Git commits with pre-commit validation and conventional message formatting.

3|1|Updated Apr 18, 2021
One-click install
npx skills add https://github.com/nashgao/mqtt-client --skill smart-git-commit-nashgao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Smart Git Commit
Source: https://github.com/nashgao/mqtt-client/tree/main/.claude/skills/git/commit
Command: npx skills add https://github.com/nashgao/mqtt-client --skill smart-git-commit-nashgao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the Git commit process by enforcing validation, conventional commit standards, and pre-commit hook compliance, preventing errors and ensuring code quality.

Core Features & Use Cases

  • Automated Validation: Checks for unstaged changes, merge conflicts, and large files before committing.
  • Conventional Commits: Guides users to format commit messages according to established standards (type, scope, subject, body, footer).
  • Pre-commit Hook Execution: Ensures local hooks and linters pass, maintaining project integrity.
  • Use Case: A developer needs to commit a new feature. They run /git/commit, and the Skill guides them through staging, validation, and crafting a well-formatted commit message, ensuring no broken code is pushed.

Quick Start

Use the smart git commit skill to commit staged changes with automatic validation and conventional commit formatting.

Frequently Asked Questions about Smart Git Commit

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

FAQPage Schema
How do I format conventional commit messages automatically?

Conventional commit messages are automatically formatted by guiding you through the type, scope, subject, body, and footer structure to ensure compliance with established version control standards.

What's the best way to prevent committing to a main branch?

Preventing commits to main branches is handled through automated pre-commit validation safety checks that block the commit workflow before unauthorized code is pushed to protected branches.

Can I validate unstaged changes and merge conflicts before a git commit?

Unstaged changes and merge conflicts are validated before a git commit by running automated pre-commit checks that detect errors and ensure clean code quality.

Does pre-commit hook execution detect large files and sensitive data?

Pre-commit hook execution detects large files and sensitive data by enforcing local hook compliance and running linters during the validation process to maintain project integrity.

Why does pre-commit validation warn about TODO and FIXME comments?

Pre-commit validation warns about TODO and FIXME comments to prevent unresolved code issues from being committed, ensuring that code quality checks flag incomplete logic before version control submission.