Automatically commits and pushes significant changes to git after completing features, fixes, or milestones...
Automatically stage, commit, and push changes to git when significant work is completed.
This skill activates when:
/auto-commit command or asking to commitBefore committing, verify:
Do NOT auto-commit when:
Run git status to see what changed:
git status
Review the changes to understand:
Examine the actual changes:
git diff
git diff --staged
Understand the nature of changes to write an accurate commit message.
Stage files selectively (preferred) or all changes:
# Preferred: Stage specific files
git add path/to/file1 path/to/file2
# Or stage all tracked changes
git add -u
# For new files that should be tracked
git add path/to/new/file
Never stage:
.env files or any file containing secretsnode_modules/, __pycache__/, or other dependency directories.idea/, .vscode/ unless project-shared)Follow conventional commits format:
<type>(<scope>): <description>
[optional body with more details]
Co-Authored-By: Claude <noreply@anthropic.com>
Types:
feat - New featurefix - Bug fixdocs - Documentation onlystyle - Formatting, no code changerefactor - Code restructuringtest - Adding/updating testschore - Maintenance, dependencies, configExamples:
feat(auth): implement user authentication with JWT
Add login/logout endpoints, JWT token generation, and middleware
for protected routes.
Co-Authored-By: Claude <noreply@anthropic.com>
fix(cart): resolve multi-vendor total calculation
Cart now correctly sums totals across different vendors
and applies shipping per vendor group.
Co-Authored-By: Claude <noreply@anthropic.com>
docs(prd): create Kuwait marketplace PRD
Comprehensive PRD covering multi-vendor marketplace requirements,
user stories, technical architecture, and MVP scope.
Co-Authored-By: Claude <noreply@anthropic.com>
Create the commit using HEREDOC for proper formatting:
git commit -m "$(cat <<'EOF'
<type>(<scope>): <description>
<body if needed>
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Push to the current branch:
git push
If the branch has no upstream:
git push -u origin <branch-name>
Verify the commit and push succeeded:
git status
git log -1 --oneline
Report to the user:
--force or -f) without explicit user permissionClaude should proactively invoke this skill when:
Before auto-committing, briefly inform the user:
"I've completed [description]. Let me commit these changes."
Then proceed with the workflow unless the user objects.
Users can invoke via /auto-commit with optional arguments:
/auto-commit # Commit all staged/unstaged changes
/auto-commit "custom message" # Use custom commit message
/auto-commit --dry-run # Show what would be committed without committing