Back to list
yonatangross

github-operations

by yonatangross

The Complete AI Development Toolkit for Claude Code — 159 skills, 34 agents, 20 commands, 144 hooks. Production-ready patterns for FastAPI, React 19, LangGraph, security, and testing.

29🍴 4📅 Jan 23, 2026

SKILL.md


name: github-operations description: 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. context: fork version: 1.0.0 tags: [github, gh, cli, issues, pr, milestones, projects, api] user-invocable: false

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

# 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

# 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)

# 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

# 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

# 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 \(.author.login)"'

# Find ready-to-merge PRs
gh pr list --json number,reviewDecision,statusCheckRollupState \
  --jq '[.[] | select(.reviewDecision == "APPROVED" and .statusCheckRollupState == "SUCCESS")]'

Key Concepts

Milestone vs Epic

MilestonesEpics
Time-based (sprints, releases)Topic-based (features)
Has due dateNo due date
Progress barTask list checkbox
Native REST APINeeds workarounds

Rule: Use milestones for "when", use parent issues for "what".

Projects v2 Custom Fields

Projects v2 uses GraphQL for setting custom fields (Status, Priority, Domain). Basic gh project commands work for listing and adding items, but field updates require GraphQL mutations.


Best Practices

  1. Always use --json for scripting - Parse with --jq for reliability
  2. Non-interactive mode for automation - Use --title, --body flags
  3. Check rate limits before bulk operations - gh api rate_limit
  4. Use heredocs for multi-line content - --body "$(cat <<'EOF'...EOF)"
  5. Link issues in PRs - Closes #123, Fixes #456
  6. Use ISO 8601 dates - YYYY-MM-DDTHH:MM:SSZ for milestone due_on
  7. Close milestones, don't delete - Preserve history

  • create-pr - Create pull requests with proper formatting and review assignments
  • review-pr - Comprehensive PR review with specialized agents
  • release-management - GitHub release workflow with semantic versioning and changelogs
  • stacked-prs - Manage dependent PRs with rebase coordination
  • issue-progress-tracking - Automatic issue progress updates from commits

Key Decisions

DecisionChoiceRationale
CLI vs APIgh CLI preferredSimpler auth, better UX, handles pagination automatically
Output format--json with --jqReliable parsing for automation, no regex parsing needed
Milestones vs EpicsMilestones for timeMilestones have due dates and progress bars, epics for topic grouping
Projects v2 fieldsGraphQL mutationsgh project commands limited, GraphQL required for custom fields
Milestone lifecycleClose, don't deletePreserves history and progress tracking

References

Examples

  • Automation Scripts - Ready-to-use scripts for bulk operations, PR automation, milestone management

Score

Total Score

75/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon