generating-smart-commits
Execute use when generating conventional commit messages from staged git changes. Trigger with phrases like "create commit message", "generate smart commit", "/commit-smart", or "/gc". Automatically analyzes changes to determine commit type (feat, fix, docs), identifies breaking changes, and formats according to conventional commit standards.
Best use case
generating-smart-commits is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Execute use when generating conventional commit messages from staged git changes. Trigger with phrases like "create commit message", "generate smart commit", "/commit-smart", or "/gc". Automatically analyzes changes to determine commit type (feat, fix, docs), identifies breaking changes, and formats according to conventional commit standards.
Teams using generating-smart-commits should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/generating-smart-commits/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How generating-smart-commits Compares
| Feature / Agent | generating-smart-commits | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Execute use when generating conventional commit messages from staged git changes. Trigger with phrases like "create commit message", "generate smart commit", "/commit-smart", or "/gc". Automatically analyzes changes to determine commit type (feat, fix, docs), identifies breaking changes, and formats according to conventional commit standards.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Generating Smart Commits ## Current State !`git diff --cached --stat` !`git log --oneline -5` !`git status --short` ## Overview Analyze staged git changes and generate Conventional Commits messages with accurate type classification, scope detection, and breaking change identification. Supports `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `perf`, `ci`, and `build` types following the Conventional Commits 1.0.0 specification. ## Prerequisites - Git repository initialized in the working directory - Changes staged via `git add` (at least one staged file) - Git user name and email configured (`git config user.name`, `git config user.email`) - Understanding of the project's commit message conventions (check recent history) ## Instructions 1. Run `git diff --cached --stat` to get an overview of staged files and change volume 2. Run `git diff --cached` to examine the actual code changes in detail 3. Classify the commit type based on the nature of changes: - `feat`: new functionality visible to users - `fix`: bug correction - `refactor`: code restructuring without behavior change - `docs`: documentation only - `test`: adding or updating tests - `chore`: build process, dependencies, or tooling - `perf`: performance improvement - `ci`: CI/CD configuration changes 4. Determine scope from the primary directory or module affected (e.g., `auth`, `api`, `cli`, `db`) 5. Check for breaking changes: removed public APIs, changed function signatures, renamed exports, schema migrations 6. Check recent commit history with `git log --oneline -10` to match the project's style conventions 7. Construct the commit message: `type(scope): imperative description under 72 characters` 8. Add a body with bullet points explaining the "why" behind the change if the diff is non-trivial 9. Append `BREAKING CHANGE:` footer if applicable ## Output Conventional commit message following this format: ``` type(scope): imperative description - Explanation of what changed and why - Impact on existing functionality BREAKING CHANGE: description (if applicable) ``` ## Error Handling | Error | Cause | Solution | |-------|-------|---------| | `No changes staged for commit` | Nothing added to staging area | Run `git add <files>` to stage changes before generating the message | | `Not a git repository` | Working directory is not inside a git repo | Run `git init` or navigate to the repository root | | `Ambiguous commit type` | Changes span multiple categories (feature + fix) | Split into separate commits or use the primary intent as the type | | `Scope unclear from file paths` | Changes touch many unrelated directories | Use the most significant module or omit scope entirely | | `Commit message exceeds 72 characters` | Description too verbose | Shorten to the essential action; move details to the commit body | ## Examples - "Analyze my staged changes and generate a conventional commit message with the right type and scope." - "Create a commit message for these changes, checking if there are any breaking changes in the API." - "Generate a smart commit following this project's existing commit style (check the last 10 commits)." ## Resources - Conventional Commits specification: https://www.conventionalcommits.org/en/v1.0.0/ - Angular commit guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit - Git commit best practices: https://cbea.ms/git-commit/
Related Skills
generating-unit-tests
Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions. Use when creating test coverage for functions, classes, or modules. Trigger with phrases like "generate unit tests", "create tests for", or "add test coverage".
generating-test-reports
Generate comprehensive test reports with metrics, coverage, and visualizations. Use when performing specialized testing. Trigger with phrases like "generate test report", "create test documentation", or "show test metrics".
generating-test-doubles
Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".
generating-test-data
Generate realistic test data including edge cases and boundary conditions. Use when creating realistic fixtures or edge case test data. Trigger with phrases like "generate test data", "create fixtures", or "setup test database".
generating-security-audit-reports
Generate comprehensive security audit reports for applications and systems. Use when you need to assess security posture, identify vulnerabilities, evaluate compliance status, or create formal security documentation. Trigger with phrases like "create security audit report", "generate security assessment", "audit security posture", or "PCI-DSS compliance report".
generating-compliance-reports
Generate comprehensive compliance reports for security standards. Use when creating compliance documentation. Trigger with 'generate compliance report', 'compliance status', or 'audit compliance'.
generating-conventional-commits
Execute generates conventional commit messages using AI. It analyzes code changes and suggests a commit message adhering to the conventional commits specification. Use this skill when you need help writing clear, standardized commit messages, especially a... Use when managing version control. Trigger with phrases like 'commit', 'branch', or 'git'.
generating-infrastructure-as-code
Execute use when generating infrastructure as code configurations. Trigger with phrases like "create Terraform config", "generate CloudFormation template", "write Pulumi code", or "IaC for AWS/GCP/Azure". Produces production-ready code for Terraform, CloudFormation, Pulumi, ARM templates, and CDK across multiple cloud providers.
generating-helm-charts
Execute use when generating Helm charts for Kubernetes applications. Trigger with phrases like "create Helm chart", "generate chart for app", "package Kubernetes deployment", or "helm template". Produces production-ready charts with Chart.yaml, values.yaml, templates, and best practices for multi-environment deployments.
generating-docker-compose-files
Execute use when you need to work with Docker Compose. This skill provides Docker Compose file generation with comprehensive guidance and automation. Trigger with phrases like "generate docker-compose", "create compose file", or "configure multi-container app".
generating-stored-procedures
Use when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server. Creates database functions, triggers, and procedures with proper error handling and transaction management. Trigger with phrases like "generate stored procedure", "create database function", "write SQL procedure", "add trigger to table", or "create CRUD procedures".
generating-orm-code
Execute use when you need to work with ORM code generation. This skill provides ORM model and code generation with comprehensive guidance and automation. Trigger with phrases like "generate ORM models", "create entity classes", or "scaffold database models".