Community코딩 & 개발github.com

gh-issues

GitHub 이슈를 가져와 후보를 선택하고, 백그라운드 수정 에이전트를 실행하며, PR을 열고, 선택적으로 PR 리뷰 코멘트를 처리합니다.

gh-issues란 무엇인가요?

이 스킬은 GitHub 이슈를 PR로 자동화하는 도구입니다. 주로 `gh` CLI를 사용하며, 필요한 경우에만 `gh api`를 대체 수단으로 사용합니다. 지원하는 플랫폼은 Claude Code, Cursor, Codex 등의 AI 에이전트 환경이며, GitHub와의 통합을 통해 이슈를 가져오고, 중복 작업을 방지하며, 백그라운드에서 수정 에이전트를 실행하고 PR을 생성합니다. `--label`, `--milestone`, `--assignee` 등의 필터를 지원하고, `--fork` 모드로 포크에서 작업하고 원본 저장소에 PR을 보낼 수 있습니다. `--watch` 모드는 주기적으로 이슈와 리뷰를 확인하여 작업을 지속하며, `--reviews-only` 모드는 리뷰 코멘트 처리에 집중합니다. 작업자(worker) 에이전트는 수정을 구현, 테스트, 커밋, 푸시, PR 열기를 수행하며, 모든 과정은 추적 가능하고 안전하게 진행됩니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/gh-issues

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

gh-issues은(는) 무엇을 하나요?

이슈에서 PR로 자동화할 때 사용합니다. gh CLI를 우선 사용하고, 고급 명령어에 필요한 필드가 없을 때만 gh api로 대체합니다.

인수

  • 위치 인수 owner/repo: 선택 사항; 생략 시 git remote get-url origin에서 추론합니다.
  • --label <label>: 필터.
  • --limit <n>: 기본값 10.
  • --milestone <title>: 필터.
  • --assignee <login|@me>: 필터.
  • --state open|closed|all: 기본값 open.
  • --fork <owner/repo>: 브랜치를 포크에 푸시하고, PR은 원본 저장소로 보냅니다.
  • --watch: 이슈와 리뷰를 폴링합니다.
  • --interval <minutes>: 기본값 5.
  • --dry-run: 목록만 표시합니다.
  • --yes: 확인 없이 진행합니다.
  • --reviews-only: 이슈 수정을 건너뛰고 PR 리뷰를 처리합니다.
  • --cron: 실행 후 종료하며 --yes를 내포합니다.
  • --model <id>: 지원되는 경우 작업자에게 전달합니다.
  • --notify-channel <id>: 최종 알림 대상 (선택 사항).

1단계: 저장소 확인

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

gh auth status가 실패하고 GH_TOKEN이 없으면 중단하고 GitHub 인증/설정을 요청합니다.

파생값:

  • SOURCE_REPO: 이슈 저장소.
  • PUSH_REPO: 포크가 설정된 경우 포크, 아니면 소스.
  • BASE_BRANCH: 사용자가 별도로 지정하지 않으면 소스 저장소의 기본 브랜치.
  • PUSH_REMOTE: 포크 모드에서는 fork, 아니면 origin.

작업 트리가 더티(dirty) 상태이면 사용자가 커밋되지 않은 변경사항을 무시하도록 확인하지 않는 한 중단합니다.

포크 모드에서는 확인 전이나 --dry-run 중에는 리모트를 변경하지 않습니다.

인증/읽기 접근만 확인:

gh auth token >/dev/null || test -n "${GH_TOKEN:-}"
gh repo view "$PUSH_REPO" --json nameWithOwner
git ls-remote --exit-code origin HEAD

2단계: 이슈 가져오기

필터를 구성하고 가져오기:

gh issue list --repo "$SOURCE_REPO" --state open --limit 10 --json number,title,labels,url,body,assignees,milestone

요청에 따라 --label, --milestone, --assignee, --state, --limit을 추가합니다. gh issue list는 이미 PR을 제외합니다.

일치하는 항목이 없으면: 결과 없음 보고. --dry-run인 경우: 간결한 목록을 보여주고 중단합니다.

3단계: 중복 작업 방지

각 후보에 대해:

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

열린 PR, 기존 브랜치 또는 활성 로컬 클레임이 있는 후보는 건너뜁니다.

클레임 파일:

${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/gh-issues-<owner>-<repo>.json

2시간 이상 지난 클레임은 만료 처리합니다.

쓰기 전에 상위 디렉토리를 생성합니다.

4단계: 확인

--yes 또는 --cron이 아닌 경우, 사용자에게 선택을 요청합니다:

  • all
  • 쉼표로 구분된 이슈 번호
  • cancel

확인 후, 포크 모드에서는 작업자에게 작업을 넘기기 전에 푸시 리모트를 구성합니다:

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

5단계: 작업자 실행

최대 8개의 백그라운드 작업자를 실행합니다. --cron일 때는 각 작업자를 기다리지 않습니다.

각 작업자 실행 전에 현재 ISO 타임스탬프와 함께 SOURCE_REPO#<n>에 대한 클레임을 기록합니다. 작업자가 PR/실패를 보고하면 클레임을 제거하거나 업데이트합니다. 이는 브랜치나 PR이 존재하기 전에 watch/cron이 중복 실행되는 것을 방지합니다.

작업자 프롬프트에는 다음이 포함되어야 합니다:

  • 이슈 URL, 제목, 본문, 레이블.
  • SOURCE_REPO, PUSH_REPO, BASE_BRANCH, PUSH_REMOTE, 포크 모드.
  • 대상 브랜치 fix/issue-<n>.
  • 필요한 증거 및 PR 본문.
  • 알림 경로.

작업자 지침:

gh와 git을 사용하세요. 막연하게 설명하지 마세요.
BASE_BRANCH에서 fix/issue-<n>을 체크아웃/생성합니다.
최소한의 수정을 구현합니다.
관련 테스트를 실행합니다.
컨벤셔널 커밋 메시지로 커밋합니다.
PUSH_REMOTE에 푸시합니다.
SOURCE_REPO의 BASE_BRANCH에 대해 PR을 엽니다.
PR 본문: 해결하는 문제 + 변경 이유 + 사용자 영향 + 증거 + Fixes SOURCE_REPO#<n> (표시).
PR URL 또는 실패 사유를 보고합니다.
경로가 제공된 경우 openclaw message send로 완료/실패를 전송합니다.

가능한 경우 coding-agent 실행 규칙을 사용합니다.

6단계: 수집

process 또는 작업 레지스트리로 작업자를 폴링합니다. 보고:

  • 이슈 번호 + 제목.
  • 상태: PR 열림, 건너뜀, 실패, 시간 초과.
  • PR URL 또는 사유.

최종 간결한 요약만으로 채널에 알립니다.

리뷰 전용 / 리뷰 감시

열린 PR을 검색:

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

리뷰 스레드/코멘트를 가져옵니다:

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"

사용자가 명시적으로 PR 번호를 지정하지 않은 경우 이 워크플로우에서 생성된 fix/issue-* PR만 처리합니다. 실행 가능한 코멘트를 PR별로 그룹화합니다. 칭찬, 상태, 중복, 이미 처리된 코멘트는 무시합니다. 선택/범위가 지정된 PR당 하나의 작업자를 실행하며, 동일한 백그라운드 규칙을 적용합니다.

리뷰 작업자 지침:

PR 브랜치를 체크아웃합니다.
모든 실행 가능한 리뷰 코멘트를 읽습니다.
최소한의 변경 사항을 패치합니다.
관련 테스트를 실행합니다.
일반적으로 커밋하고 푸시합니다. 명시적으로 지시하지 않는 한 force-push하지 마세요.
수정 + 커밋/파일 참조를 포함하여 처리된 코멘트에 답글을 답니다.
처리된/건너뛴 코멘트와 증거를 보고합니다.

감시 모드

루프:

  1. 이슈를 가져옵니다.
  2. 적격 이슈 작업자를 실행합니다.
  3. 실행 가능한 PR 리뷰를 처리합니다.
  4. --interval 동안 대기합니다.
  5. 사용자가 중단을 요청하면 중단합니다.

누적 요약을 작게 유지합니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

관련 스킬