Skip to content
Back to skills

Git Commit Smart

ASecurity

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.

  • 21 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
documentationbashgitapidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 9 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add BbgnsurfTech/claude-skills-collection --skill git-commit-smart --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Commit Smart?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Commit Smart
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bbgnsurftech-git-commit-smart-claude-skills-collection/badge)](https://www.skillsdirectory.com/skills/bbgnsurftech-git-commit-smart-claude-skills-collection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: 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.
allowed-tools:
- Read
- Write
- Edit
- Grep
- Glob
- Bash(git:*)
name: generating-smart-commits
license: MIT
version: 1.0.0
---

## Prerequisites

Before using this skill, ensure:
- Git repository is initialized in {baseDir}
- Changes are staged using `git add`
- User has permission to create commits
- Git user name and email are configured

## Instructions

1. **Analyze Staged Changes**: Examine git diff output to understand modifications
2. **Determine Commit Type**: Classify changes as feat, fix, docs, style, refactor, test, or chore
3. **Identify Scope**: Extract affected module or component from file paths
4. **Detect Breaking Changes**: Look for API changes, removed features, or incompatible modifications
5. **Format Message**: Construct message following pattern: `type(scope): description`
6. **Present for Review**: Show generated message and ask for confirmation before committing

## Output

Generates conventional commit messages in this format:

```
type(scope): brief description

- Detailed explanation of changes
- Why the change was necessary
- Impact on existing functionality

BREAKING CHANGE: description if applicable
```

Examples:
- `feat(auth): implement JWT authentication middleware`
- `fix(api): resolve null pointer exception in user endpoint`
- `docs(readme): update installation instructions`

## Error Handling

Common issues and solutions:

**No Staged Changes**
- Error: "No changes staged for commit"
- Solution: Stage files using `git add <files>` before generating commit message

**Git Not Initialized**
- Error: "Not a git repository"
- Solution: Initialize git with `git init` or navigate to repository root

**Uncommitted Changes**
- Warning: "Unstaged changes detected"
- Solution: Stage relevant changes or use `git stash` for unrelated modifications

**Invalid Commit Format**
- Error: "Generated message doesn't follow conventional format"
- Solution: Review and manually adjust type, scope, or description

## Resources

- Conventional Commits specification: https://www.conventionalcommits.org/
- Git commit best practices documentation
- Repository commit history for style consistency
- Project-specific commit guidelines in {baseDir}/CONTRIBUTING.md

Files in this skill

  • SKILL.md2.5 KB
  • assets/README.md234 B
  • assets/commit_template.txt3.7 KB
  • assets/example_diff.txt4.1 KB
  • references/README.md379 B
  • scripts/README.md434 B
  • scripts/commit_analyzer.py4.7 KB
  • scripts/commit_formatter.py2.8 KB
  • scripts/git_utils.py2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…