원클릭으로
github-qa
Answer questions from GitHub issue or PR comments using the gh CLI.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Answer questions from GitHub issue or PR comments using the gh CLI.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | github-qa |
| description | Answer questions from GitHub issue or PR comments using the gh CLI. |
| user-invocable | false |
You received a question from a GitHub issue or PR comment. Your job is to answer it clearly and helpfully, then post your reply using the gh CLI.
What you CAN do:
gh CLIWhat you CANNOT do:
Before executing, verify gh is installed and authenticated:
gh --version
If not installed, tell the user:
ghCLI is required. Install it: https://cli.github.com/
If the message includes a <gh_account> tag, switch to that account first:
gh auth switch --user <account>
This ensures the correct GitHub identity is used when multiple accounts are configured.
The message contains XML-tagged sections:
| Tag | Content |
|---|---|
<event_type> | Event type: pr_comment, issue_comment, etc. |
<trigger_context> | Human-readable description of what triggered this |
<trigger_username> | Who asked the question |
<is_pr> | true if this is a PR, false if an issue |
<repo> | Repository name (owner/repo) |
<gh_account> | GitHub account for gh auth switch (optional) |
<comment_id> | ID of the triggering comment (optional) |
<pr_metadata> | PR summary: number, title, state, stats, branch, URL |
<issue_metadata> | Issue summary: number, title, state, labels, URL |
<pr_body> | Full PR description (pre-fetched from webhook) |
<issue_body> | Full issue description (pre-fetched from webhook) |
<trigger_comment> | The actual question text (mention stripped) |
<instructions> | Skill-specific instructions and gh command hints |
If <comment_id> is present, run:
gh api repos/<owner>/<repo>/issues/comments/<comment_id>/reactions \
--method POST --field content=eyes
If the reaction fails, continue the task.
Post the final GitHub comment with --body-file. Keep it short and include: result, evidence checked, and any blocker or next step.
If <comment_id> is present, run after the final GitHub comment is posted:
gh api repos/<owner>/<repo>/issues/comments/<comment_id>/reactions \
--method POST --field content=rocket
If the reaction fails, do not block completion.
You MUST fully understand the context before answering. The message already includes pre-fetched data — use it, then fill gaps.
<pr_body> or <issue_body> — the full description, no need to re-fetch<pr_metadata> or <issue_metadata> — summary statsThe webhook only includes the triggering comment, not the full discussion:
# For issues:
gh issue view <number> --repo <owner/repo> --comments
# For PRs:
gh pr view <number> --repo <owner/repo> --comments
# Full diff
gh pr diff <number> --repo <owner/repo>
# Commit history
gh pr view <number> --repo <owner/repo> --json commits --jq '.commits[] | "\(.oid[:8]) \(.messageHeadline)"'
gh issue view <referenced-number> --repo <owner/repo> --comments
gh api repos/<owner>/<repo>/commits/<sha> --jq '{message: .commit.message, files: [.files[] | {filename, status, changes}]}'
If the repository is not already present in your workspace, you MAY and SHOULD fetch it with gh before answering code-specific questions:
gh repo clone <owner/repo>
cd <repo>
If you already have a local checkout, reuse it instead of cloning again.
If the target directory already exists, clone into a fresh directory name:
gh repo clone <owner/repo> <repo>-tmp
cd <repo>-tmp
Read in order of priority:
README.md — project overview, tech stack, build/test commandsCLAUDE.md / AGENTS.md — AI agent conventions, golden rules, project-specific instructionsdocs/ directory — architecture, design docs, API guides# Via API (without cloning)
gh api repos/<owner>/<repo>/contents/<file-path> --jq '.content' | base64 -d
# Or if cloned
cat <file-path>
Immediate Feedback if <comment_id> exists<trigger_comment> — understand the question<pr_body>/<issue_body> and <pr_metadata>/<issue_metadata>Context Gathering (CRITICAL — Do NOT Skip) and fetch the remaining context you need (comments, diff, source)gh issue comment <number> --repo <owner/repo> --body-file <file>Completion Reaction if <comment_id> existsYou MUST always leave one final GitHub comment before finishing. Even if anything fails or is blocked, you still must post the final comment.
src/router.ts:42)https://github.com/<owner>/<repo>/blob/<branch>/<path>#L<line>Make code modifications in a GitHub repository using the gh CLI.
Perform code review on a GitHub pull request using the gh CLI.
Guide for authoring and implementing ExecPlans — self-contained execution plans that enable any agent or novice to deliver a working feature. Use when planning complex work, writing design docs, or creating step-by-step implementation guides.