commit_changes
Execute a git commit after the user reviews and approves the generated commit message.
Instructions
Execute git commit with a user-approved commit message.
CRITICAL WORKFLOW - YOU MUST FOLLOW THESE STEPS IN ORDER:
Call get_commit_context to get the diff
Generate a commit message based on the actual diff
SHOW the generated commit message to the user in your response
ASK the user: "Should I proceed with this commit?" and WAIT for their response
ONLY call this tool AFTER the user explicitly approves (says "yes", "proceed", "commit it", etc.)
Set user_approved=True when calling this tool
DO NOT call this tool in the same response where you generate the commit message. The user MUST see the message and approve it first.
Args: message: User-approved commit message (should follow 50/72 rule) user_approved: REQUIRED - Must be True. Confirms user has seen and approved the commit message. repo_path: Path to git repository (optional, defaults to Claude's working directory)
Returns: Success message with commit hash or error
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| repo_path | No | ||
| user_approved | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |