Claude-skill-registry github
Execute GitHub operations (PRs, issues, milestones, labels, comments, merges)
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/github" ~/.claude/skills/majiayu000-claude-skill-registry-github && rm -rf "$T"
manifest:
skills/data/github/SKILL.mdsource content
GitHub Skill
Use these scripts instead of raw
gh commands for consistent error handling and structured output.
Triggers
| Phrase | Operation |
|---|---|
| Get-PRContext.ps1 |
| Post-PRCommentReply.ps1 |
| Get-PRChecks.ps1 |
| Set-IssueLabels.ps1 |
| Set-ItemMilestone.ps1 |
Decision Tree
Need GitHub data? ├─ List PRs (filtered) → Get-PullRequests.ps1 ├─ PR info/diff → Get-PRContext.ps1 ├─ CI check status → Get-PRChecks.ps1 ├─ CI failure logs → Get-PRCheckLogs.ps1 ├─ Review comments → Get-PRReviewComments.ps1 ├─ Review threads → Get-PRReviewThreads.ps1 ├─ Unique reviewers → Get-PRReviewers.ps1 ├─ Unaddressed bot comments → Get-UnaddressedComments.ps1 ├─ PR merged check → Test-PRMerged.ps1 ├─ Copilot follow-up PRs → Detect-CopilotFollowUpPR.ps1 ├─ Issue info → Get-IssueContext.ps1 ├─ Merge readiness check → Test-PRMergeReady.ps1 ├─ Latest milestone → Get-LatestSemanticMilestone.ps1 └─ Need to take action? ├─ Create issue → New-Issue.ps1 ├─ Create PR → New-PR.ps1 ├─ Reply to review → Post-PRCommentReply.ps1 ├─ Reply to thread (GraphQL) → Add-PRReviewThreadReply.ps1 ├─ Comment on issue → Post-IssueComment.ps1 ├─ Add reaction → Add-CommentReaction.ps1 ├─ Apply labels → Set-IssueLabels.ps1 ├─ Set issue milestone → Set-IssueMilestone.ps1 ├─ Set PR/issue milestone (auto-detect) → Set-ItemMilestone.ps1 ├─ Assign issue → Set-IssueAssignee.ps1 ├─ Resolve threads → Resolve-PRReviewThread.ps1 ├─ Process AI triage → Invoke-PRCommentProcessing.ps1 ├─ Assign Copilot → Invoke-CopilotAssignment.ps1 ├─ Enable/disable auto-merge → Set-PRAutoMerge.ps1 ├─ Close PR → Close-PR.ps1 └─ Merge PR → Merge-PR.ps1
Script Reference
PR Operations (scripts/pr/
)
scripts/pr/| Script | Purpose | Key Parameters |
|---|---|---|
| List PRs with filters | , , , , , |
| PR metadata, diff, files | , , |
| CI check status, polling | , , , |
| Fetch logs from failing CI checks | , , |
| Paginated review comments with stale detection | , , , , |
| Thread-level review data | , |
| Enumerate unique reviewers | , |
| Bot comments needing attention | |
| Unresolved thread IDs | |
| Check if PR is merged | |
| Detect Copilot follow-up PRs | , , |
| Thread-preserving replies | , , |
| Reply to thread by ID (GraphQL) | , , |
| Mark threads resolved | or |
| Mark threads unresolved | or |
| Get single thread by ID | |
| Full thread comment history | , |
| Check merge readiness | , , |
| Enable/disable auto-merge | , /, |
| Process AI triage output | , , |
| Create PR with validation | , , |
| Close PR with comment | , |
| Merge with strategy | , , , |
Issue Operations (scripts/issue/
)
scripts/issue/| Script | Purpose | Key Parameters |
|---|---|---|
| Issue metadata | |
| Create new issue | , , |
| Apply labels (auto-create) | , , |
| Assign milestone | , |
| Comments with idempotency | , , |
| Synthesize context for Copilot | , |
| Assign users to issues | , |
Milestone Operations (scripts/milestone/
)
scripts/milestone/| Script | Purpose | Key Parameters |
|---|---|---|
| Detect latest semantic version milestone | , |
| Assign milestone to PR/issue (auto-detect) | , , |
Reactions (scripts/reactions/
)
scripts/reactions/| Script | Purpose | Key Parameters |
|---|---|---|
| Add emoji reactions (batch support) | , , |
Output Format
All scripts output structured JSON with
Success boolean:
$result = pwsh -NoProfile scripts/pr/Get-PRContext.ps1 -PullRequest 50 | ConvertFrom-Json if ($result.Success) { ... }
Process
This skill provides a toolkit of PowerShell scripts for GitHub operations. Use scripts directly or compose them into workflows.
Basic Usage:
- Identify the operation needed using the Decision Tree
- Find the corresponding script in the Script Reference
- Call the script with required parameters
- Parse the JSON output and check
fieldSuccess
Example Flow:
# Get PR context $pr = pwsh scripts/pr/Get-PRContext.ps1 -PullRequest 123 | ConvertFrom-Json # Check CI status $checks = pwsh scripts/pr/Get-PRChecks.ps1 -PullRequest 123 | ConvertFrom-Json # Add comment if needed if ($checks.FailedCount -gt 0) { pwsh scripts/pr/Post-PRCommentReply.ps1 -PullRequest 123 -Body "CI failures detected" }
Anti-Patterns
| Avoid | Why | Instead |
|---|---|---|
Raw commands | No structured output | Use |
Raw for comments | Doesn't preserve threading | Use |
| Replying to thread expecting auto-resolve | Replies DON'T auto-resolve threads | Use after reply |
| Inline issue creation | Missing validation | Use |
| Multiple individual reactions | 88% slower | Use batch mode in |
| Hardcoding owner/repo | Breaks in forks | Let scripts infer from |
| Ignoring exit codes | Missing error handling | Check |
| Skipping idempotency markers | Duplicate comments | Use parameter |
See Also
| Document | Content |
|---|---|
| examples.md | Complete script examples |
| patterns.md | Reusable workflow patterns |
| copilot-prompts.md | Creating @copilot directives |
| copilot-synthesis-guide.md | Copilot context synthesis |
| api-reference.md | Exit codes, API endpoints, troubleshooting |
| Shared helper functions |
Verification
Before completing a GitHub operation:
- Correct script selected from Decision Tree
- Required parameters provided (PR/issue number)
- Response JSON parsed successfully
-
in responseSuccess: true - State change verified (for mutating operations)