본문으로 건너뛰기
Skillpedia
일반 코딩394k · #55

gh-issues

하는 일

AI 에이전트가 GitHub 이슈를 골라 풀 리퀘스트로 바꾸도록 안내하며, 후보 이슈 선택부터 수정 작성, 리뷰 처리까지 다룹니다. 이슈 백로그를 더 빨리 정리하려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓백그라운드 에이전트의 도움으로 열린 GitHub 이슈를 정리하고 싶을 때.
  • ✓풀 리퀘스트에 처리해야 할 리뷰 댓글이 있을 때.
  • ✓작업을 시작하기 전에 어떤 이슈가 라벨이나 마일스톤과 맞는지 보고 싶을 때.

스킬 링크

https://github.com/openclaw/openclaw/blob/main/skills/gh-issues/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/openclaw/openclaw/blob/main/skills/gh-issues/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 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

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:

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 명령줄 도구에 로그인하거나 토큰을 제공해야 합니다.

저장소에서 새 이슈를 감시할 수 있나요?

예. watch 옵션을 사용하면 정해진 간격으로 이슈와 리뷰를 다시 확인합니다.

상세 정보

작성자의 원본 설명

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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬