write-commitlisted
Install: claude install-skill brandtam/skills
# Commit
Generate a commit message for the current changes, then optionally execute the commit with user approval.
## Workflow
### Step 1 — Gather fresh state
Run all three in parallel — never reuse results from earlier in the conversation:
```
git status
git diff HEAD
git diff --cached
```
Determine: are there staged files? Unstaged changes? Untracked files?
If there are no changes at all (nothing staged, unstaged, or untracked), tell the user there's nothing to commit and stop.
### Step 2 — Staging decision
If there are already staged files AND unstaged/untracked changes, ask the user:
- **Staged files only** — write commit for what's already staged
- **Stage all changes** — run `git add -A`, then write commit for everything
If everything is already staged, skip this question. If nothing is staged, ask:
- **Stage all changes** — run `git add -A`
- **Select files** — let the user tell you which files to stage
After staging is resolved, re-run `git diff --cached` to see exactly what will be committed.
### Step 3 — Check for commit template
Check for a repo-level commit template:
```
git config --get commit.template
```
Also check for `.gitmessagetemplate` or `.git-commit-template` in the repo root.
- If a template exists, read it and follow its format for the commit message.
- If no template exists, use the **default format** below.
### Step 4 — Write the commit message
#### Default format
1. A single summary line (imperative mood, under 70 characters)
2.