{"id":"claude-code-github-actions","kind":"workflow","testedWith":[],"durationMin":20,"url":"https://opencurrent.ai/w/claude-code-github-actions","title":"GitHub Actions로 PR 리뷰받기","summary":"PR을 열 때마다 GitHub Actions에서 Claude Code가 리뷰 댓글을 달아 주어, 사람이 보기 전에 놓친 문제를 먼저 걸러 냅니다.","category":"개발","categoryId":"dev","domain":"dev","domainLabel":"개발","capabilities":[{"id":"code","label":"코드 작성"},{"id":"integrate","label":"앱 연동·자동화"}],"topics":[{"id":"dev","label":"개발"}],"tools":["Claude Code"],"whenToUse":"/install-github-app으로 GitHub 앱과 비밀값을 넣고, PR이 열릴 때 돌 워크플로를 추가합니다. 댓글에 @claude를 달면 그 자리에서 고치거나 답하게 하는 워크플로도 함께 둘 수 있습니다. 명령과 설정 이름은 2026년 11월 21일에 Claude Code 공식 문서로 확인했습니다.","prerequisites":["Claude Code 설치와 로그인"],"inputs":[],"howToFollow":"1. 준비물이 갖춰졌는지 먼저 확인할 것.\n2. 단계를 순서대로 진행할 것. kind가 \"ai\"면 프롬프트를 실행하고, \"command\"면 사용자의 허락을 받고 명령을 실행하고, \"human\"이면 사용자에게 할 일을 안내하고 끝났는지 물을 것. tool이 있으면 그 도구·모델로 할 것.\n3. 단계에 output(결과 이름)이 있으면 그 단계 결과를 뒤 단계 프롬프트의 {{output}} 자리에 넣을 것.\n4. 단계마다 expected(기대 결과)와 check(확인 방법)로 제대로 됐는지 확인하고, 다르면 다음 단계로 넘어가지 말고 사용자에게 알릴 것. 끝나면 example.output(있으면)과 비교할 것.\n5. 검증 상태가 verified가 아니면 그 사실을 사용자에게 먼저 알릴 것. 답에 url을 출처로 밝힐 것.","steps":[{"n":1,"kind":"command","title":"앱과 비밀값 설치","body":"저장소 관리자 권한으로 Claude Code에서 /install-github-app을 실행합니다. Claude GitHub 앱을 설치하고 ANTHROPIC_API_KEY 또는 CLAUDE_CODE_OAUTH_TOKEN을 저장소 비밀값으로 넣어 줍니다.","prompt":"/install-github-app","expected":"설치된 Claude 앱과 저장소 비밀값","check":"저장소 Settings > Secrets에 키 이름이 보이는지 확인","tool":"Claude Code"},{"n":2,"kind":"human","title":"PR 자동 리뷰 워크플로","body":".github/workflows/claude-review.yml을 만듭니다. 공식 code-review 플러그인을 불러 PR에 인라인 댓글을 답니다. prompt의 --comment가 있어야 PR에 댓글이 달립니다.","prompt":"name: Code Review\non:\n  pull_request:\n    types: [opened, synchronize, ready_for_review, reopened]\njobs:\n  review:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: read\n      issues: read\n      id-token: write\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          fetch-depth: 1\n      - uses: anthropics/claude-code-action@v1\n        with:\n          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}\n          plugin_marketplaces: \"https://github.com/anthropics/claude-plugins-official.git\"\n          plugins: \"code-review@claude-plugins-official\"\n          prompt: \"/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}\"\n          claude_args: '--allowedTools \"mcp__github_inline_comment__create_inline_comment\"'","expected":"리뷰 워크플로 파일","check":"커밋 후 Actions 탭에 Code Review 워크플로가 보이는지 확인","tool":"Claude Code"},{"n":3,"kind":"human","title":"@claude로 부르는 워크플로 (선택)","body":"PR이나 이슈 댓글에 @claude를 달면 응답하게 하려면 prompt 없이 액션을 둡니다. 쓰기 권한이 있는 사람이 단 댓글만 처리합니다.","prompt":"on:\n  issue_comment:\n    types: [created]\n  pull_request_review_comment:\n    types: [created]\njobs:\n  claude:\n    if: contains(github.event.comment.body, '@claude')\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n      issues: write\n      id-token: write\n      actions: read\n    steps:\n      - uses: actions/checkout@v6\n        with:\n          fetch-depth: 1\n      - uses: anthropics/claude-code-action@v1\n        with:\n          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}","expected":"@claude 워크플로 파일","check":"PR 댓글에 @claude를 달아 응답 댓글이 오는지 확인","tool":"Claude Code"},{"n":4,"kind":"human","title":"시험 PR 열기","body":"작은 변경으로 PR을 열고 워크플로가 끝날 때까지 기다립니다.","expected":"PR의 리뷰 댓글","check":"Actions 실행이 성공으로 끝나고 PR에 댓글이 달렸는지 확인","tool":"Claude Code"}],"pitfalls":["공개 저장소의 포크 PR에는 비밀값이 전달되지 않아 리뷰가 돌지 않음","API 키로 돌리면 실행마다 요금 발생. claude_args의 --max-turns로 한도 두기","id-token: write 권한이 빠지면 기본 GitHub 앱 인증이 실패","예전 @beta 태그를 쓰고 있으면 @v1로 바꾸기"],"sources":[{"title":"Claude Code 문서: GitHub Actions","url":"https://code.claude.com/docs/en/github-actions"},{"title":"claude-code-action 입력값","url":"https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md"}],"verification":{"status":"pending","label":"검수 대기","detail":"사람 확인 전","verifiedBy":0,"lastVerifiedAt":null},"quality":{"score":32,"components":{"result":0.5,"trust":0,"freshness":0.4},"explanation":"확인 없음 · 검수 대기"},"workedFor":0,"trials":{"summary":"","lastAt":null,"total":0,"worked":0,"partial":0,"failed":0,"recent":[]},"asOf":{"date":"2026-11-21T10:00:00+00:00","basis":"updated"},"updatedAt":"2026-11-21T10:00:00+00:00","goals":[{"id":"dev","title":"개발"}],"uses":0,"likes":0}