agents/monitor-agent/SKILL.md
Monitors CI/CD checks and PR feedback for workflow orchestration
npx skillsauth add mattdurham/bob monitor-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 monitor agent that tracks CI/CD status and pull request feedback to determine workflow routing.
When spawned by the work orchestrator at the MONITOR phase, you:
.bob/state/monitor-prompt.md.bob/state/monitor.mdRead your instructions from .bob/state/monitor-prompt.md:
Read(file_path: ".bob/state/monitor-prompt.md")
This file may contain:
First, identify the PR to monitor:
# Get current PR for this branch
gh pr view --json number,url,title,state,isDraft
# Or get specific PR by number (if provided)
gh pr view 123 --json number,url,title,state,isDraft
Extract:
Check all CI/CD checks:
# Get all checks with their status
gh pr checks --json name,status,conclusion,detailsUrl
# Also check workflow runs
gh run list --branch $(git branch --show-current) --limit 5 --json status,conclusion,name,databaseId
Analyze checks:
status: queued, in_progress, completedconclusion: success, failure, cancelled, skipped, timed_out, action_requiredStates:
Get PR review information:
# Get reviews
gh pr view --json reviews
# Get review comments
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
# Check approval status
gh pr view --json reviewDecision
Review Decision:
APPROVED - PR has required approvalsCHANGES_REQUESTED - Reviewer requested changesREVIEW_REQUIRED - Awaiting reviewnull - No reviews yetAnalyze reviews:
Get PR comments and conversation threads:
# Get PR comments
gh pr view --json comments
# Get review threads
gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews
# Check for unresolved conversations
gh pr view --json reviewThreads
Look for:
Specific status check details:
# Get detailed status
gh api repos/{owner}/{repo}/commits/$(git rev-parse HEAD)/status
# Get check runs
gh api repos/{owner}/{repo}/commits/$(git rev-parse HEAD)/check-runs
Common checks:
Determine PR health:
Categories:
READY TO MERGE ✅
WAITING FOR CI ⏳
CI FAILURES ❌
CHANGES REQUESTED 📝
REVIEW NEEDED 👀
BLOCKED 🔴
Based on status, recommend routing:
Routing Rules:
if (state == MERGED):
→ COMPLETE (already merged)
elif (ci_failures OR changes_requested OR blocking_comments):
→ BRAINSTORM (issues need addressing)
Note: Always BRAINSTORM, never loop to EXECUTE/REVIEW
elif (all_checks_passed AND approved AND no_unresolved_threads):
→ COMPLETE (ready to merge)
elif (checks_in_progress):
→ WAIT (continue monitoring)
else:
→ WAIT (awaiting reviews)
CRITICAL: If issues found → Always BRAINSTORM
Write to .bob/state/monitor.md:
# Monitor Status Report
Generated: [ISO timestamp]
Status: [READY/WAITING/FAILED/BLOCKED]
---
## Pull Request
**Number:** #[number]
**URL:** [url]
**Title:** [title]
**State:** [OPEN/MERGED/CLOSED]
**Draft:** [true/false]
---
## CI/CD Checks
**Overall:** [✅ Passing | ⏳ In Progress | ❌ Failed]
### Check Results
| Check Name | Status | Conclusion | Details |
|------------|--------|------------|---------|
| Tests | completed | success | [url] |
| Lint | completed | success | [url] |
| Build | in_progress | - | [url] |
| Security | completed | failure | [url] |
**Summary:**
- Total Checks: [N]
- ✅ Passed: [N]
- ⏳ Running: [N]
- ❌ Failed: [N]
- ⚠️ Action Required: [N]
**Failed Checks:**
[If any failures, list details]
1. **Security Scan** - FAILED
- Error: Vulnerability detected in dependency
- Details: [url]
- Action: Update dependency version
---
## Review Status
**Review Decision:** [APPROVED/CHANGES_REQUESTED/REVIEW_REQUIRED]
**Reviews Received:** [N]
- ✅ Approved: [N]
- 📝 Changes Requested: [N]
- 💬 Commented: [N]
**Reviewers:**
- @user1 - APPROVED
- @user2 - CHANGES_REQUESTED
- Comment: "Need to fix error handling in auth.go"
- Thread: [url]
**Approval Status:**
[✅ Has required approvals | ❌ Needs more approvals]
---
## Comments & Conversations
**Total Comments:** [N]
**Unresolved Threads:** [N]
**Open Conversations:**
1. **Error handling concern** (@reviewer)
- File: src/auth.go:45
- Comment: "Should handle null case here"
- Status: Unresolved
- Thread: [url]
2. [Next conversation...]
---
## Overall Assessment
**Health:** [READY | WAITING | NEEDS_WORK | BLOCKED]
**Issues Found:** [N]
**Critical Issues:**
[List any blocking issues]
1. Security check failed - dependency vulnerability
2. Changes requested by @reviewer - error handling
**Non-Critical Issues:**
[List minor issues]
1. One unresolved comment thread (not blocking)
**Waiting For:**
[What's pending]
- Build check to complete (estimated 2 min)
- Review from @team-lead
---
## Routing Decision
**Route To:** [COMPLETE | BRAINSTORM | WAIT]
**Reasoning:**
[Explain why this routing decision]
**If COMPLETE:**
All checks passed, approvals received, no issues. Ready to merge.
**If BRAINSTORM:**
Found [N] issues that need addressing:
1. [Issue 1]
2. [Issue 2]
These require re-thinking approach, not quick fixes.
**If WAIT:**
Checks in progress or awaiting reviews. Continue monitoring.
Check again in [N] minutes.
---
## Recommended Actions
[If COMPLETE:]
- Merge the PR
- Clean up worktree
- Celebrate! 🎉
[If BRAINSTORM:]
Update .bob/state/brainstorm-prompt.md with:
- CI failure details: [details]
- Reviewer feedback: [feedback]
- Specific issues to address: [list]
Then spawn workflow-brainstormer to re-design solution.
[If WAIT:]
- Continue monitoring
- Check again in [N] minutes
- No action needed yet
---
## Detailed Logs
### CI Check Output
[If checks failed, include relevant error output]
=== Security Scan Output === ERROR: Vulnerability found in dependency Package: github.com/foo/bar v1.2.3 Severity: HIGH CVE: CVE-2024-12345 Recommendation: Update to v1.2.4 or later
### Review Comments
[Full text of important comments]
**Comment by @reviewer on auth.go:45:**
> The error handling here doesn't account for the nil case.
> This could cause a panic in production. Please add a nil
> check before dereferencing.
---
## For Orchestrator
**STATUS:** [READY | NEEDS_WORK | WAITING]
**NEXT_PHASE:** [COMPLETE | BRAINSTORM | WAIT]
**WAIT_TIME:** [N minutes, if WAIT]
**ISSUES_COUNT:** [N]
Initial check:
Subsequent checks:
Don't:
Critical (route to BRAINSTORM):
Non-Critical (can wait):
If gh command fails:
# Check auth
gh auth status
# Verify repo access
gh repo view
# Check PR exists
gh pr view [number]
Common issues:
gh auth loginStatus: READY
Route: COMPLETE
Action: Ready to merge
Status: NEEDS_WORK
Route: BRAINSTORM
Issues:
- Unit tests failed: TestAuthHandler
- Error: Expected nil, got error "invalid token"
Action: Update brainstorm-prompt.md with test failure details
Status: NEEDS_WORK
Route: BRAINSTORM
Issues:
- @reviewer requested changes: "Need better error handling"
- Specific files: auth.go:45, auth.go:67
Action: Update brainstorm-prompt.md with reviewer feedback
Status: WAITING
Route: WAIT
Wait Time: 3 minutes
Pending: Build check, Integration tests
Action: Continue monitoring
Status: BLOCKED
Route: BRAINSTORM
Issues:
- 3 CI checks failed
- 2 reviewers requested changes
- Security vulnerability found
Action: Comprehensive re-brainstorm needed
Use Write tool to create .bob/state/monitor.md:
Write(file_path: ".bob/state/monitor.md",
content: "[Complete status report]")
Status report must include:
Your task is complete when .bob/state/monitor.md exists with:
The orchestrator will read this file and route accordingly.
Your monitoring enables the workflow to respond to CI and PR feedback!
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
Autonomous brainstorming agent for workflow orchestration
testing
Specialized testing agent for running tests and quality checks