Communitygithub.com

GitHub CLI (gh) 통합

터미널에서 직접 이슈, 풀 리퀘스트, 브랜치, 커밋, 코드 리뷰 등 GitHub 작업을 관리하는 CLI 도구입니다.

GitHub CLI (gh) 통합란 무엇인가요?

이 스킬은 GitHub CLI (`gh`)를 활용하여 브라우저로 전환하지 않고도 터미널에서 GitHub 저장소, 이슈, 풀 리퀘스트, GitHub Actions 워크플로우를 완전히 제어할 수 있도록 합니다. 이슈 생성/목록 조회/수정/댓글 추가, 브랜치 생성 및 커밋, 풀 리퀘스트 생성/검토/병합, GitHub Actions 워크플로우 실행 및 로그 확인 등 개발자의 일상적인 GitHub 작업을 CLI 명령어로 간편하게 수행합니다. 에이전트에게 이 스킬을 추가하면 Claude가 사용자 저장소와 직접 상호작용하여 작업을 자동화하고 개발 워크플로우를 가속화할 수 있습니다. macOS, Linux, Windows를 모두 지원하며, 사전에 `gh` CLI가 설치되고 GitHub 계정으로 인증되어 있어야 합니다. 기본 명령어 외에도 `--web` 플래그로 브라우저 열기, `--repo` 플래그로 다른 저장소 지정 등 다양한 고급 옵션을 제공합니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cdcoonce/Portfolio_Website/tree/HEAD/.claude/skills/github-cli

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

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

문서

GitHub CLI (gh) 스킬

gh CLI를 사용하여 터미널에서 GitHub 저장소, 이슈, 풀 리퀘스트, GitHub Actions 워크플로우와 상호작용합니다.

사전 요구 사항

gh가 설치되고 인증되었는지 확인합니다:

gh --version
gh auth status

인증되지 않은 경우 gh auth login을 실행하고 프롬프트를 따릅니다.

핵심 워크플로우

이슈 관리

# 이슈 목록
gh issue list                             # 현재 저장소의 열린 이슈
gh issue list --state all                 # 닫힌 이슈 포함 전체
gh issue list --assignee @me              # 나에게 할당된 이슈
gh issue list --label "bug"               # 레이블로 필터링

# 이슈 생성
gh issue create -t "제목" -b "설명"
gh issue create -t "제목" --label "bug,priority:high" --milestone "milestone-1"
gh issue create                           # 대화형 모드

# 이슈 조회/수정
gh issue view 123                         # 이슈 세부 정보 보기
gh issue view 123 --web                   # 브라우저에서 열기
gh issue edit 123 --add-label "in-progress"
gh issue close 123
gh issue reopen 123

# 댓글 추가
gh issue comment 123 -b "지금 작업 중입니다"

브랜치 및 커밋 워크플로우

# 기능/수정 브랜치 생성
git checkout -b feature/my-feature
git checkout -b fix/issue-123
git checkout -b draft/wip-experiment

# 변경 사항 스테이징 및 커밋
git add .
git commit -m "feat: 새 기능 추가"
git commit -m "fix: 이슈 #123 해결"

# 브랜치를 원격으로 푸시
git push -u origin feature/my-feature

풀 리퀘스트 관리

# PR 생성 (여러 방법)
gh pr create                              # 대화형 모드
gh pr create --fill                       # 커밋 메시지로 자동 채우기
gh pr create --draft                      # 드래프트로 생성
gh pr create --draft --fill               # 자동 채우기 드래프트
gh pr create -t "제목" -b "설명" -B main
gh pr create --label "review-needed" --assignee @me

# PR 목록
gh pr list                                # 열린 PR
gh pr list --assignee @me                 # 내 PR
gh pr list --search "review-requested:@me"  # 내 리뷰 요청된 PR
gh pr list --draft                        # 드래프트 PR만

# PR 세부 정보 보기
gh pr view 45                             # 터미널에서 PR 보기
gh pr view 45 --web                       # 브라우저에서 열기

코드 리뷰 워크플로우

# 테스트를 위해 로컬에서 PR 체크아웃
gh pr checkout 45                         # PR 브랜치를 로컬로 체크아웃

# 변경 사항 검토
gh pr diff 45                             # PR diff 보기
gh pr diff                                # 현재 브랜치 PR의 diff

# 리뷰 댓글 추가
gh pr comment 45 -b "LGTM, 42번 줄에 사소한 제안"
gh pr comment -b "테스트를 추가해 주세요"  # 현재 브랜치 PR에 댓글

# 공식 리뷰 제출
gh pr review 45 --approve
gh pr review 45 --request-changes -b "오류 처리를 수정해 주세요"
gh pr review 45 --comment -b "전반적으로 좋습니다. 몇 가지 제안"

# 병합
gh pr merge 45                            # 대화형 병합
gh pr merge 45 --squash                   # 스쿼시 병합
gh pr merge 45 --rebase                   # 리베이스 병합
gh pr merge 45 --merge                    # 표준 병합 커밋
gh pr merge 45 --auto                     # 검사 통과 시 자동 병합

기존 PR 업데이트

gh pr edit 45 --title "새 제목"
gh pr edit 45 --body "업데이트된 설명"
gh pr edit 45 --base develop
gh pr edit 45 --add-label "ready-for-review"
gh pr ready 45                            # 준비 완료 표시 (드래프트 해제)

GitHub Actions 워크플로우 관리

# 워크플로우 실행 목록
gh run list                               # 최근 워크플로우 실행
gh run list --workflow=ci.yml             # 특정 워크플로우
gh run list --status=failure              # 실패한 실행만

# 워크플로우 실행 세부 정보 보기
gh run view                               # 대화형 실행 선택기
gh run view 12345                         # 특정 실행
gh run view 12345 --web                   # 브라우저에서 열기

# 워크플로우 트리거
gh workflow run ci.yml                    # 기본 브랜치에서 실행
gh workflow run ci.yml --ref feature/x    # 특정 브랜치에서 실행
gh workflow run ci.yml -f key=value       # 입력 매개변수 포함

# 실패한 작업 재실행
gh run rerun 12345                        # 모든 작업 재실행
gh run rerun 12345 --failed               # 실패한 작업만 재실행

# 작업 로그 보기
gh run view 12345 --log                   # 전체 로그 출력
gh run view 12345 --log-failed            # 실패한 작업 로그만

# 진행 중인 실행 감시
gh run watch                              # 현재 실행 감시
gh run watch 12345                        # 특정 실행 감시

공통 플래그 참조

플래그설명
-R, --repo OWNER/REPO다른 저장소 대상 지정
-B, --basePR의 기본 브랜치
-H, --headPR의 헤드 브랜치
-t, --title이슈/PR 제목
-b, --body이슈/PR 본문/설명
-l, --label레이블 (쉼표로 구분)
-a, --assignee담당자 사용자명
-m, --milestone마일스톤 이름
--draft드래프트 PR로 생성
--fill커밋 메시지로 자동 채우기
--web브라우저에서 열기
-y, --yes확인 프롬프트 건너뛰기

환경 변수

export GH_TOKEN="ghp_xxxx"               # 개인 액세스 토큰
export GH_HOST="github.example.com"      # GitHub Enterprise 인스턴스
export GH_REPO="owner/repo"              # 기본 저장소

팁 및 주의 사항

마크다운을 사용한 여러 줄 설명

코드 블록이나 백틱이 포함된 긴 설명으로 이슈나 PR을 생성할 때, 셸 해석 문제로 실패할 수 있는 히어독(heredocs)을 피하세요. 대신:

# 1단계: 설명을 임시 파일에 작성 (bash 외부에서)
# 2단계: 임시 파일에서 생성
gh issue create -t "제목" -b "$(cat temp_description.txt)"
# 3단계: 정리
rm temp_description.txt

이렇게 하면 다음 문제를 피할 수 있습니다:

  • 명령어 대체와 충돌하는 코드 블록의 백틱
  • 셸에 의해 해석되는 특수 문자
  • 히어독 구분자 충돌

기존 파일에서 설명 가져오기

마크다운 계획 파일에서 이슈나 PR을 생성하려면:

# 깔끔한 파일 기반 설명을 위해 body-file 플래그 사용
gh issue create -t "제목" --body-file docs/plans/my-plan.md
gh pr create -t "제목" --body-file docs/plans/my-plan.md

자세한 참조

포괄적인 명령 옵션과 예제는 references/commands.md를 참조하세요.

Individual skills in this repo

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

cdcoonce/Portfolio_Website

Git commit workflow with enforced conventional commit style. Use when Claude needs to stage and commit changes, craft commit messages, or the user asks to commit, make a commit, or save their work. Ensures consistent commit message format, proper scoping, and atomic commits across the project.

cdcoonce/Portfolio_Website

AI-powered code quality analysis for Python, Markdown, and Mermaid diagrams. Use this skill when: (1) reviewing code for quality issues, (2) checking Python files for PEP8 violations, unused code, missing type hints, docstring problems, complexity issues, or potential runtime errors, (3) validating Markdown documentation for broken links, heading structure, or formatting issues, (4) validating Mermaid diagram syntax, (5) the user asks for a "code review" or "quality check", (6) analyzing code snippets pasted in conversation, or (7) suggesting and applying fixes for code quality issues.

cdcoonce/Portfolio_Website

Deploy the portfolio chat agent Lambda function to AWS. Use when the user asks to deploy, redeploy, push to Lambda, update the chat agent, or after updating context files or lambda_function.py. Rebuilds the knowledge base, packages dependencies, and deploys to AWS Lambda.

cdcoonce/Portfolio_Website

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

cdcoonce/Portfolio_Website

Orchestrate the full GitHub-issues-driven development lifecycle. 7-phase pipeline from brainstorm through PR with state tracking and cross-conversation resume. Use when user says "dev cycle", "development workflow", "full development pipeline", or invokes /dev-cycle.

cdcoonce/Portfolio_Website

Production Python coding standards with automatic version detection (3.10-3.13). Use when writing, reviewing, or refactoring Python to ensure adherence to modern type syntax, LBYL exception handling, pathlib operations, ABC-based interfaces, and production-tested patterns. Not Dagster-specific - applies to any Python project.

cdcoonce/Portfolio_Website

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

cdcoonce/Portfolio_Website

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

cdcoonce/Portfolio_Website

Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.

cdcoonce/Portfolio_Website

CEO/founder-mode plan review. Rethink the problem, find the 10-star product, challenge premises, expand scope when it creates a better product. Three modes: SCOPE EXPANSION (dream big), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials). Use when the user asks for a plan review, CEO review, mega review, or wants a plan challenged/stress-tested before implementation.

cdcoonce/Portfolio_Website

Break a PRD into independently-grabbable GitHub issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.

cdcoonce/Portfolio_Website

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in docs/plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".

cdcoonce/Portfolio_Website

Generate or update the `.claude/docs/project.md` file that gives Claude project-specific context. Use this skill when the user asks to create, update, regenerate, or refresh project context, or says things like "update project.md", "generate project context", "this repo needs a project.md", or "Claude doesn't know about this project". Also trigger when onboarding Claude to a new repository for the first time.

cdcoonce/Portfolio_Website

Generate comprehensive, high-quality README.md files for code repositories. Use this skill whenever the user asks to create, write, generate, update, or improve a README for any project or repository. Also trigger when the user says things like "document this project", "write docs for this repo", "this repo needs a README", "help me onboard developers to this codebase", or asks for project documentation in markdown. Even if the user just says "README" or "readme" in the context of a codebase, use this skill.

cdcoonce/Portfolio_Website

Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

cdcoonce/Portfolio_Website

Set up pre-commit hooks for the current repo. Use when user wants to add pre-commit hooks, configure commit-time linting, formatting, type checking, or testing. Triggers on "pre-commit", "git hooks", "linting hooks", or /setup-pre-commit.

cdcoonce/Portfolio_Website

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

cdcoonce/Portfolio_Website

Triage a bug or issue by exploring the codebase to find root cause, then create a GitHub issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions "triage", or wants to investigate and plan a fix for a problem.

cdcoonce/Portfolio_Website

Rewrites the prose sections of wiki pages in-place. Reads source files to understand current context, then updates only the content inside <!-- claude:prose --> ... <!-- claude:prose:end --> markers. Never touches <!-- generated:start --> ... <!-- generated:end --> blocks. Supports targeting a single page with /update-wiki {PageName}.

cdcoonce/Portfolio_Website

Create a PRD through user interview, codebase exploration, and module design, then submit as a GitHub issue. Use when user wants to write a PRD, create a product requirements document, or plan a new feature.

관련 스킬