← ClaudeAtlas

poll-githublisted

Poll GitHub for new pull requests that need review. Use this skill when checking for new PRs, when running an engineer-agent poll cycle, or when the user asks to check GitHub for work.
tomharris/engineer-agent · ★ 0 · Code & Development · score 65
Install: claude install-skill tomharris/engineer-agent
# Poll GitHub for New PRs Check configured GitHub repos for pull requests that need review and create queue items for each. Iterates over all projects that have GitHub configured. ## Tools Needed - `Bash` — `gh` CLI commands for GitHub API access, file operations - `Read` — read config and state files - `Write` — create queue items - `Glob` — check for existing queue items ## Steps ### 1. Load Config Read `~/.local/share/engineer-agent/engineer.yaml`. Extract the `projects` map and `agent` settings. If config is missing, report the error and stop. ### 2. Load Dedup State Read `~/.local/share/engineer-agent/state/last-poll.yaml` if it exists. This contains per-project state under `projects.<slug>`. If the state file doesn't exist, treat everything as new (use epoch as last_checked). ### 3. Iterate Over Projects For each project slug in the `projects` config map that has a `github` section configured: Extract `projects.<slug>.github.owner`, `projects.<slug>.github.repos`, `projects.<slug>.github.review_requested_for`, and `projects.<slug>.github.ignore_labels`. Load dedup state from `projects.<slug>.github` in last-poll.yaml (use epoch defaults if missing). #### 3a. Poll Each Repo For each repo in `projects.<slug>.github.repos`: 1. Run via Bash: ```bash gh pr list --repo {owner}/{repo} --state open --json number,title,author,url,labels,headRefName,baseRefName,changedFiles,reviewRequests,body --limit 100 ``` This returns JSON with PR details. The `re