Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
steipete avatar

Gh Issues

  • 3k installs
  • 385k repo stars
  • Updated August 3, 2026
  • steipete/clawdis

An OpenClaw skill that fetches GitHub issues, spawns background fix agents, opens PRs, and optionally processes PR review comments via gh CLI.

About

gh-issues automates issue-to-PR workflows using the gh CLI with optional fork mode, watch loops, and review-only passes. Phase 1 resolves the repo from git remote, loads GH_TOKEN from OpenClaw config if needed, and verifies auth. Phase 2 fetches issues with label, milestone, assignee, state, and limit filters. Phase 3 skips candidates with open PRs, existing fix/issue branches, or active local claims stored in gh-issues JSON with two-hour expiry. Phase 4 confirms selection unless --yes or --cron is set, then configures fork remotes. Phase 5 spawns up to eight background workers with prompts requiring minimal fixes, tests, conventional commits, and PR bodies citing the issue. Phase 6 polls workers and reports PR URLs or failures. Reviews-only mode discovers fix/issue PRs, fetches actionable review comments, and spawns one worker per PR. Watch mode loops fetch, spawn, review processing, and sleep on an interval. Flags include --dry-run, --fork, --reviews-only, --cron, and --model for workers.

  • Six phases: resolve repo, fetch issues, dedupe, confirm, spawn workers, collect
  • Skip issues with open PRs, existing branches, or active two-hour claims
  • Spawn up to 8 background workers with conventional commits and test proof
  • Reviews-only mode processes actionable comments on fix/issue PRs
  • Watch mode polls issues and reviews on a configurable interval

Gh Issues by the numbers

  • 3,040 all-time installs (skills.sh)
  • +159 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #29 of 735 Git & Pull Requests skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
At a glance

gh-issues capabilities & compatibility

Capabilities
resolve repo and authenticate gh with gh_token f · filter and list issues by label, milestone, assi · deduplicate via pr search, branch checks, and cl · spawn up to 8 background workers with structured · process actionable pr review comments in reviews · run watch loops with configurable fetch and revi
Works with
github
Runs
Runs locally
Pricing
Free
From the docs

What gh-issues says it does

Skip candidates with an open PR, existing branch, or active local claim.
SKILL.md
npx skills add https://github.com/steipete/clawdis --skill gh-issues

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars385k
Security audit1 / 3 scanners passed
Last updatedAugust 3, 2026
Repositorysteipete/clawdis

How do you automate GitHub issue fixes into PRs without duplicate branches, overlapping workers, or missing review feedback?

Fetch GitHub issues, spawn background fix agents, open PRs, and process PR review comments using gh CLI with claim deduplication.

Who is it for?

Teams using gh CLI and OpenClaw who want automated issue triage, worker spawning, and PR review loops on open source repos.

Skip if: Skip when GitHub auth is unavailable, the worktree is dirty without confirmation, or you only need manual one-off commits.

When should I use this skill?

Use when fetching GitHub issues, spawning fix agents, opening PRs from issues, or processing PR review comments in batch.

What you get

PRs opened from selected issues with claims, test proof, conventional commits, and optional review comment resolution.

  • issue candidate list
  • fix agent branches
  • opened pull requests

By the numbers

  • Requires git and gh binaries per skill metadata
  • Uses GH_TOKEN as primary GitHub authentication environment variable

Files

SKILL.mdMarkdownGitHub ↗

gh-issues

Use for issue-to-PR automation. Prefer gh CLI; fall back to gh api only when a high-level command lacks the needed field.

Arguments

  • positional owner/repo: optional; else infer from git remote get-url origin.
  • --label <label>: filter.
  • --limit <n>: default 10.
  • --milestone <title>: filter.
  • --assignee <login|@me>: filter.
  • --state open|closed|all: default open.
  • --fork <owner/repo>: push branches to fork, PR to source.
  • --watch: poll issues + reviews.
  • --interval <minutes>: default 5.
  • --dry-run: list only.
  • --yes: no confirmation.
  • --reviews-only: skip issue fixing; handle PR reviews.
  • --cron: spawn and exit; implies --yes.
  • --model <id>: pass to workers when supported.
  • --notify-channel <id>: optional final notification target.

Phase 1: resolve repo

git remote get-url origin
if [ -z "${GH_TOKEN:-}" ]; then
  CONFIG_PATH="${OPENCLAW_CONFIG_PATH:-${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/openclaw.json}"
  GH_TOKEN=$(jq -r '.skills.entries["gh-issues"].apiKey // empty' "$CONFIG_PATH" 2>/dev/null || true)
  if [ -n "$GH_TOKEN" ]; then export GH_TOKEN; fi
fi
gh auth status
gh repo view OWNER/REPO --json nameWithOwner,defaultBranchRef

If gh auth status fails and GH_TOKEN is missing, stop and ask for GitHub auth/config.

Derived:

  • SOURCE_REPO: issue repo.
  • PUSH_REPO: fork if set, else source.
  • BASE_BRANCH: source default branch unless user says otherwise.
  • PUSH_REMOTE: fork in fork mode, else origin.

Stop on dirty worktree unless user confirms that workers should ignore uncommitted changes.

In fork mode, do not mutate remotes before confirmation or during --dry-run.

Verify auth/read access only:

gh auth token >/dev/null || test -n "${GH_TOKEN:-}"
gh repo view "$PUSH_REPO" --json nameWithOwner
git ls-remote --exit-code origin HEAD

Phase 2: fetch issues

Build filters and fetch:

gh issue list --repo "$SOURCE_REPO" --state open --limit 10 --json number,title,labels,url,body,assignees,milestone

Add --label, --milestone, --assignee, --state, --limit as requested. gh issue list already excludes PRs.

If none found: report no matches. If --dry-run: show compact list and stop.

Phase 3: avoid duplicate work

For each candidate:

gh pr list --repo "$SOURCE_REPO" --search "$SOURCE_REPO#<n>" --state open --json number,url,title,headRefName
gh pr list --repo "$SOURCE_REPO" --head "fix/issue-<n>" --state open --json number,url
gh api "repos/$PUSH_REPO/branches/fix/issue-<n>" >/dev/null

Skip candidates with an open PR, existing branch, or active local claim.

Claim file:

${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/gh-issues-<owner>-<repo>.json

Expire claims older than 2 hours. Create the parent directory before writing.

Phase 4: confirm

Unless --yes or --cron, ask user to choose:

  • all
  • comma-separated issue numbers
  • cancel

After confirmation, in fork mode, configure the push remote before handing work to agents:

gh auth setup-git
git remote get-url fork || git remote add fork "https://github.com/$PUSH_REPO.git"
git remote set-url fork "https://github.com/$PUSH_REPO.git"
git ls-remote --exit-code fork HEAD

Phase 5: spawn workers

Launch up to 8 background workers. Do not block on each worker when --cron.

Before each spawn, write a claim for SOURCE_REPO#<n> with the current ISO timestamp. After a worker reports PR/failure, remove or update the claim. This prevents watch/cron overlap before a branch or PR exists.

Worker prompt must include:

  • issue URL, title, body, labels.
  • SOURCE_REPO, PUSH_REPO, BASE_BRANCH, PUSH_REMOTE, fork mode.
  • target branch fix/issue-<n>.
  • required proof and PR body.
  • notification route.

Worker instructions:

Use gh and git. Do not handwave.
Checkout/create fix/issue-<n> from BASE_BRANCH.
Implement minimal fix.
Run relevant tests.
Commit with conventional message.
Push to PUSH_REMOTE.
Open PR against SOURCE_REPO BASE_BRANCH.
PR body: What Problem This Solves + Why This Change Was Made + User Impact + Evidence + visible Fixes SOURCE_REPO#<n>.
Report PR URL or failure reason.
Send completion/failure with openclaw message send if route provided.

Use coding-agent launch rules when available.

Phase 6: collect

Poll workers with process or task registry. Report:

  • issue number + title.
  • status: PR opened, skipped, failed, timed out.
  • PR URL or reason.

Notify channel only with final compact summary.

Reviews-only / watch reviews

Discover open PRs:

gh pr list --repo "$SOURCE_REPO" --state open --json number,title,url,headRefName,reviewDecision \
  --jq '[.[] | select(.headRefName | startswith("fix/issue-"))]'

Fetch review threads/comments:

gh pr view <n> --repo "$SOURCE_REPO" --json url,headRefName,comments,reviews
gh api "repos/$SOURCE_REPO/pulls/<n>/comments"
gh api "repos/$SOURCE_REPO/issues/<n>/comments"

Only process fix/issue-* PRs created by this workflow unless the user explicitly named PR numbers. Group actionable comments by PR. Ignore praise, status, duplicates, and already-addressed comments. Spawn one worker per selected/scoped PR, same background rules.

Review worker instructions:

Checkout PR branch.
Read all actionable review comments.
Patch minimal changes.
Run relevant tests.
Commit and push normally; do not force-push unless explicitly told.
Reply to addressed comments with fix + commit/file reference.
Report comments addressed/skipped and proof.

Watch mode

Loop:

1. Fetch issues. 2. Spawn eligible issue workers. 3. Process actionable PR reviews. 4. Sleep --interval. 5. Stop when user says stop.

Keep cumulative summary small.

Related skills

How it compares

Use gh-issues when you want multi-issue agent fixes and PRs via gh instead of manual branch-per-issue workflows.

FAQ

How does gh-issues prevent duplicate work?

It checks for open PRs, existing fix/issue branches, and writes two-hour claim files before spawning workers.

What must worker prompts include?

Issue URL, title, body, repo details, target fix/issue branch, test proof, conventional commit, and PR body citing Fixes SOURCE_REPO#N.

When should I use --reviews-only?

Use --reviews-only to skip issue fixing and instead process actionable review comments on existing fix/issue PRs.

Is Gh Issues safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.