All SkillsGet Started Free
Gh Issues
Fetch GitHub issues, select candidates, spawn background fix agents, open PRs, and optionally process PR review comments.
MCP get_skill({ skillId: "gh-issues-343da660" })Use this skill with your agent
Create a free account and connect via MCP
# 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:
#broad-capability#browser#automation#notes#messaging#developer-tools#setup#project#managementgitgh-clijq