| name | commit |
| description | Smart conventional commit |
| command | /commit |
| args | [message] |
/commit Skill
Create a well-structured conventional commit from staged changes.
Usage
/commit — auto-generate commit message from staged changes
/commit fix login bug — use provided message as basis
Steps
- Run
git status and git diff --staged to analyze changes
- If no changes are staged, check for unstaged changes and suggest what to stage
- Determine the commit type (feat, fix, docs, refactor, test, chore, etc.)
- Determine the scope from the changed files/directories
- Generate a concise commit message in conventional commit format
- If a message hint was provided, incorporate it
- Show the proposed commit message and ask for confirmation
- Create the commit
Commit Format
<type>(<scope>): <description>
[body if changes are complex]
Rules
- Never commit .env files or files containing secrets
- Keep the subject line under 72 characters
- Use imperative mood ("add" not "added")
- If breaking changes exist, add
BREAKING CHANGE: footer