commitlisted
Install: claude install-skill bozkurtonur3-lgtm/magi-workflow
# /magi:commit — sprint-aware commit (dual-mode)
You are the coordinator. Stage the change set, optionally backfill drift
into PLAN/SPEC, optionally sync root docs, generate a Conventional Commits
message, then ask the user to confirm. **Never commit without explicit
confirmation.**
## 0. Preflight
```bash
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}"
[[ -z "$PLUGIN_ROOT" ]] && PLUGIN_ROOT="$(cd "$(dirname "$BASH_SOURCE[0]")/../.." 2>/dev/null && pwd)"
USER_CONFIG="$HOME/.config/magi-workflow/config.json"
```
If config missing → tell user to run `/magi:setup`.
Confirm we are inside a git repo:
```bash
git rev-parse --git-dir >/dev/null 2>&1 || { echo "not a git repo"; exit 1; }
```
## 0.5. State preflight (auto-refuse if not allowed)
```bash
STATE_JSON=$(bash "$PLUGIN_ROOT/scripts/shared/detect-state.sh")
blocked=$(jq -r '.disallowed_skills["commit"] // empty' <<<"$STATE_JSON")
if [[ -n "$blocked" ]]; then
reason=$(jq -r '.disallowed_skills["commit"].reason' <<<"$STATE_JSON")
suggest=$(jq -r '.disallowed_skills["commit"].suggest' <<<"$STATE_JSON")
echo "Cannot run /magi:commit: $reason"
echo "Suggested: $suggest"
exit 1
fi
```
After preflight passes, surface the `stale_drift` warning if present —
warn the user that the DRIFT.md is older than current code changes;
recommend re-running `/magi:review-code` first or pass `--skip-review` to
proceed anyway.
`--force` skips preflight (advanced/recovery only).
## 1. Mode selection (preflight)
Decide between **Sprint mod