commitlisted
Install: claude install-skill toverux/grimoire
Create well-crafted git commits from the current working tree, then close the loop with a compound scan.
## Step 1: Gather context
Run each as its own shell call and read the exit status directly — a non-zero exit is a state to interpret, not a failure:
- `git status` — working-tree state.
Clean tree → report there is nothing to commit and stop.
- `git diff HEAD` — the uncommitted changes.
- `git branch --show-current` — empty output means detached HEAD: ask whether to create a branch or commit detached.
- `git log --oneline -10` — recent commit style.
- `git rev-parse --abbrev-ref origin/HEAD` — the default branch (strip the `origin/` prefix).
If unset, fall back to `main`.
## Step 2: Branch off the default
If the current branch is the default branch (or `main`/`master`), create a feature branch before committing: derive the name from the change content, `git checkout -b <branch-name>`, and confirm with `git branch --show-current`.
This is automatic — committing directly on the default branch is not an option here.
## Step 3: Determine the message convention
In priority order:
1. **Documented repo conventions** already in context (AGENTS.md, CLAUDE.md, or similar).
2. **Recent commit history** — if the last 10 commits show a clear pattern (conventional commits, ticket prefixes, emoji prefixes), match it.
3. **Default: conventional commits** — `type(scope): description`, type one of `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `perf`, `ci`, `style`, `build`