gh-issues
できること
このスキルは、AIエージェントがGitHubのイシューを選ぶところから、修正の作成、レビューへの対応まで、プルリクエストに変える手順を示します。イシューの溜まったバックログを早く片付けたい開発者のためのものです。
使う場面
- ✓バックグラウンドのエージェントの助けを借りて、未解決のGitHubイシューを片付けたいとき。
- ✓プルリクエストにレビューコメントがあり、それに対応する必要があるとき。
- ✓作業を始める前に、ラベルやマイルストーンに一致するイシューを確認したいとき。
スキルのリンク
https://github.com/openclaw/openclaw/blob/main/skills/gh-issues/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のリポジトリで、good first issueのラベルが付いた未解決のバグのイシューを一覧表示し、どれから直すべきかを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルはGitHubのコマンドラインツールを使い、イシューを読み込んで絞り込み、候補を選びます。その後、バックグラウンドのワーカーが各修正を試み、結果がプルリクエストとして開かれます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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 fromgit 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:forkin fork mode, elseorigin.
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 c
よくある質問
確認せずにイシューに対して作業しますか?
既定ではしません。ドライランのオプションはイシューを一覧表示するだけで、yesのオプションを付けない限り確認を求めます。
GitHubへのアクセスが必要ですか?
はい。イシューを読む前に、GitHubのコマンドラインツールにサインインするか、トークンを用意する必要があります。
新しいイシューを監視できますか?
はい。監視のオプションで、一定の間隔でイシューとレビューを再確認できます。
詳細
作者による元の説明
Fetch GitHub issues, select candidates, spawn background fix agents, open PRs, and optionally process PR review comments.
repo: openclaw/openclaw
人気
- GitHubのスター
- 394k
- ランキング
- #55
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
discord-user-post
394kエージェントが、承認済みのお知らせをDiscordのデスクトップアプリからあなたとして投稿できるよう支援します。投稿前に正確なチャンネルを確認します。
discrawl
394k保存済みのローカルなDiscordメッセージのアーカイブを検索して要約し、その新しさを確認し、ダイレクトメッセージを読めるようエージェントを支援します。
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
graincrawl
394k保存されたGranolaのミーティングメモとトランスクリプトを検索し、その新しさを確認して、一定期間の件数を数えるようエージェントを支援します。
似ているスキル
executing-plans
311k書かれた実装計画を、現在のセッションの中で段階的に実行し、次に進む前に各ステップをテストするようエージェントを支援します。
finishing-a-development-branch
311k完成したコードを、テストを実行してから、マージ、プルリクエストの作成、またはブランチの保持という明確な選択肢を示すことで仕上げるようエージェントを支援します。
receiving-code-review
311kコードレビューのフィードバックを慎重に検討し、変更を加える前に、各指摘がコードに照らして正しいかを確認するようエージェントを支援します。