Use when retrieving PR context including metadata, diff, and changed files for code review planning. Trigger with /review-pr [PR_NUMBER].
npx claudepluginhub emasoft/emasoft-plugins --plugin emasoft-integrator-agentThis skill uses the workspace's default tool permissions.
This skill provides tools to retrieve comprehensive context about GitHub Pull Requests. Use this skill when you need to:
README.mdreferences/diff-analysis.mdreferences/op-analyze-pr-complexity.mdreferences/op-get-pr-context.mdreferences/op-get-pr-diff.mdreferences/op-get-pr-files.mdreferences/pr-metadata.mdscripts/__pycache__/atlas_get_pr_context.cpython-314.pycscripts/__pycache__/atlas_get_pr_diff.cpython-314.pycscripts/__pycache__/atlas_get_pr_files.cpython-314.pycscripts/eia_get_pr_context.pyscripts/eia_get_pr_diff.pyscripts/eia_get_pr_files.pyReviews GitHub pull requests using gh CLI, analyzing diffs for code quality, security, testing, best practices, and providing structured feedback.
Reviews GitHub pull requests with metadata, commits, file diffs, code suggestions, CI/CD status, and approval recommendations. Use /review-pr owner/repo pr-number.
Reviews GitHub pull requests end-to-end using gh CLI: analyzes diffs, commits, CI/CD checks; provides blocking/suggestion/nit/praise feedback and submits review. Use for assigned PRs, self-reviews, or post-merge audits.
Share bugs, ideas, or general feedback.
This skill provides tools to retrieve comprehensive context about GitHub Pull Requests. Use this skill when you need to:
Each script produces structured output for different PR analysis needs:
| Script | Output Format | Key Fields | Use Case |
|---|---|---|---|
eia_get_pr_context.py | JSON | number, title, state, author, mergeable, files[], labels[], reviewers[] | Complete PR overview for review planning |
eia_get_pr_files.py | JSON array | filename, status, additions, deletions, patch (optional) | File-level change tracking |
eia_get_pr_diff.py | Unified diff text or JSON stats | Diff hunks or files_changed, insertions, deletions | Code change inspection |
All JSON outputs are pretty-printed and can be piped to jq for filtering.
Follow these numbered steps to retrieve and analyze GitHub PR context:
Verify prerequisites are met
gh auth status to confirm GitHub CLI authenticationpython3 --version to confirm Python 3.8+ is availableIdentify which information you need
eia_get_pr_context.pyeia_get_pr_files.pyeia_get_pr_diff.pyRun the appropriate script with required parameters
--pr NUMBER (the PR number)--repo OWNER/REPO (defaults to current directory's repo)--stat for summary or --files for specific filesParse the output based on your task
jq or parse in your codeHandle errors appropriately
gh auth loginExtract specific information as needed
Copy this checklist and track your progress:
gh auth status)--pr NUMBER parameter| Scenario | Use This Skill |
|---|---|
| Starting a code review | Yes - get full PR context first |
| Need to know which files changed | Yes - use file listing script |
| Want to see actual code changes | Yes - use diff retrieval script |
| Need PR metadata (author, labels) | Yes - use context script |
| Creating a new PR | No - use git workflow skill instead |
| Commenting on a PR | Partially - get context first, then use gh CLI directly |
Need PR information?
├── Need full context (metadata + files + status)?
│ └── Use: eia_get_pr_context.py
│
├── Need only the list of changed files?
│ └── Use: eia_get_pr_files.py
│
├── Need to see the actual code diff?
│ ├── Want summary statistics only?
│ │ └── Use: eia_get_pr_diff.py --stat
│ ├── Want diff for specific files?
│ │ └── Use: eia_get_pr_diff.py --files file1.py file2.py
│ └── Want full diff?
│ └── Use: eia_get_pr_diff.py
Verify prerequisites:
# Check gh is authenticated
gh auth status
# Check Python version
python3 --version
| Script | Purpose | Key Arguments | Output |
|---|---|---|---|
eia_get_pr_context.py | Full PR metadata and status | --pr NUMBER, --repo OWNER/REPO | JSON with metadata, files, mergeable status |
eia_get_pr_files.py | List changed files | --pr NUMBER, --repo OWNER/REPO, --include-patch | JSON array of files with status |
eia_get_pr_diff.py | Get code diff | --pr NUMBER, --repo OWNER/REPO, --stat, --files | Diff text or JSON stats |
All scripts use standardized exit codes for consistent error handling:
| Code | Meaning | Description |
|---|---|---|
| 0 | Success | Output is valid JSON/text |
| 1 | Invalid parameters | Bad PR number, missing required args |
| 2 | Resource not found | PR does not exist |
| 3 | API error | Network, rate limit, timeout |
| 4 | Not authenticated | gh CLI not logged in |
| 5 | Idempotency skip | N/A for these scripts |
| 6 | Not mergeable | N/A for these scripts |
# Get context for PR #123 in current repo
python3 eia_get_pr_context.py --pr 123
# Get context for PR in specific repo
python3 eia_get_pr_context.py --pr 456 --repo owner/repo-name
# List files changed in PR #123
python3 eia_get_pr_files.py --pr 123
# Include patch/diff for each file
python3 eia_get_pr_files.py --pr 123 --include-patch
# Get full diff
python3 eia_get_pr_diff.py --pr 123
# Get statistics summary only
python3 eia_get_pr_diff.py --pr 123 --stat
# Get diff for specific files only
python3 eia_get_pr_diff.py --pr 123 --files src/main.py tests/test_main.py
For detailed information about PR metadata fields and how to extract specific information, see:
Contents:
For detailed information about interpreting PR diffs and analyzing changes, see:
Contents:
When delegating PR review tasks, use this skill to gather context first:
1. Get PR context with eia_get_pr_context.py
2. Analyze which files changed with eia_get_pr_files.py
3. Delegate file-specific reviews to subagents based on file types
4. Aggregate results and post review summary
| Problem | Cause | Solution |
|---|---|---|
| "gh: command not found" | GitHub CLI not installed | Install with brew install gh or see gh docs |
| "not logged into any GitHub hosts" | gh not authenticated | Run gh auth login |
| "Could not resolve to a PullRequest" | Wrong PR number or repo | Verify PR exists with gh pr view NUMBER |
| Rate limit errors | Too many API calls | Wait for rate limit reset or use --retry |
| Permission denied | No repo access | Verify you have read access to the repository |
For additional troubleshooting, run scripts with --verbose flag for detailed logging.