$npx -y skills add aaddrick/claude-pipeline --skill handle-issuesBatch process GitHub issues via batch-orchestrator.sh with rate limit handling and session resumption
| 1 | # Handle Issues |
| 2 | |
| 3 | Batch process multiple GitHub issues by launching `batch-orchestrator.sh` which handles the execution loop, rate limits, and status tracking autonomously. This skill focuses on setup and monitoring. |
| 4 | |
| 5 | **Announce at start:** "Using handle-issues to batch process issues. Query: $CONTEXT" |
| 6 | |
| 7 | **Arguments:** |
| 8 | - `$1` — Context query describing which issues to process and how (required) |
| 9 | |
| 10 | **Examples:** |
| 11 | - `/handle-issues "issues assigned to @me ordered by priority"` |
| 12 | - `/handle-issues "all open bugs labeled 'critical'"` |
| 13 | - `/handle-issues "issues in milestone v2.0 by creation date"` |
| 14 | - `/handle-issues "Tailwind removal issues 306-308"` (frontend work) |
| 15 | |
| 16 | ## Agent Selection |
| 17 | |
| 18 | The orchestrator uses specialized agents via `--agent` flag to ensure the right expertise for each stage: |
| 19 | |
| 20 | | Stage | Agent | Purpose | |
| 21 | |-------|-------|---------| |
| 22 | | implement-issue | `bulletproof-frontend-developer` | CSS, HTML, Blade templates, frontend styling | |
| 23 | | implement-issue | `laravel-backend-developer` | PHP, Laravel, controllers, services, models | |
| 24 | | implement-issue | (default) | General implementation | |
| 25 | | process-pr | `code-reviewer` | **Always** - reviews PR for quality and standards | |
| 26 | |
| 27 | **Determine agent based on issue content:** |
| 28 | - **Frontend issues** (CSS, Tailwind, styling, UI, HTML, Blade): Use `bulletproof-frontend-developer` |
| 29 | - **Backend issues** (PHP, Laravel, API, database, auth): Use `laravel-backend-developer` |
| 30 | - **Mixed or unclear**: Use default (no agent specified) |
| 31 | |
| 32 | **Ask user during confirmation** which agent to use if issue type is ambiguous. |
| 33 | |
| 34 | ## Architecture |
| 35 | |
| 36 | ``` |
| 37 | ┌─────────────────────────────────────────────────────────────────┐ |
| 38 | │ handle-issues (this skill) │ |
| 39 | │ • Gathers issues via gh CLI │ |
| 40 | │ • Determines appropriate agent for issue type │ |
| 41 | │ • Confirms with user (ONLY interaction point) │ |
| 42 | │ • Writes manifest.json (includes agent) │ |
| 43 | │ • Launches batch-orchestrator.sh (background) │ |
| 44 | │ • Reads status.json every 5 minutes │ |
| 45 | │ • Outputs summary when complete │ |
| 46 | └─────────────────────────────────────────────────────────────────┘ |
| 47 | │ |
| 48 | ▼ |
| 49 | ┌─────────────────────────────────────────────────────────────────┐ |
| 50 | │ batch-orchestrator.sh (shell script) │ |
| 51 | │ • Loops through issues autonomously │ |
| 52 | │ • Invokes claude with --agent and --dangerously-skip-permissions│ |
| 53 | │ • Parses structured_output via jq │ |
| 54 | │ • Updates status.json after each operation │ |
| 55 | │ • Handles rate limits, timeouts, circuit breaker │ |
| 56 | └─────────────────────────────────────────────────────────────────┘ |
| 57 | |
| 58 | Claude CLI invocations: |
| 59 | claude -p "/implement-issue #N branch" \ |
| 60 | --agent <frontend|backend> \ |
| 61 | --dangerously-skip-permissions \ |
| 62 | --output-format json \ |
| 63 | --json-schema implement-issue.json |
| 64 | |
| 65 | claude -p "/process-pr #PR #issue branch" \ |
| 66 | --agent code-reviewer \ |
| 67 | --dangerously-skip-permissions \ |
| 68 | --output-format json \ |
| 69 | --json-schema process-pr.json |
| 70 | ``` |
| 71 | |
| 72 | ## Process |
| 73 | |
| 74 | ```dot |
| 75 | digraph process { |
| 76 | rankdir=TB; |
| 77 | node [shape=box]; |
| 78 | |
| 79 | check_resume [label="0. Check for incomplete batch"]; |
| 80 | resume_choice [label="Resume or start fresh?" shape=diamond]; |
| 81 | parse [label="1. Parse context query"]; |
| 82 | fetch [label="2. Fetch matching issues"]; |
| 83 | confirm [label="3. Confirm with user"]; |
| 84 | write_manifest [label="4. Write manifest.json"]; |
| 85 | launch [label="5. Launch orchestrator"]; |
| 86 | monitor [label="6. Monitor status.json\n(every 5 min)"]; |
| 87 | summary [label="7. Output summary"]; |
| 88 | |
| 89 | check_resume -> resume_choice; |
| 90 | resume_choice -> parse [label="fresh"]; |
| 91 | resume_choice -> launch [label="resume"]; |
| 92 | parse -> fetch -> confirm -> write_manifest -> launch -> monitor -> summary; |
| 93 | } |
| 94 | ``` |
| 95 | |
| 96 | ### Step 0: Check for Incomplete Batch |
| 97 | |
| 98 | Before fetching issues, check if a previous batch was interrupted: |
| 99 | |
| 100 | ```bash |
| 101 | if [[ -f status.json ]]; then |
| 102 | STATE=$(jq -r '.state' status.json) |
| 103 | |
| 104 | if [[ "$STATE" == "running" || "$STATE" == "circuit_breaker" ]]; then |
| 105 | PROGRESS=$(jq -r '.progress | "\(.completed)/\(.total) complete, \(.failed) failed, \(.pending) pending"' status.json) |
| 106 | LOG_DIR=$(jq -r '.log_dir' status.json) |
| 107 | BRANCH=$(jq -r '.base_branch' status.json) |
| 108 | |
| 109 | echo "## Incomplete Batch Detected" |
| 110 | echo "" |
| 111 | echo "**State:** $STATE" |
| 112 | echo "**Progress:** $PROGRESS" |
| 113 | echo "**Branch:** $BRANCH" |
| 114 | echo "**Log dir:** $LOG_DIR" |
| 115 | echo "" |
| 116 | |
| 117 | # Show pending issues |
| 118 | echo "**Pending issues:**" |
| 119 | jq -r '.issues[] | select(.status == "pe |