一键导入
github-pr-workflow
Use when creating, updating, or managing pull requests — automates the full PR lifecycle (open, review requests, labels, merge) via GitHub MCP
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating, updating, or managing pull requests — automates the full PR lifecycle (open, review requests, labels, merge) via GitHub MCP
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when research or domain knowledge keeps getting rediscovered across sessions — build a supplementary markdown wiki that compounds synthesized knowledge without replacing GitHub or committed project guidance
Use when you need to build a new MCP server — plan the tool surface, implement the server, register it in Copilot CLI, inspect the config, and test the tools end to end.
Use when delegated work needs runtime guardrails — constrain sub-agents with loop detection, circuit breakers, and escalating sandbox levels before accepting their output
Use when reviewing the source code of an MCP server or client implementation — not just its runtime config — for authentication, session, rate-limit, schema-validation, and SDK-usage vulnerabilities, with file/line-cited findings mapped to OWASP Top 10
Use when you need to evaluate an LLM pipeline or AI feature systematically — sets up an eval harness with test cases, scoring rubrics, and pass/fail tracking rather than one-off manual spot-checks
Use when a question requires comprehensive evidence gathering from multiple sources, systematic synthesis, and traceable citations — produces a structured research brief rather than a quick answer
| name | github-pr-workflow |
| description | Use when creating, updating, or managing pull requests — automates the full PR lifecycle (open, review requests, labels, merge) via GitHub MCP |
| metadata | {"category":"copilot-exclusive","copilot_feature":"Built-in GitHub MCP server (pull_request_read, list_pull_requests, search_pull_requests)"} |
Copilot CLI ships with a built-in GitHub MCP server that provides native, authenticated access
to the GitHub API — no tokens to configure, no extensions to install. You can list, search, read,
diff, and check CI status on pull requests using structured tool calls. Claude Code has no
equivalent built-in integration; it must shell out to gh CLI or raw curl commands with
manual token management.
Use list_pull_requests to see what needs attention:
Tool: github-mcp-server-list_pull_requests
owner: "my-org"
repo: "my-app"
state: "open"
sort: "updated"
direction: "desc"
perPage: 10
Dive into the code changes with pull_request_read:
Tool: github-mcp-server-pull_request_read
method: "get_diff"
owner: "my-org"
repo: "my-app"
pullNumber: 142
See if all checks are passing before you review:
Tool: github-mcp-server-pull_request_read
method: "get_check_runs"
owner: "my-org"
repo: "my-app"
pullNumber: 142
Pull up the review conversation:
Tool: github-mcp-server-pull_request_read
method: "get_review_comments"
owner: "my-org"
repo: "my-app"
pullNumber: 142
Find PRs from a specific contributor:
Tool: github-mcp-server-search_pull_requests
query: "author:octocat is:open"
owner: "my-org"
repo: "my-app"
"List all open PRs in my-org/api-service sorted by most recently updated, then for each one show me the CI status and a one-line summary of changes."
Copilot calls list_pull_requests, iterates results, calls get_check_runs and
get_files on each, and returns a concise triage report.
# Stage and commit your changes first
git add -A && git commit -m "feat: add caching layer"
# Then ask Copilot:
# "Create a PR for my current branch targeting main. Generate the description
# from my commit messages and include a testing checklist."
Copilot reads your git log, drafts a structured PR body, and uses gh pr create
to open it — all without you writing a single line of markdown.
"Find all open PRs across my-org that mention 'database migration' in the title"
Tool: github-mcp-server-search_pull_requests
query: "database migration in:title is:open org:my-org"
get_diff, get_check_runs, and
get_review_comments in parallel for the same PR — much faster than sequential gh calls.search_pull_requests supports GitHub's full search syntax
including labels, milestones, review status, and date ranges.get_check_runs before diving into a diff review.
If CI is red, focus on the failure first.page and perPage parameters to handle repositories
with hundreds of open PRs without overwhelming your context window.Automate the full Copilot Code Review cycle: request → monitor → triage → fix → resolve → re-trigger.
Inspired by the copilot-pr-autopilot pattern from github/awesome-copilot PR #1944.
1. Request Copilot Code Review on the PR
2. Poll until review is complete (status: "completed" or "action_required")
3. Triage open review threads:
- Actionable → fix in code
- Outdated / resolved by other changes → reply + resolve
4. Commit fixes with a targeted message
5. Re-trigger Copilot Code Review
6. Repeat until no actionable threads remain
Use gh api graphql for thread-level operations that the REST API does not expose:
# List unresolved review threads on a PR
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 50) {
nodes { id isResolved isOutdated comments(first: 1) { nodes { body } } }
}
}
}
}
' -f owner=MY-ORG -f repo=MY-REPO -F pr=142
# Resolve a specific thread after fixing
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) { thread { id isResolved } }
}
' -f threadId=THREAD_ID
| Thread state | Action |
|---|---|
| Actionable, code not fixed | Fix in source, then resolve |
| Outdated (code changed since comment) | Reply "Addressed by [commit]", then resolve |
| Duplicate of a resolved thread | Resolve without reply |
| Requires discussion | Leave open, note for human reviewer |
For repositories where you lack Triage/Write permissions, run one iteration only:
resolveReviewThread — check viewerCanResolveThread in the GraphQL query