commit
Generate a commit message and create the commit in one step.
SKILL.md.claude/skills/commit/skill.md
GitHubCommit
Analyze current changes, generate a commit message, stage relevant files, and commit.
Process
- Run
git diff(unstaged) andgit diff --cached(staged) to see all changes. - Run
git status -uto see untracked files. - Run
git log --oneline -5to match the repository's commit style. - Analyze all changes and draft a commit message.
- Stage relevant files (
git add— prefer specific files over-A). - Create the commit.
Commit Message Format
- First line:
type: short summary(under 72 chars)- Types:
feat,fix,refactor,style,docs,chore
- Types:
- Blank line, then bullet-point details for non-trivial changes
- End with
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> - If changes span multiple concerns (e.g. a bug fix AND a feature), use multiple
type:paragraphs in the body - Write in English (per CLAUDE.md conventions)
- Pass the message via HEREDOC for proper formatting
Safety
- Never stage files that may contain secrets (.env, credentials, etc.)
- Never use
git add -A— always add specific files - Never push to remote — only commit locally