GitHub Issues — OpenClaw Skill
Automatically fix GitHub issues and open pull requests with parallel AI sub-agents.
What This Skill Does
The GitHub Issues skill is an orchestration-level skill that fetches open issues from a GitHub repository, spawns parallel sub-agents (up to 8 concurrently) to analyze and fix each issue, and opens pull requests with the fixes -- all autonomously. It handles the full lifecycle from issue triage to PR creation, including branch management, code analysis, implementation, testing, and responding to PR review comments.
The skill operates in six phases: parsing arguments and filters, fetching issues from the GitHub API, presenting them for your confirmation, running pre-flight checks (dirty tree, remote access, existing PRs), spawning fix agents in parallel, and monitoring the resulting PRs for review feedback. Each sub-agent performs a confidence check before attempting a fix, skipping issues that are too vague, too complex, or where it cannot locate the relevant code.
Advanced features include fork mode for open-source contributions (push to your fork, PR to upstream), watch mode for continuous polling, cron mode for scheduled runs, milestone and label filtering, and automatic PR review handling that addresses reviewer feedback and pushes updated commits. The skill uses the GitHub REST API directly via curl -- no gh CLI dependency required.
Example Prompts
"/gh-issues owner/repo --label bug --limit 5"
"/gh-issues --assignee @me --state open"
"/gh-issues myorg/myapp --milestone v2.0 --watch --interval 10"
"/gh-issues --fork myuser/myrepo --label good-first-issue"
"/gh-issues --reviews-only" -- only address pending PR review comments
"/gh-issues --dry-run --label enhancement" -- preview issues without fixing
"/gh-issues --cron --label bug --yes" -- automated scheduled mode
"Fix the open bugs in this repo and create PRs"
Requirements
- GH_TOKEN -- a GitHub personal access token with repo permissions
- curl and git available in PATH
- A cloned git repository (for branch creation and code analysis)
On KiwiClaw: Pre-installed. Add your GitHub token in the skill settings and point it at your repository.
Self-hosted: Set your GH_TOKEN in ~/.openclaw/openclaw.json under skills.entries.gh-issues.apiKey, or export it as an environment variable.
Setup on KiwiClaw
- Open your KiwiClaw dashboard
- Navigate to Skills in your agent settings
- Enable the GitHub Issues skill
- Enter your GitHub personal access token (needs repo scope)
- Clone your repository on the agent and run
/gh-issues owner/repo
Setup Self-Hosted
- Generate a GitHub PAT with
reposcope at github.com/settings/tokens - Add to OpenClaw config: set
skills.entries.gh-issues.apiKeyin~/.openclaw/openclaw.json - Clone your target repository
- Run:
/gh-issues --dry-runto preview issues without making changes - For fork mode:
/gh-issues upstream/repo --fork myuser/repo
Related Skills
- Coding Agent -- general-purpose code generation and debugging
- GitHub -- broader GitHub integration for repos, PRs, and workflows
- Slack -- receive notifications when PRs are created or reviews come in
- Discord -- post PR updates to your development Discord server
FAQ
How does the gh-issues skill actually fix bugs?
The skill works in six phases: it fetches issues from the GitHub API, presents them for your approval, runs pre-flight checks, then spawns parallel sub-agents (up to 8 concurrently) that each handle one issue. Each sub-agent checks out a branch, analyzes the codebase, implements a fix, runs tests, commits, pushes, and opens a pull request -- all autonomously.
Can the skill work with forked repositories?
Yes. The skill supports a --fork flag that specifies your fork repository. Issues are fetched from the upstream source repo, but branches are pushed to your fork and pull requests are opened from your fork back to the source repo. This is the standard open-source contribution workflow.
Does the skill handle PR review comments automatically?
Yes. Phase 6 of the skill monitors open pull requests for review comments, analyzes whether they are actionable (vs. simple approvals or bot noise), and spawns sub-agents to address the feedback -- making code changes, pushing updates, and replying to each comment. Use the --reviews-only flag to run only this phase.
What if an issue is too complex for the agent to fix?
Each sub-agent performs a confidence check before attempting a fix. If confidence is below 7/10 (due to vague requirements, inability to locate relevant code, or scope being too large), the agent skips the issue and reports why. It also has a 60-minute timeout per issue. Complex issues that need human judgment are flagged rather than poorly attempted.