Stage all changes and create commit with AI-generated message
Stage all changes and create a commit with an AI-generated message. Use this for quick commits when you want automated message generation with approval before execution.
/plugin marketplace add olioapps/claude-code-plugins/plugin install git-actions@olio-pluginsadditional contextArguments: /git-actions:commit-all [CUSTOM_INSTRUCTIONS]
Examples:
/git-actions:commit-all - Standard commit/git-actions:commit-all use conventional commits - Override style/git-actions:commit-all keep under 50 chars - Length constraintCurrent: !git status --short
Check repo state:
git rev-parse --git-dir 2>/dev/null || echo "NOT_A_REPO"
git status --short
Abort if:
Use AskUserQuestion to confirm: "Stage all changes with git add -A?"
git add -AVerify staged files:
git diff --cached --name-status
git diff --cached --stat
git diff --cached --unified=3 | head -n 300
git log --oneline -10
git branch --show-current
File summary:
10 files: group by directory/type
Use commit-writer agent.
Context:
- mode: all
- files: [summary]
- stats: [+X -Y lines]
- diff: [truncated preview]
[IF USER PROVIDED CUSTOM INSTRUCTIONS:]
USER INSTRUCTIONS (HIGHEST PRIORITY):
"""
[custom instructions verbatim]
"""
Agent returns structured output:
---SUBJECT---
[subject]
---BODY---
[body or empty]
---FOOTER---
[footer or empty]
---END---
Parse response into SUBJECT, BODY, FOOTER. Validate:
If validation fails → Report parse error, retry (max 2 attempts)
## Proposed Commit
**Subject:** [subject]
[**Body:** [body] if exists]
[**Footer:** [footer] if exists]
**Files:** [summary] ([stats])
[⚠️ **Non-atomic warning** if flagged by agent]
Use AskUserQuestion: "How to proceed with this commit?"
Options:
On approval:
# Construct message using HEREDOC
git commit -m "$(cat <<'EOF'
[SUBJECT]
[BODY if exists]
[FOOTER if exists]
EOF
)"
Check commit result and handle hooks:
If commit succeeds:
git status --short
git log -1 --format="%H %s"
If pre-commit hook fails:
If commit fails (other reasons):
On cancel: ❌ "Cancelled. Files remain staged."
YOU (handler): check repo, stage files (with approval), gather context, invoke agent, present message, get approval, execute commit, handle errors
Agent: analyze changes, generate message matching repo style, return structured output
Agent does NOT orchestrate or execute. You do NOT format messages.
git add -A fails → Show error, suggest checking permissionsgit add -A/git-actions:commit-all # Stage all, generate message, commit
/git-actions:commit-all use conventional commits format
# Agent will use feat:/fix: format even if repo doesn't normally
/git-actions:commit-all keep subject under 40 chars, no body
# Forces short subject, omits body
/git-actions:commit-all emphasize security fixes
# Agent highlights security aspects
/git-actions:commit-all be concise, one-line only
# Forces single-line commit
# Quick commit workflow
# Make changes...
/git-actions:commit-all
# Review message, approve, done
# With pre-commit hooks
/git-actions:commit-all # If hook fails, you'll be prompted
# Options: fix code and retry, skip hooks, or cancel
# Custom formatting
/git-actions:commit-all use emoji, fun tone
# Overrides professional tone