← ClaudeAtlas

github-issue-automationlisted

Reference for scripts/automation/claude/handle_issues.py (and the codex/common equivalents) — the cron-driven, label-driven "execute the prompt from a GitHub issue/PR" automation. Load when working on, debugging, or extending that automation, or its .claude/commands/handle-issue.md command.
KonH/GlobalStrategy · ★ 2 · AI & Automation · score 68
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/reclaim logic shared with the Codex equivalent (`scripts/automation/codex/handle_issues.py`, driving `.codex/skills/codex-issue/SKILL.md`) 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`** — the owner opted this item in. Its description plus the owner's later comments are the prompt to execute — no required format, no hardcoded spec→plan pipeline; whatever workflow is wanted (e.g. "run /specify for X") goes in the prompt itself. - **`claude-in-progress`** — a run is actively working the item. Skipped by discovery. - **`claude-needs-attention`** — the automation stopped and is waiting on the owner (question asked, blocked, partial work, missing environment). Skipped by discovery. -