GitHub Issues Auto-Fix

Fetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Full autonomous issue-to-PR pipeline.

GitHub Issues Auto-Fix is OpenClaw's most ambitious automation skill — a full issue-to-PR pipeline that fetches GitHub issues, spawns parallel sub-agents to implement fixes, opens pull requests, and then monitors and addresses PR review comments. It's the closest thing to having an autonomous junior developer on your team. The skill works in 6 phases: (1) parse arguments and resolve the target repo, (2) fetch and filter issues via the GitHub REST API, (3) present issues for confirmation, (4) spawn sub-agents (one per issue) to implement fixes in isolated git worktrees, (5) create pull requests from the fix branches, and (6) monitor open PRs for review comments and address them. Each phase is carefully orchestrated to avoid conflicts and maintain code quality. What makes this skill powerful is its parallel execution model. Multiple sub-agents work simultaneously, each in its own worktree, fixing different issues without stepping on each other. The `--fork` flag supports open-source contribution workflows — issues are fetched from the upstream repo, but code is pushed to your fork and PRs are opened cross-repo. The skill supports multiple operational modes: `--dry-run` for preview without action, `--yes` for fully autonomous processing, `--reviews-only` to only address PR review comments (skip new issues), `--cron` for scheduled runs that spawn agents and exit, and `--watch` for continuous polling. You can filter by label, milestone, assignee, and state. IMPORTANT: Despite listing `gh` in requirements, the skill actually uses `curl` with the GitHub REST API directly (with GH_TOKEN as Bearer token). This is by design — it avoids `gh` CLI quirks and gives full control over API parameters. Best suited for: open-source maintainers automating bug fixes, solo developers managing issue backlogs, teams wanting CI/CD-integrated issue resolution, anyone who wants to turn GitHub issues into PRs automatically.

Tags: github, issues, automation, pr, ci-cd

Category: Development

Use Cases

  • Nightly bug-fix pipeline: cron triggers issue fetching, agents fix overnight, PRs ready by morning
  • Open-source maintenance: auto-fix labeled issues from your community
  • Sprint cleanup: batch-process a milestone's issues before a release
  • PR review monitoring: automatically address reviewer feedback on open PRs
  • Triage + fix: filter by label/assignee to process specific categories
  • Hackathon mode: --yes flag for rapid-fire issue resolution

Tips

  • Start with `--dry-run` to preview which issues would be picked up
  • Use `--label bug` to focus on bug fixes first — they're usually more straightforward for AI
  • Combine `--cron` with OpenClaw cron for nightly issue-fixing runs
  • Use `--reviews-only` as a separate cron job to address PR review feedback
  • The `--fork` flag is essential for open-source contributions — don't push to repos you don't own
  • Set `--notify-channel` to get Telegram notifications when PRs are opened
  • Use `--model` to pick the best model for your codebase complexity
  • Review generated PRs carefully — AI fixes are good starting points but may need refinement

Known Issues & Gotchas

  • Requires GH_TOKEN env var with repo scope — OpenClaw injects this automatically if configured
  • Uses curl + GitHub REST API, NOT the gh CLI — despite listing gh in requirements
  • Sub-agents need a coding agent (Codex, Claude Code, or Pi) installed to implement fixes
  • Each sub-agent creates a git worktree — ensure enough disk space for parallel fixes
  • Cross-repo PRs (--fork mode) require push access to your fork repo
  • --cron mode spawns agents and exits immediately — results come asynchronously
  • Rate limits apply: GitHub API has 5,000 requests/hour for authenticated users
  • Complex issues may produce low-quality fixes — review PRs before merging
  • The --yes flag skips confirmation — use carefully in automated workflows

Alternatives

  • GitHub Copilot Workspace
  • SWE-Agent
  • Devin
  • pr-reviewer skill

Community Feedback

Codex -> PR workflow for resolving bugs before you ever even see them. The future of maintenance coding is autonomous agents fixing issues overnight.

— Twitter/X

Setting up an automated PR reviewer CRON job in OpenClaw — the gh-issues skill with --reviews-only and --cron flags lets you check PR comments on a schedule.

— AnswerOverflow (OpenClaw Discord)

OpenClaw Automation: 30 prompts that turn an AI assistant into a 24/7 autonomous companion. The gh-issues workflow is the crown jewel — issues to PRs while you sleep.

— Medium

The pr-reviewer skill complements gh-issues by focusing specifically on reviewing existing PRs rather than creating new ones from issues.

— GitHub Skills Registry

Configuration Examples

Basic issue auto-fix

# Fix up to 5 bug-labeled issues in a repo
/gh-issues owner/repo --label bug --limit 5

# Dry run first
/gh-issues owner/repo --label bug --limit 5 --dry-run

Open-source fork workflow

# Fetch issues from upstream, push fixes to your fork
/gh-issues upstream/repo --fork myuser/repo --label 'good first issue' --limit 3

Cron-based nightly pipeline

# In OpenClaw cron job:
/gh-issues owner/repo --label bug --limit 10 --cron --yes --notify-channel -1002381931352

# Separate cron for PR reviews:
/gh-issues owner/repo --reviews-only --cron

Watch mode for continuous processing

# Poll every 10 minutes for new issues
/gh-issues owner/repo --watch --interval 10 --label enhancement

Installation

# Requires curl, git, gh CLI + GH_TOKEN

Source: bundled