← ClaudeAtlas

core-commitlisted

Generate conventional commit messages from staged changes. Use with /core-commit.
AirMile/claude-config · ★ 0 · Code & Development · score 75
Install: claude install-skill AirMile/claude-config
# Commit Analyze staged changes and generate a clear commit message. ## Trigger `/core-commit` or `/core-commit [extra context]` ## Process ### 1. Pre-flight Checks Run in parallel: - `git status` - review staged/unstaged changes - `git diff --cached` - review staged changes (or `git diff` if nothing staged) **Stop conditions** (report and exit): - No changes → "No changes to commit" - Rebase in progress → "Rebase active, resolve first with `git rebase --continue` or `--abort`" - Merge in progress → "Merge conflict active, resolve first" - Cherry-pick in progress → "Cherry-pick active, resolve first" **Platform note:** Always use `cd "<project-root>" && git <command>` instead of `git -C <path>`. The `-C` flag has known issues with Windows paths containing backslashes. **Detect rebase/merge state:** ```bash # Check for active operations ls .git/rebase-merge .git/rebase-apply .git/MERGE_HEAD .git/CHERRY_PICK_HEAD 2>/dev/null ``` ### 1.5. Convention + Ticket Detection Once per project (cache in `project.json#team`). Skip if `team.commitConvention` is already set. 1. **Convention detect**: `git log --oneline -20` → regex-match dominant pattern (>60% of commits): - `^[a-z]+(\([a-z-]+\))?: ` → `"conventional"` (Conventional Commits) - `^[A-Z]+-\d+[: ]` → `"ticket-prefix"` (Jira/Linear style) - `^\[[A-Z-]+\]` → `"bracket"` (bracket-tag style) - Otherwise → `"freeform"` - Cache in `project.json#team.commitConvention`. For ticket-prefix: extract prefix (e