com um clique
setup-pr-analysis
// Set up the local environment for analyzing a specific PR/issue pair. Use this before running the bug-analyzer agent to checkout the parent commit and prepare context files.
// Set up the local environment for analyzing a specific PR/issue pair. Use this before running the bug-analyzer agent to checkout the parent commit and prepare context files.
Fetch bug-fix PRs with linked issues from a GitHub repository. Use this when asked to find PRs that fix bugs, especially when needing to analyze the relationship between PRs and their linked issues.
Compile bug fix proposals and validation results into a markdown report. Use this after running bug-analyzer and fix-validator on multiple PRs.
| name | setup-pr-analysis |
| description | Set up the local environment for analyzing a specific PR/issue pair. Use this before running the bug-analyzer agent to checkout the parent commit and prepare context files. |
This skill prepares the local environment for analyzing a bug-fix PR by checking out the parent commit and gathering context.
Run the setup.sh script with the following parameters:
./setup.sh --pr <number> --issue <number> --repo <owner/repo> --clone-path <path> [--output-dir <path>] [--tags <comma-separated>]
| Parameter | Required | Description | Example |
|---|---|---|---|
--pr | Yes | PR number to analyze | 12345 |
--issue | Yes | Linked issue number | 12340 |
--repo | Yes | Repository in owner/repo format | microsoft/vscode |
--clone-path | Yes | Path to local repo clone | /Users/penlv/Code/Work/vscode2 |
--output-dir | No | Directory for context files (default: data/analysis/<pr>, but issue-keyed output is also supported) | ./context |
--tags | No | Comma-separated tags for categorization | sessions,error-telemetry |
# Setup analysis for PR #12345 linked to issue #12340
./.github/skills/setup-pr-analysis/setup.sh \
--pr 12345 \
--issue 12340 \
--repo microsoft/vscode \
--clone-path /Users/penlv/Code/Work/vscode2
issue.md - Issue title, body, and commentsmetadata.json - PR/issue metadata (no model info)actual_fix/pr.md - PR title, body, and commit messages (for fix-validator only)actual_fix/pr-diff.patch - The actual PR diff (for validator comparison)actual_fix/changed-files.txt - List of files changed in the PRdata/analysis/<pr>/
├── issue.md # Issue context for bug-analyzer
├── metadata.json # PR/issue metadata
└── actual_fix/ # Real solution (for fix-validator only)
├── pr.md # PR description
├── pr-diff.patch # Actual fix diff
└── changed-files.txt
gh CLI installed and authenticatedjq for JSON processingGitHub CLI calls are retried on primary/secondary rate-limit responses. Tune with:
GH_RETRY_MAX - retry attempts, default 5GH_RETRY_BASE_DELAY - fallback delay multiplier in seconds, default 10GH_RETRY_MAX_DELAY - maximum sleep between retries in seconds, default 300Authentication and SSO failures are not retried.
For issue-centric batches such as a month of bug issues, use the batch helper:
./.github/skills/setup-pr-analysis/setup-batch.sh \
--input data/prs-with-issues-2026-03.md \
--clone-path /Users/penlv/Code/Work/vscode \
--key-by issue \
--tags round-2,2026-03,bug
This reads the markdown manifest, skips retrospective rows by default, and refreshes each analysis directory with full metadata and actual-fix artifacts.