Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

gh-issues — Claude Code skill: what it does, how to install

This skill finds GitHub issues, starts background fix agents, and opens PRs. Use it when you want an issue-to-PR workflow with optional review handling.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openclaw/openclaw --skill gh-issues -a claude-code
Open on GitHub

What gh-issues does

gh-issues fetches issues through the GitHub CLI and filters them by repository, label, milestone, assignee, or state. It checks for open PRs and existing branches before work starts, which helps avoid duplicate fixes. Selected issues go to background agents.

Each worker creates fix/issue- from the base branch, applies a minimal fix, runs relevant tests, commits the change, pushes it, and opens a PR. The skill can also watch issues and review comments, process only fix/issue-* PRs from this workflow, and push through a fork. It requires git, gh, and GitHub access through GH_TOKEN or gh authentication.

Install it when you want agents to move selected GitHub issues toward PRs. A manual one-off fix does not need this workflow.

What it helps with

  • find open GitHub issues to work on
  • filter issues by label or milestone
  • hand selected fixes to background agents
  • open a PR from an issue fix
  • handle comments from pull request reviews

Example prompts for the agent

  • Find open issues in the current repository and list candidates for fixing.
  • Run fixes for the selected issues and open PRs with the required body.
  • Check review comments on `fix/issue-*` PRs and apply the actionable changes.

How to install gh-issues

1Skills CLI (Vercel)

npx skills add openclaw/openclaw --skill gh-issues -a claude-code

2Manually: put the files in place

~/.claude/skills/gh-issues/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gh-issues/

From the same set45

The whole set →
summarize openclaw Runs a CLI tool to summarize or transcribe web articles, YouTube videos, podcasts, and local PDF documents directly within your AI assistant. Claude Code CX Codex Cursor +1 26,900installs weather openclaw This skill fetches current conditions and forecasts for a city, region, airport code, or coordinates. Use it to check rain and temperature or plan a trip. Claude Code CX Codex Cursor +1 9,300installs gog openclaw Guides an agent using the gog CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Use it when Google Workspace tasks need to run from a terminal. Claude Code CX Codex Cursor +1 8,500installs tmux openclaw Lets an agent work with live tmux sessions: read pane output, send keys and text, wait for a prompt line to show up. Claude Code CX Codex Cursor +1 8,400installs openai-whisper openclaw This skill lets your agent call the Whisper CLI to transcribe audio on your own machine. No API key needed. Claude Code CX Codex Cursor +1 7,100installs nano-pdf openclaw Edit PDF pages with plain text instructions through the nano-pdf CLI. Useful when you need to fix a typo or swap a heading without leaving your terminal. Claude Code CX Codex Cursor +1 7,100installs skill-creator openclaw A skill for writing, repairing and reviewing other skills. It splits behaviour into branches, sets the frontmatter and sorts resources into folders. Useful once your skill folder gets crowded. Claude Code CX Codex Cursor +1 6,700installs coding-agent openclaw This skill sends large coding tasks to Codex, Claude Code, or OpenCode as background workers. Use it for refactors, PR reviews, and issue-to-PR work. Claude Code CX Codex Cursor +1 6,500installs

Similar

gh-fix-ci official openai Finds failing GitHub Actions checks on a pull request, inspects logs, and drafts a fix plan. The skill modifies code only after explicit approval. Claude Code CX Codex Cursor +1 11,400installs open-code-review alibaba Skill runs the ocr CLI to review Git changes with AI. Produces line-level comments and can apply fixes on request. Claude Code CX Codex Cursor +1 6,800installs fix react The skill formats changed files and checks for remaining lint issues before a commit. Use it when code needs to pass CI checks. Claude Code CX Codex Cursor +1 2,300installs release-skills JimLiu Automates release workflows, conventional commit parsing, and version bumps for Node.js, Python, or Rust. Builds changelogs and creates GitHub Releases. Claude Code CX Codex Cursor +1 25,600installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. Claude Code 990,453installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. Claude Code 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. Claude Code 774,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs

Questions about gh-issues

How do I install gh-issues in Claude Code?

Run npx skills add openclaw/openclaw --skill gh-issues -a claude-code. The skill is placed at ~/.claude/skills/gh-issues/SKILL.md.

What does gh-issues do?

It fetches GitHub issues, selects candidates, starts background fix agents, and opens PRs. It can also process review comments from PRs created by the workflow.

What does gh-issues require?

The environment needs git and gh. GitHub access uses GH_TOKEN or gh authentication, and the repository can be inferred from the origin remote.

Source text

SKILL.md · MIT
---
name: gh-issues
description: "Fetch GitHub issues, select candidates, spawn background fix agents, open PRs, and optionally process PR review comments."
user-invocable: true
metadata:
  {
    "openclaw":
      {
        "requires": { "bins": ["git", "gh"] },
        "primaryEnv": "GH_TOKEN",
        "install":
          [
            {
              "id": "brew",
              "kind": "brew",
              "formula": "gh",
              "bins": ["gh"],
              "label": "Install GitHub CLI (brew)",
            },
          ],
      },
  }
---

# 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

```bash
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:

```bash
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:

```bash
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:

```bash
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:

```text
${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:

```bash
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:

```text
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:

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

Fetch review threads/comments:

```bash
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:

```text
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.

© openclaw · MIT · openclaw/openclaw

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor