Automates git staging and generates conventional commit messages by analyzing code diffs.
Install
mkdir -p .claude/skills/git-commit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/546" && unzip -o skill.zip -d .claude/skills/git-commit && rm skill.zipInstalls to .claude/skills/git-commit
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical groupingKey capabilities
- →Analyze diffs to determine commit type and scope
- →Stage files intelligently for logical grouping
- →Format commit messages according to Conventional Commits specification
- →Handle breaking change indicators in commit messages
How it works
It analyzes the current git diff and status to suggest a conventional commit message, including type, scope, and description. It also supports interactive staging to group related changes before committing.
Inputs & outputs
When to use git-commit
- →Generate commit messages from diff
- →Stage logical groups of files
- →Format commits per Conventional Commits
About this skill
Git Commit with Conventional Commits
Overview
Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
Conventional Commit Format
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
Commit Types
| Type | Purpose |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation only |
style | Formatting/style (no logic) |
refactor | Code refactor (no feature/fix) |
perf | Performance improvement |
test | Add/update tests |
build | Build system/dependencies |
ci | CI/config changes |
chore | Maintenance/misc |
revert | Revert commit |
Breaking Changes
# Exclamation mark after type/scope
feat!: remove deprecated endpoint
# BREAKING CHANGE footer
feat: allow config to extend other configs
BREAKING CHANGE: `extends` key behavior changed
Workflow
1. Analyze Diff
# If files are staged, use staged diff
git diff --staged
# If nothing staged, use working tree diff
git diff
# Also check status
git status --porcelain
2. Stage Files (if needed)
If nothing is staged or you want to group changes differently:
# Stage specific files
git add path/to/file1 path/to/file2
# Stage by pattern
git add *.test.*
git add src/components/*
# Interactive staging
git add -p
Never commit secrets (.env, credentials.json, private keys).
3. Generate Commit Message
Analyze the diff to determine:
- Type: What kind of change is this?
- Scope: What area/module is affected?
- Description: One-line summary of what changed (present tense, imperative mood, <72 chars)
4. Execute Commit
# Single line
git commit -m "<type>[scope]: <description>"
# Multi-line with body/footer
git commit -m "$(cat <<'EOF'
<type>[scope]: <description>
<optional body>
<optional footer>
EOF
)"
Best Practices
- One logical change per commit
- Present tense: "add" not "added"
- Imperative mood: "fix bug" not "fixes bug"
- Reference issues:
Closes #123,Refs #456 - Keep description under 72 characters
Git Safety Protocol
- NEVER update git config
- NEVER run destructive commands (--force, hard reset) without explicit request
- NEVER skip hooks (--no-verify) unless user asks
- NEVER force push to main/master
- If commit fails due to hooks, fix and create NEW commit (don't amend)
When not to use it
- →When committing secrets like API keys or credentials
- →When updating git config through the commit process
- →When running destructive git commands without explicit user request
Limitations
- →It does not support committing secrets
- →It does not update git config
- →It does not run destructive commands without explicit request
How it compares
This skill automates the generation and formatting of conventional commit messages based on code changes, providing a structured approach compared to manually crafting commit messages.
Compared to similar skills
git-commit side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| git-commit (this skill) | 11 | 6mo | Review | Beginner |
| run-nx-generator | 5 | 3mo | Review | Intermediate |
| morph-search | 9 | 7mo | Review | Beginner |
| upgrading-expo | 3 | 4mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by github
View all by github →You might also like
run-nx-generator
nrwl
Run Nx generators with prioritization for workspace-plugin generators. Use this when generating code, scaffolding new features, or automating repetitive tasks in the monorepo.
morph-search
parcadei
Fast codebase search via WarpGrep (20x faster than grep)
upgrading-expo
sickn33
Upgrade Expo SDK versions
continue-implementation
LibPDF-js
Continue implementing a spec from a previous session
fix-dependabot-prs
bannzai
dependabotから上がってきた複数のPRを一括で解決し、まとめPRを作成する。dependabotのPR対応を依頼された時に使用。
repoprompt
parcadei
Use RepoPrompt CLI for token-efficient codebase exploration