Agent Skill
2/7/2026commit
Create a git commit with Conventional Commits format
Y
yusuke
1GitHub Stars
1Views
npx skills add yusuke-suzuki/dotfiles
SKILL.md
| Name | commit |
| Description | Create a git commit with Conventional Commits format |
name: commit description: Create a git commit with Conventional Commits format
Commit
You are assisting with creating a git commit. Follow these steps:
1. Initial State Assessment
- Run
git statusto see uncommitted changes - Run
git fetch originto get latest remote updates - Identify current branch (master/main or feature branch)
- If on a feature branch, show commits with
git log origin/main..HEAD --oneline
2. Branch Handling
If on master/main:
- Derive 2-3 branch name candidates from the staged changes (e.g.
feat/add-login,docs/update-readme) - Present candidates to the user via AskUserQuestion and let them choose or provide their own
- Create and switch using
git switch -c <branch-name>
If on a feature branch:
- Display the current branch name
- Show existing commits relative to main
3. Commit Creation
- Analyze the uncommitted changes and group them by semantic intent
- If changes fall into multiple distinct groups, create one commit per group
- For each group:
git add <files>, craft a commit message, thengit commit
Key Constraints
- NEVER commit directly to master/main
- NEVER use
git commit --fixuporgit commit --amend(use/fixupcommand instead) - NEVER reference
git logmessages as a style guide for commit messages, as past messages may not follow the correct format. - This command creates a NEW, INDEPENDENT commit only
Skills Info
Original Name:commitAuthor:yusuke
Download