Git Manager Agent

Stage, commit, and push code with professional conventional commits, security scanning, and 81% cost reduction.

When to Use

  • Auto-generate semantic commit messages (feat, fix, docs, refactor)
  • Prevent secrets from leaking into Git history
  • Commit and push after implementing features or fixes
  • Create pull requests with proper formatting

Key Capabilities

FeatureDescription
Conventional CommitsAuto-generates type(scope): description messages (max 72 chars)
Security ScanningBlocks commits with API keys, passwords, tokens, connection strings
Token Optimization81% cost reduction vs baseline (Haiku model, 5-8K tokens/commit)
Smart StagingAuto-detects relevant changes, respects .gitignore
DelegationEscalates complex changes (5+ files) to Gemini for context

Common Use Cases

Developers - Quick Commits

Prompt: /git:cm or /git:cp

  • Commits auth bug fix with fix(auth): add email validation in login
  • 10-15 seconds, $0.015 per commit
  • Security scan blocks if secrets detected

Teams - Consistent History

Prompt: “commit and push”

  • Enforces conventional commit format across team
  • Compatible with changelog generators (semantic-release)
  • No AI attribution in commit messages

DevOps - Safe Deployments

Prompt: /git:cp after feature work

  • Scans for leaked AWS credentials, DB passwords, OAuth tokens
  • Blocks commit and shows file/line number of violations
  • Whitelists process.env.* and .env.example

Code Reviewers - Pre-Commit Validation

Prompt: Chain with code-reviewer agent → /git:cm

  • Reviews code → fixes applied → commits with proper message
  • Example: refactor(db): extract query builders to helpers

Multi-File Features - Smart Delegation

Prompt: /git:cm after dashboard feature

  • Detects complex changes (Dashboard.tsx, Chart.tsx, styles)
  • Delegates to Gemini: feat(dashboard): add interactive chart component
  • Includes multi-line body with implementation details

Pro Tips

Commit Types Reference:

feat     → New feature
fix      → Bug fix
docs     → Documentation only
refactor → Code restructuring
perf     → Performance improvement
test     → Adding tests
chore    → Maintenance (deps, config)

Security Patterns Blocked:

// ❌ Blocked
const API_KEY = "sk-1234567890abcdef";
const DB_URL = "postgres://user:pass@host/db";

// ✅ Allowed
const API_KEY = process.env.API_KEY;

Logical Commit Grouping:

git add src/auth/*
/git:cm  # Commits only auth changes

git add src/components/*
/git:cm  # Separate UI changes

Performance Metrics:

MetricHaiku (Optimized)Sonnet (Baseline)Savings
Tokens5-8K25-30K81%
Time10-15s45s67%
Cost$0.015$0.07580%

Workflow After Feature:

git status      # Review changes
/git:cm         # Commit with auto-message
git log -1      # Verify commit
/git:cp         # Push if satisfied

Fix Push Failures:

git pull --rebase origin main  # Pull latest
# Resolve conflicts if any
/git:cp  # Retry push

Key Takeaway

git-manager automates professional Git operations with security-first conventional commits at 81% lower cost than baseline—no AI attribution, just clean commit history.