Skills Easy
Git Commit Skill
A Claude Code skill that reads your staged changes and generates a conventional commit message following the project's commit style.
claude-codegitconventional-commits
Targets: YAML
Code
name: commit
description: Generate a conventional commit message from staged changes and commit.
prompt: |
Follow these steps carefully to create a git commit:
1. Run `git diff --staged` to see all staged changes.
2. Run `git log --oneline -10` to understand the project's commit style.
3. Analyze the staged changes and determine:
- The primary change type: feat | fix | refactor | docs | style | test | chore | perf | ci | build
- The scope (optional): the component or module affected
- A concise subject line (max 72 chars, imperative mood, no period)
- Whether a body is needed for complex changes
4. Draft the commit message:
```
<type>(<scope>): <subject>
[optional body — explain WHY, not WHAT]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
```
5. Show me the draft and ask for confirmation before running `git commit`.
6. If I approve, run `git commit -m "<message>"`.
7. Run `git status` to confirm success.
Rules:
- Never use --no-verify or skip pre-commit hooks
- Never commit files that look like secrets (.env, *.key, credentials*)
- If there are no staged changes, tell me and stopA Claude Code skill (/commit) that analyzes your staged changes and generates a conventional commit message that matches your project’s style.
What it does
- Reads
git diff --stagedoutput - Reads recent commit history to match your project’s style
- Generates a commit message following Conventional Commits (
feat:,fix:,refactor:, etc.) - Asks for confirmation before committing
How to install
- Copy the YAML snippet
- Save it to
~/.claude/skills/commit.yaml - In any repo, run
/commitin Claude Code
Requirements
- Claude Code CLI installed
- A git repository with staged changes