GitHub CLI operations for issues, PRs, milestones, and Projects v2. Covers gh commands, REST API patterns, and automation scripts. Use when managing GitHub issues, PRs, milestones, or Projects with gh.
View on GitHubyonatangross/orchestkit
ork-cicd
January 25, 2026
Select agents to install to:
npx add-skill https://github.com/yonatangross/orchestkit/blob/main/plugins/ork-cicd/skills/github-operations/SKILL.md -a claude-code --skill github-operationsInstallation paths:
.claude/skills/github-operations/# GitHub Operations
Comprehensive GitHub CLI (`gh`) operations for project management, from basic issue creation to advanced Projects v2 integration and milestone tracking via REST API.
## Overview
- Creating and managing GitHub issues and PRs
- Working with GitHub Projects v2 custom fields
- Managing milestones (sprints, releases) via REST API
- Automating bulk operations with `gh`
- Running GraphQL queries for complex operations
---
## Quick Reference
### Issue Operations
```bash
# Create issue with labels and milestone
gh issue create --title "Bug: API returns 500" --body "..." --label "bug" --milestone "Sprint 5"
# List and filter issues
gh issue list --state open --label "backend" --assignee @me
# Edit issue metadata
gh issue edit 123 --add-label "high" --milestone "v2.0"
```
### PR Operations
```bash
# Create PR with reviewers
gh pr create --title "feat: Add search" --body "..." --base dev --reviewer @teammate
# Watch CI status and auto-merge
gh pr checks 456 --watch
gh pr merge 456 --auto --squash --delete-branch
```
### Milestone Operations (REST API)
```bash
# List milestones with progress
gh api repos/:owner/:repo/milestones --jq '.[] | "\(.title): \(.closed_issues)/\(.open_issues + .closed_issues)"'
# Create milestone with due date
gh api -X POST repos/:owner/:repo/milestones \
-f title="Sprint 8" -f due_on="2026-02-15T00:00:00Z"
# Close milestone
gh api -X PATCH repos/:owner/:repo/milestones/5 -f state=closed
```
### Projects v2 Operations
```bash
# Add issue to project
gh project item-add 1 --owner @me --url https://github.com/org/repo/issues/123
# Set custom field (requires GraphQL)
gh api graphql -f query='mutation {...}' -f projectId="..." -f itemId="..."
```
---
## JSON Output Patterns
```bash
# Get issue numbers matching criteria
gh issue list --json number,labels --jq '[.[] | select(.labels[].name == "bug")] | .[].number'
# PR summary with author
gh pr list --json number,title,author --jq '.[] | "\(.number): \(.title) by \