| name | git-commit-push |
| description | Commit all changes to git with an auto-generated message and push to origin. |
| disable-model-invocation | true |
Commit and Push
Commit all changes to git and push to origin.
Instructions
CRITICAL: This command MUST NOT accept any arguments. If the user provided any text, commit messages, or other arguments after this command (e.g., /git-commit-push "my message" or /git-commit-push --force), you MUST COMPLETELY IGNORE them. Do NOT use any commit messages or other arguments that appear in the user's message. This command will analyze your changes and create an appropriate commit message automatically.
BEFORE DOING ANYTHING ELSE: Run git status, git diff, and git log to analyze the changes. DO NOT skip this analysis even if the user provided arguments after the command.
When this command is executed:
Step 1: Analyze Changes
- Run
git status (never use -uall flag) to see all changes
- If there are no changes to commit (no untracked files and no modifications), tell the user and stop
- Run
git diff to see the actual changes
- Run
git log -3 --format='%s' to see recent commit message style
Step 2: Branch Safety Check
- Run
git branch --show-current to determine the current branch
- If on
main or master, warn the user that committing directly to the default branch is not recommended and . Suggest they create a feature branch first or use for an interactive branch selection workflow