Git Auto
Scanned@mupengi-bot
npx machina-cli add skill @mupengi-bot/git-auto --openclawgit-auto
Git Workspace Automation — Streamline daily Git operations with intelligent defaults. Status checks, smart commits, safe pushes, and diff analysis in one skill.
When to Use
- Check workspace status across multiple repos
- Generate meaningful commit messages from staged changes
- Push with safety checks (branch protection, conflict detection)
- View formatted logs and diffs
- Batch operations across monorepo subdirectories
Commands
status
# Show concise workspace status
git-auto status
# Multi-repo status scan
git-auto status --all
Returns: modified files, untracked files, branch info, ahead/behind count.
commit
# Auto-generate commit message from diff
git-auto commit
# With explicit message
git-auto commit -m "feat: add user auth"
# Commit specific files
git-auto commit -f "src/auth.ts,src/types.ts"
Behavior:
- Runs
git diff --stagedto analyze changes - Generates conventional commit message (feat/fix/refactor/docs/chore)
- Validates message format before committing
- Shows commit hash and summary
push
# Push current branch with safety checks
git-auto push
# Force push (with confirmation)
git-auto push --force
Safety checks:
- Warns if pushing to main/master directly
- Checks for upstream conflicts
- Verifies remote exists
log
# Last 10 commits, formatted
git-auto log
# Last N commits
git-auto log -n 20
# Filter by author
git-auto log --author "name"
diff
# Staged changes
git-auto diff
# Working directory changes
git-auto diff --unstaged
# Between branches
git-auto diff main..feature-branch
Smart Commit Message Format
Uses Conventional Commits:
feat:— New featurefix:— Bug fixrefactor:— Code restructuringdocs:— Documentation onlychore:— Maintenance taskstest:— Adding/updating tests
Integration
Works with any Git repository. No configuration needed — auto-detects .git directory and current branch. Pairs well with code-review skill for pre-commit analysis.
Error Handling
| Situation | Behavior |
|---|---|
| Not a git repo | Clear error message with suggestion |
| Merge conflicts | Shows conflict files, suggests resolution |
| No staged changes | Prompts to stage or shows unstaged changes |
| Auth failure | Suggests credential refresh |
| Detached HEAD | Warns and suggests creating branch |
Overview
git-auto streamlines daily Git operations by automating status checks, smart commit generation, safe pushes, and diff/log analysis across repositories. It auto-detects the .git directory and current branch to enable multi-repo workflows. This helps teams stay synchronized in monorepos with fewer manual steps.
How This Skill Works
git-auto analyzes changes by running git diff --staged to derive meaningful commit messages using Conventional Commits. It then validates the generated message before committing and enforces safety checks during pushes (e.g., warnings for main/master, conflict detection, and remote existence). The tool auto-detects the repository context and supports status/log/diff commands across multiple repos or subdirectories.
When to Use It
- Check workspace status across multiple repos to surface modified, untracked files, and branch info
- Auto-generate meaningful commit messages from staged changes
- Push with safety checks to prevent direct main/master updates and detect upstream conflicts
- View last or filtered logs and diffs to review changes before merging
- Batch operations across monorepo subdirectories for consistency and efficiency
Quick Start
- Step 1: Run git-auto status to inspect workspace state across repos
- Step 2: Stage changes and run git-auto commit (or git-auto commit -m \"feat: ...\") to create a conventional commit
- Step 3: Run git-auto push to push with safety checks (or git-auto push --force with confirmation)
Best Practices
- Always run git-auto status before committing to understand the exact workspace state
- Use git-auto commit to generate a conventional message from staged changes, or supply -m for explicit messages
- Review the generated commit message for correctness before committing
- Leverage git-auto push with its safety checks to avoid direct pushes to protected branches
- Use git-auto log and git-auto diff to verify changes across branches or subdirectories before merging
Example Use Cases
- Scan a large monorepo to get a concise, multi-repo status including ahead/behind counts
- Auto-generate a feature branch commit from staged changes and push with validation
- Push a feature branch while warning if attempting to push to main/master and checking for conflicts
- View the last 10 commits and their authors to understand recent changes in a feature branch
- Compare staged changes against the working tree to decide what to commit and what to discard