MCPInstall

github-operations

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.

Installs
222
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/yonatangross/orchestkit --skill github-operations
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads github-operations automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

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

CRITICAL: Task Management is MANDATORY (CC 2.1.16)

BEFORE doing ANYTHING else, create tasks to track progress:

# 1. Create main task IMMEDIATELY
TaskCreate(
  subject="GitHub Operations: {target}",
  description="Managing GitHub issues, PRs, milestones, or Projects",
  activeForm="Managing GitHub resources"
)

# 2. Create subtasks matching the operation scope
TaskCreate(subject="Issue management", activeForm="Creating/updating issues")
TaskCreate(subject="PR management", activeForm="Managing pull requests")
TaskCreate(subject="Milestone tracking", activeForm="Updating milestones")

# 3. Set dependencies if operations are sequential
TaskUpdate(taskId="3", addBlockedBy=["2"])
TaskUpdate(taskId="4", addBlockedBy=["3"])

# 4. Update status as you progress
TaskUpdate(taskId="2", status="in_progress")  # When starting
TaskUpdate(taskId="2", status="completed")    # When done

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

# Resume a session linked to a PR (CC 2.1.27)
claude --from-pr 456           # Resume session with PR context (diff, comments, review status)
claude --from-pr https://github.com/org/repo/pull/456

Tip (CC 2.1.27): Sessions created via gh pr create are automatically linked to the PR. Use --from-pr to resume with full PR context.

Milestone Operations (REST API)

Footgun: gh issue edit --milestone takes a NAME (string), not a number. The REST API uses a NUMBER (integer). Never pass a number to --milestone. Load Read("references/cli-vs-api-identifiers.md").

# 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 (API uses number, not name)
MILESTONE_NUM=$(gh api repos/:owner/:repo/milestones --jq '.[] | select(.title=="Sprint 8") | .number')
gh api -X PATCH repos/:owner/:repo/milestones/$MILESTONE_NUM -f state=closed

# Assign issues to milestone (CLI uses name, not number)
gh issue edit 123 124 125 --milestone "Sprint 8"

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 (statusCheckRollup is an ARRAY, so fold it first)
gh pr list --json number,reviewDecision,statusCheckRollup \
  --jq '[.[] | select(.reviewDecision == "APPROVED"
        and ([(.statusCheckRollup // [])[] | .conclusion // .state]
             | length > 0 and all(IN("SUCCESS","SKIPPED","NEUTRAL"))))]'

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.


Rules Quick Reference

RuleImpactWhat It Covers
issue-tracking-automation (load rules/issue-tracking-automation.md)HIGHAuto-progress from commits, sub-task completion, session summaries
issue-branch-linking (load rules/issue-branch-linking.md)MEDIUMBranch naming, commit references, PR linking patterns

Batch Issue Creation

When creating multiple issues at once (e.g., seeding a sprint), use an array-driven loop:

# Define issues as an array of "title|labels|milestone" entries
SPRINT="Sprint 9"
ISSUES=(
  "feat: Add user auth|enhancement,backend|$SPRINT"
  "fix: Login redirect loop|bug,high|$SPRINT"
  "chore: Update dependencies|maintenance|$SPRINT"
)

for entry in "${ISSUES[@]}"; do
  IFS='|' read -r title labels milestone <<< "$entry"
  NUM=$(gh issue create \
    --title "$title" \
    --label "$labels" \
    --milestone "$milestone" \
    --body "" \
    --json number --jq '.number')
  echo "Created #$NUM: $title"
done

Tip: Capture the created issue number with --json number --jq '.number' so you can reference it immediately (e.g., add to Projects v2, link in PRs).


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. On CC ≥ 2.1.116, the Bash tool surfaces a rate-limit hint in the transcript when gh hits 403 — treat that hint as authoritative and back off, don't blind-retry. Before 2.1.116, agents had no signal and would burn all retry attempts in ~13 s.
  4. Use heredocs for multi-line content - --body "$(cat <<'EOF'...EOF)"
  5. Link issues in PRs - Closes #123, Fixes #456 — GitHub auto-closes on merge
  6. Use ISO 8601 dates - YYYY-MM-DDTHH:MM:SSZ for milestone due_on
  7. Close milestones, don't delete - Preserve history
  8. --milestone takes NAME, not number - Load Read("references/cli-vs-api-identifiers.md")
  9. Never gh issue close directly - Comment progress with gh issue comment; issues close only when their linked PR merges to the default branch

2026 CLI changes — what to know

gh-copilot extension is retired

GitHub retired the gh-copilot extension in October 2025. Copilot is now a standalone binary:

# OLD — no longer supported
gh extension install github/gh-copilot   # fails
gh copilot suggest "revert last commit"   # fails

# NEW — standalone `copilot` binary
copilot suggest "revert last commit"
copilot explain "git rebase -i HEAD~5"

Install from cli.github.com/copilot or via Homebrew (brew install github/gh/copilot). Authentication is shared with gh auth when both are installed.

gh agent-task (2026)

New subcommand for managing Copilot coding-agent tasks:

gh agent-task create --repo owner/repo --title "Fix flaky login test"
gh agent-task list --state open
gh agent-task view 42 --log          # stream agent log
gh agent-task watch 42                # live-follow until completion
gh agent-task cancel 42

Pairs with the REST endpoint POST /repos/{owner}/{repo}/agent-tasks for CI-driven task creation.

Sub-issues (native, 2026)

Sub-issues are now a native GitHub concept — no extension required:

# List sub-issues of parent #123
gh api repos/{owner}/{repo}/issues/123/sub_issues

# Add an existing issue #456 as sub-issue of #123
gh api -X POST repos/{owner}/{repo}/issues/123/sub_issues \
  -f sub_issue_id=$(gh api repos/{owner}/{repo}/issues/456 --jq .node_id)

# Remove a sub-issue relationship
gh api -X DELETE repos/{owner}/{repo}/issues/123/sub_issue \
  -F sub_issue_id=<id>

The old gh-sub-issue third-party extension still works but is superseded. GraphQL sub-issue mutations still require the issue node_id (see references/cli-vs-api-identifiers.md).


Related Skills

  • ork:create-pr - Create pull requests with proper formatting and review assignments
  • ork:review-pr - Comprehensive PR review with specialized agents
  • ork:release-management - GitHub release workflow with semantic versioning and changelogs
  • ork:commit - Stacked-PR workflow and rebase coordination live in src/skills/commit/rules/ (stacked-pr-workflow, stacked-pr-rebase). There is no stacked-prs skill.
  • ork: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

Upstream coverage (do not restate)

These topics are documented first-party. Fetch them there instead of growing a copy in this skill.

TopicSource
gh issue bulk create / edit / list loops, templates, transfer and pinhttps://cli.github.com/manual/gh_issue
Cross-repo label create / edit / clonehttps://cli.github.com/manual/gh_label
Org-wide issue search qualifiershttps://cli.github.com/manual/gh_search_issues
Milestone REST CRUD: endpoints, payload fields, list filters and sortinghttps://docs.github.com/en/rest/issues/milestones
Projects v2 field mutations, value unions, field and option ID discoveryhttps://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects
Sub-issue endpoint payloads and paginationhttps://docs.github.com/en/rest/issues/sub-issues
Rate-limit headers, reset semantics, secondary limitshttps://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api

What still stays ours, in full, in this skill: PR review / merge gating including the statusCheckRollup array fold (references/pr-workflows.md); GraphQL queries, pagination, and node-id lookup (references/graphql-api.md); the CLI-NAME vs API-NUMBER identifier mapping for milestones and Projects v2 (references/cli-vs-api-identifiers.md); the sub-issue quick reference above; and the rate-limit pre-flight guard (examples/automation-scripts.md). House rules with their rationale are collected in references/ork-delta.md.

References

Load on demand with Read("references/<file>"):

FileContent
ork-delta.mdHouse rules: hook contracts, close-don't-delete, rate-limit discipline, the file-set contract
pr-workflows.mdReviews, merge strategies, auto-merge, statusCheckRollup folding
graphql-api.mdComplex queries, pagination, bulk operations
cli-vs-api-identifiers.mdNAME vs NUMBER footguns, milestone/project ID mapping
issue-management.mdPointer stub: issue delta plus upstream links
milestone-api.mdPointer stub: milestone delta plus upstream links
projects-v2.mdPointer stub: Projects v2 delta plus upstream links

Examples

Load: Read("examples/automation-scripts.md") - Rate-limit discipline for long gh loops, plus pointers for the bulk-loop recipes

FAQ

What does the github-operations skill do?

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.

How do I install github-operations?

Run npx skills add https://github.com/yonatangross/orchestkit --skill github-operations in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/github-operations/ (personal) or .claude/skills/github-operations/ (project).

Which AI agents can use github-operations?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is github-operations safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains github-operations?

It is published by yonatangross in yonatangross/orchestkit. It has 222 recorded installs.

More from yonatangross/orchestkit

View all →

devops-deployment

yonatangross/orchestkit

Use when setting up CI/CD pipelines, containerizing applications, deploying to Kubernetes, or writing infrastructure as code. DevOps & Deployment covers GitHub Actions, Docker, Helm, and Terraform patterns.

DevOps & Cloud1.6K installs

responsive-patterns

yonatangross/orchestkit

Responsive design with Container Queries, fluid typography, cqi/cqb units, subgrid, intrinsic layouts, foldable devices, and mobile-first patterns for React applications. Use when building responsive layouts or container queries.

Frontend & Design1.6K installs

architecture-decision-record

yonatangross/orchestkit

ADR templates in the Nygard format with context, decision, consequences, and alternatives. Use when writing ADRs, recording an architectural decision, or evaluating options.

ui-components

yonatangross/orchestkit

UI component library patterns for shadcn/ui and Radix Primitives. Use when building accessible component libraries, customizing shadcn components, using Radix unstyled primitives, or creating design system foundations.

Frontend & Design1.5K installs

rag-retrieval

yonatangross/orchestkit

Retrieval-Augmented Generation patterns for grounded LLM responses. Use when building RAG pipelines, embedding documents, implementing hybrid search, contextual retrieval, HyDE, agentic RAG, multimodal RAG, query decomposition, reranking, or pgvector search.

AI & Agents1.5K installs

zustand-patterns

yonatangross/orchestkit

Reference for Zustand 5.x state management including slices, middleware, Immer, useShallow, persistence, selectors, and devtools integration. Documents 7 core patterns with TypeScript examples and anti-patterns. Use when building React state management with Zustand instead of Redux.

Frontend & Design1.4K installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs