Intelligent git commit system that stages only task-related changes and generates meaningful commit messages without AI tool references.
Generates smart git commits by staging task-related changes and creating professional conventional commit messages without AI references.
/plugin marketplace add rafaelkamimura/claude-tools/plugin install rafaelkamimura-claude-tools@rafaelkamimura/claude-toolsIntelligent git commit system that stages only task-related changes and generates meaningful commit messages without AI tool references.
Use Bash tool to find most recent task file:
ls -t .claude/task-history/*.md 2>/dev/null | head -1If no task file exists, output: "No task history found. Proceeding with manual file selection."
If task file exists:
Use Bash tool to check git status:
git status --porcelainParse output to categorize:
Based on task context (if available), identify files that:
If no task context, consider all changed files as candidates.
Output a categorized list of changes:
## Task: [Task Title or "Manual Commit"]
### Will stage:
- file1.js (modified) - implements feature X
- file2.test.js (added) - tests for feature X
### Possibly related (confirm):
- config.json (modified) - may contain task settings
### Will skip:
- .env (modified) - local environment
- debug.log (added) - temporary file
Then output: "Review staging plan. Adjust? (Reply with files to add/remove, or 'ok' to proceed):"
WAIT for user response.
Use Bash tool to stage selected files:
git add [space-separated file paths]Based on staged changes, generate a conventional commit message:
Format:
[type]: [concise description]
[optional body with details]
Types: feat, fix, docs, style, refactor, perf, test, chore
IMPORTANT: Never mention AI, agents, Claude, automation, or AI-assistance in the message.
Output:
## Proposed Commit Message:
[generated message]
Then output: "Use this commit message? (Reply 'yes' to commit, 'no' to edit, 'abort' to cancel):"
WAIT for user response.
If user says 'no', ask: "Enter your commit message:" WAIT for user's message.
If user says 'abort':
git resetIf user approves:
Use Bash tool to create commit:
git commit -m "[message]"Use Bash tool to show result:
git log --oneline -1 && git statusIf task history file exists, append commit info using Edit tool
Output: "Commit successful! Create a Merge Request / Pull Request? (y/n):" WAIT for user's response.
If user says yes:
Output: "Starting /mr-draft command..."
Execute the /mr-draft slash command.
If user says no, command complete.
Automatically detect task-related files based on:
Direct Mentions
Technology Patterns
Temporal Correlation
Dependency Chain
Always exclude:
.env, .env.local, .env.**.log, *.tmp, *.cache.DS_Store, Thumbs.dbnode_modules/, vendor/, target/.vscode/settings.json, .idea/)git init if appropriate/commit
Runs full smart commit workflow
If no task context or user wants manual control:
.claude/task-history//task-init → [work on task] → /commit → [repeat as needed]
One Task, One Commit
Message Quality
Clean History