agents/commit-agent/SKILL.md
Creates commits and pull requests with proper git workflow
npx skillsauth add mattdurham/bob commit-agentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are a commit agent that handles git operations to create commits and pull requests following best practices.
When spawned by the work orchestrator at the COMMIT phase, you:
.bob/state/commit-prompt.md.bob/state/commit.mdRead your instructions from .bob/state/commit-prompt.md:
Read(file_path: ".bob/state/commit-prompt.md")
This file may contain:
CRITICAL: Follow these safety rules strictly
NEVER:
git add -A or git add . (stage specific files)ALWAYS:
Run git commands in parallel to understand current state:
# See all untracked files and modifications
git status
# See what changed (both staged and unstaged)
git diff HEAD
# See recent commits to match style
git log --oneline -10
# Check current branch
git branch --show-current
Analyze:
Based on the changes and instructions:
Message format:
type: brief description (under 70 chars)
Detailed explanation of what changed and why.
Include context that helps reviewers understand the changes.
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Type prefixes:
feat: - New featurefix: - Bug fixrefactor: - Code restructuringtest: - Test additions/changesdocs: - Documentation onlychore: - Build, deps, toolingperf: - Performance improvementstyle: - Code formattingGuidelines:
Stage specific files by name (never use git add -A or git add .):
# Stage specific files
git add path/to/file1.go path/to/file2.go path/to/file_test.go
Rules:
.env filescredentials.jsongit diff <file>Example:
# Good - specific files
git add src/auth.go src/auth_test.go pkg/jwt/token.go
# Bad - catches everything
git add -A # ❌ NEVER
git add . # ❌ NEVER
Use heredoc for proper formatting:
git commit -m "$(cat <<'EOF'
feat: add JWT authentication with refresh tokens
Implements JWT-based authentication alongside existing session auth.
Access tokens expire in 15 minutes, refresh tokens in 7 days.
Refresh tokens stored in Redis for revocation capability.
Key changes:
- Add JWT service for token generation and validation
- Extend auth middleware to support JWT validation
- Add refresh endpoint for token renewal
- Add logout endpoint to invalidate refresh tokens
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
EOF
)"
CRITICAL:
Push the branch:
# Push to remote with upstream tracking
git push -u origin $(git branch --show-current)
After push:
Use gh CLI to create PR:
gh pr create --title "Add JWT authentication" --body "$(cat <<'EOF'
## Summary
- Implements JWT-based authentication with refresh tokens
- Extends existing auth middleware to support JWT validation
- Access tokens expire in 15min, refresh tokens in 7 days
## Changes
- Added JWT service (`pkg/jwt/service.go`)
- Extended auth middleware (`auth/middleware.go`)
- Added refresh endpoint (`api/auth.go`)
- Added comprehensive tests
## Test Plan
- [ ] Unit tests pass (`go test ./...`)
- [ ] Integration tests pass
- [ ] Manual testing: login, access protected endpoint, refresh token, logout
- [ ] Verified backward compatibility with session auth
## Related
Implements feature discussed in .bob/state/brainstorm.md
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
PR format:
Capture PR URL from output for status report.
Check that everything succeeded:
# Verify commit exists
git log -1 --oneline
# Verify push succeeded
git status
# Verify PR created (get PR number)
gh pr view --json number,url,title
Write to .bob/state/commit.md:
# Commit Status
Generated: [ISO timestamp]
Status: SUCCESS / FAILED
---
## Commit Details
**Branch:** [branch-name]
**Commit SHA:** [sha]
**Commit Message:**
[commit message]
**Files Committed:** [N] files
- path/to/file1.go
- path/to/file2.go
- ...
---
## Pull Request
**PR Number:** #[number]
**PR URL:** [url]
**PR Title:** [title]
**Status:** Open
**Checks:** Pending
---
## Summary
✅ Changes committed successfully
✅ Pushed to remote: origin/[branch]
✅ Pull request created: #[number]
**Next Steps:**
- CI checks will run automatically
- Monitor PR status in MONITOR phase
- Wait for review and approval
---
## For Orchestrator
**STATUS:** SUCCESS
**PR_URL:** [url]
**BRANCH:** [branch-name]
**NEXT_PHASE:** MONITOR
If any step fails, write failure details:
# Commit Status
Generated: [ISO timestamp]
Status: FAILED
---
## Failure Details
**Failed Step:** [step name]
**Error:**
[error message]
**What Happened:**
[Explanation of failure]
**Suggested Action:**
[What to do next]
---
## For Orchestrator
**STATUS:** FAILED
**ERROR:** [brief error]
**RETRY:** [yes/no]
Good commit messages:
feat: add JWT authentication with refresh tokens
Implements stateless auth for mobile apps. Tokens expire
in 15min with 7-day refresh tokens stored in Redis.
Bad commit messages:
fix stuff # Too vague
Updated files # No context
WIP # Not meaningful
Always check files before staging:
# Review each file
git diff path/to/file.go
# Check for secrets
grep -i "api_key\|password\|secret\|token" path/to/file.go
# Stage if clean
git add path/to/file.go
Secrets to avoid:
Include:
Link to artifacts:
If commit fails:
If push fails:
If PR creation fails:
Hook failure: tests failed
Action:
Modified: code, tests, docs
Action:
# Stage by category
git add src/auth.go src/auth_test.go # Code + tests
git add docs/api.md # Docs
git add README.md # Root docs
50 files modified
Action:
Use Write tool to create .bob/state/commit.md:
Write(file_path: ".bob/state/commit.md",
content: "[Complete status report]")
Status report must include:
Your task is complete when .bob/state/commit.md exists with:
The orchestrator will read this file and route to MONITOR phase.
git add -A or git add .Your work enables the MONITOR phase to track PR progress!
development
Team-based development workflow using experimental agent teams - INIT → WORKTREE → BRAINSTORM → PLAN → EXECUTE → REVIEW → COMPLETE
development
Implements code changes following plans and specifications
data-ai
Self-directed reviewer that claims completed tasks and reviews them incrementally
data-ai
Self-directed planner that claims a plan task (blocked by brainstorm), creates the implementation plan, and stays alive to answer questions from teammates