Create a commit with validation and format guidance
Creates a git commit with validation, format guidance, and session tracking.
/plugin marketplace add flexion/claude-domestique/plugin install onus@claude-domestiquemessageCreate a git commit following project conventions with validation.
IMPORTANT: Consult the COMMIT CHECKLIST from git.md before proceeding.
Before creating the commit, verify:
Check current branch
git branch --show-current
main or master: STOP and ask userRun tests (if applicable)
npm test
Check for session file
.claude/sessions/<branch>.md/memento:session createSession completion check (if this is the final commit)
in-progress → complete- [ ] → - [x]Check staged changes
git status
git diff --staged
Ask user if not clear from context:
#N - verb description (linked to GitHub issue)chore - description (no issue number)Never guess issue numbers - ask if unclear.
Format Requirements:
Single-line commit:
git commit -m "#42 - add user authentication"
Multi-line commit with bullets:
git commit -m "$(cat <<'EOF'
#42 - add user authentication
- Implement login form with email/password
- Add JWT token handling
- Create auth middleware
EOF
)"
Chore format:
git commit -m "chore - update dependencies"
Verify commit was created:
git log -1 --oneline
Show next steps:
git push -u origin <branch>/onus:prUser: /onus:commit
Claude: I'll help you create a commit. Let me check the staged changes.
[Runs git status, git diff --staged]
You have changes in:
- src/auth/login.ts
- src/auth/middleware.ts
Is this for an issue or a chore?
User: Issue #42
Claude: I'll update the session file and create the commit.
[Updates session file, then commits]
git commit -m "$(cat <<'EOF'
#42 - add user authentication
- Implement login form with email/password
- Add JWT token handling
EOF
)"
Committed: #42 - add user authentication
Next: `git push -u origin issue/feature-42/auth` or `/onus:pr`
Pre-commit hook failed?
git add .Nothing to commit?
git status for unstaged changesgit add <files> or git add -pWrong message format?
git commit --amend only if commit hasn't been pushed