commitlisted
Install: claude install-skill tranquocthong/claude-spec-flow
# commit — conventional commit + push (spec-flow)
Turn the staged diff into a clean conventional commit, push, and surface the MR/PR link.
This skill is **convention only** — no personal style, no stack assumptions. Branch policy
lives in `.spec-flow/config.json → branching` and is created by the lifecycle commands, not here.
## Modes
| Invocation | Behavior |
|------------|----------|
| `commit` | Commit staged changes on the current branch |
| `commit push` | Commit + push + surface MR/PR link |
## Process
### Step 1 — Gather context (run in parallel)
```bash
git status --short
git diff --cached --stat
git diff --stat
git log --oneline -5
git rev-parse --abbrev-ref HEAD
```
Collect: current branch, staged files (`git diff --cached --name-only`), unstaged/untracked
(informational), and the repo's recent commit style.
### Step 2 — Base-branch guard (spec-flow)
If `.spec-flow/config.json` exists, read its `branching` block (`mode`, `base`).
- If `branching.mode` is **not** `off` **and** the current branch **equals** `branching.base`
(e.g. `main`): **STOP. Do not commit.** Tell the user:
> You're on the base branch `<base>`. spec-flow creates the work branch at `/sf:ingest` (per SD),
> `/sf:bug`, or `/sf:change` — run the relevant one first, then re-run commit. (Or set
> `branching.mode: "off"` in `.spec-flow/config.json` to allow commits on `<base>`.)
- If `mode: off`, or there is no `.spec-flow/` (non-spec-flow repo), or already on a work
branch → proceed