github-issue-automationlisted
Install: claude install-skill KonH/GlobalStrategy
# Label-Driven GitHub Issue/PR Automation
`scripts/automation/claude/handle_issues.{py,sh,ps1}` runs on a cron schedule **in the user's own environment** (a personal machine or server the user controls — not this Claude Code Remote session, not a GitHub Actions runner). The script itself does cheap discovery via plain `gh` calls (no LLM usage); it only invokes `claude -p "/handle-issue ..."` (`.claude/commands/handle-issue.md`) — and only then spends subscription usage — when discovery actually finds a candidate. Discovery/locking/claim/clear logic shared with the Codex and Cursor equivalents (`scripts/automation/codex|cursor/handle_issues.py`) lives in `scripts/automation/common/issue_handler.py`.
## The labels are the whole state machine
There is no local state file, no timestamp bookkeeping, no comment-heading parsing, and no reaction handling — the label set on each issue/PR is the entire state, visible and manually overridable on GitHub:
- **`claude` / `codex` / `cursor`** — provider opt-in (owner or auto-router). Description plus trusted later comments are the prompt — no required format, no hardcoded spec→plan pipeline; whatever workflow is wanted (e.g. "run /specify for X") goes in the prompt itself.
- **`ai-in-progress`** — a run is actively working the item. Skipped by discovery. Shared across providers.
- **`ai-need-attention`** — the automation stopped and is waiting on the owner (question asked, blocked, partial work, missing environment). Skipped by discover