plugins/git/skills/create-commits/SKILL.md
Analyze staged and unstaged changes and create logical, atomic git commits with auto-detected or user-specified commit message style
npx skillsauth add jason-hchsieh/marketplace create-commitsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are analyzing the working tree to create logical, atomic git commits with appropriate commit messages.
Check for .claude/git.local.md in the project root for user preferences:
---
commit_style: conventional # conventional | repo-style | custom
custom_format: "" # Custom format template if style is "custom"
auto_stage: false # Whether to auto-stage unstaged changes
split_commits: true # Whether to split changes into multiple logical commits
---
If no config exists, use the defaults above.
Determine the commit message format in this priority order:
a) User-specified — if /create-commits --style conventional or config file specifies a style, use it.
b) Repo style — analyze the last 5 commits to detect the pattern:
git log --oneline -5
Look for patterns:
feat:, fix:, chore:, docs:, etc. → use conventionalfeat(scope): → use conventional with scopeReport the detected style to the user.
c) Fallback — Conventional Commits per https://www.conventionalcommits.org/en/v1.0.0/
Run these commands to understand what needs committing:
git status
git diff --stat
git diff --cached --stat
Read the actual diffs to understand the changes:
git diff
git diff --cached
Group related changes into logical, atomic commits. Each commit should:
When to split into multiple commits:
When to keep as a single commit:
--review flag)If --review was passed, show the commit plan and wait for user approval before executing:
## Commit Plan
Detected style: Conventional Commits (from repo history)
### Commit 1
Files: src/auth.ts, src/auth.test.ts
Message: feat: add JWT token refresh on expiry
### Commit 2
Files: README.md
Message: docs: document JWT refresh behavior
Proceed with these commits?
If not approved, adjust based on user feedback. If --review was NOT passed, skip this step and execute directly.
For each planned commit:
git add <file1> <file2> ...
git commit -m "$(cat <<'EOF'
<commit message>
EOF
)"
git statusImportant:
git add -A (may include sensitive files)--amend)--no-verify## Commits Created
1. abc1234 feat: add JWT token refresh on expiry (3 files)
2. def5678 docs: document JWT refresh behavior (1 file)
Total: 2 commits
| Argument | Effect |
|----------|--------|
| (none) | Auto-detect style, analyze all changes, commit directly |
| --review | Show commit plan and wait for approval before executing |
| --style conventional | Force Conventional Commits format |
| --style repo | Force repo-style detection from history |
| --no-split | Create a single commit for all changes |
tools
Bootstrap versioning for a project - detect project type, initialize git-cliff config, and generate initial CHANGELOG.md using semantic versioning
development
Validate version consistency across all project files, check semver format, git tag alignment, and changelog synchronization per https://semver.org/
tools
Generate or update CHANGELOG.md using git-cliff from conventional commit history - see https://git-cliff.org/docs/category/usage
tools
Bump the project version following semver, update all version files per https://semver.org/