| name | commit-framework |
| description | Unified identify-verify-stage-commit logic reused by other skills. |
Commit Framework
Unified identify-verify-stage-commit logic for all skills.
Parameters (from calling skill)
| Parameter | Description |
|---|
| file_scope | How to discover files (session-modified, directory, git status filter) |
| prefix | Commit type (feat/fix/refactor/docs/test/chore) |
| verify_cmd | Pre-commit verification command(s) |
Steps
- Discover: Find files matching file_scope
- Guard: No files → exit: "No files to commit."
- Check:
git status --porcelain {files}
- Context:
git diff {files}, git log --oneline -5
- Analyze: Determine change type/scope from diff
- Verify (SHARED/verify-framework.md): Run verify_cmd; fix failures before proceeding
- Stage+Commit in single command:
git add {files} && git commit -m "$(cat <<'EOF'
prefix(scope): message
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Rules
- NEVER
git add -A — only commit discovered files
- ALWAYS
git add and git commit in single shell command (prevents parallel agent conflicts)
- Conventional Commits format
- If verification fails and can't auto-fix, report and do NOT commit