
Github Ops
Look up correct gh api REST and GraphQL calls when automating pull requests, issues, repos, Actions, and webhooks from your coding agent.
Overview
GitHub Ops is an agent skill most often used in Ship (also Build integrations and Operate monitoring) that documents GitHub REST and GraphQL operations accessible through gh api for PRs, issues, repos, Actions, search, w
Install
npx skills add https://github.com/daymade/claude-code-skills --skill github-opsWhat is this skill?
- Documents GitHub REST endpoints for PRs, issues, repositories, Actions/workflows, and search via gh api
- Includes GraphQL API patterns alongside REST for richer repo and PR queries
- Covers authentication through gh auth login and recommended Accept / X-GitHub-Api-Version headers
- Explains rate limiting behavior and webhook-related API usage
- Nine reference sections from authentication through webhooks in the skill readme
- Nine reference sections in the skill readme (authentication through webhooks)
- Recommends X-GitHub-Api-Version: 2022-11-28 for REST calls
Adoption & trust: 532 installs on skills.sh; 1.2k GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need reliable gh api endpoint names, filters, and headers for GitHub automation but keep losing time in scattered official documentation.
Who is it for?
Solo builders who already use gh auth login and want PR, issue, Actions, and repo automation from Claude Code, Cursor, or Codex.
Skip if: Teams that only use the GitHub website with no CLI, or codebases hosted exclusively on non-GitHub forges with no gh context.
When should I use this skill?
You are automating GitHub with gh api for pull requests, issues, repositories, Actions, search, GraphQL, webhooks, or rate-limit-aware scripting from an agent.
What do I get? / Deliverables
Your agent can execute documented gh api REST and GraphQL patterns for common GitHub workflows with correct auth and pagination instead of improvising broken calls.
- Copy-ready gh api REST command patterns with query parameters
- GraphQL query examples callable through gh api
- Auth header and rate-limit guidance for agent-generated GitHub automation
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Pull requests, issues, and CI workflows are the default ship-and-review surface for solo repos; this skill shelves there even though the same APIs support earlier repo setup. Review subphase covers PR listing, merging context, and issue triage—the most frequent gh api tasks during safe shipping.
Where it fits
Script repository creation and branch protection checks with gh api before your app’s first deploy hook lands.
List and sort open PRs by updated time, then pull issue comments for agent-assisted code review.
Inspect Actions workflow runs and failure logs through the Actions API ahead of a tagged release.
Query workflow status and webhook configuration when production CI starts failing after a dependency bump.
Search issues and discussions via the Search API to prioritize community-reported bugs for a public OSS repo.
How it compares
A gh api command reference packaged as agent skill knowledge—not a substitute for the GitHub MCP server or a full Octokit client library.
Common Questions / FAQ
Who is github-ops for?
It is for solo and indie developers who automate GitHub from coding agents using the GitHub CLI and want REST and GraphQL call patterns in one place.
When should I use github-ops?
Use it during Ship review when listing or filtering PRs and issues, during Build integrations when scripting repos and workflows, and during Operate when checking Actions or webhook-related API tasks—all via gh api.
Is github-ops safe to install?
The skill is documentation for API usage; tokens come from your local gh auth. Review the Security Audits panel on this Prism page before trusting any third-party skill in production repos.
SKILL.md
READMESKILL.md - Github Ops
# GitHub API Reference This reference provides comprehensive documentation for GitHub REST and GraphQL APIs, focusing on common operations accessible via `gh api`. ## Table of Contents 1. [Authentication](#authentication) 2. [Pull Requests API](#pull-requests-api) 3. [Issues API](#issues-api) 4. [Repositories API](#repositories-api) 5. [Actions/Workflows API](#actionsworkflows-api) 6. [Search API](#search-api) 7. [GraphQL API](#graphql-api) 8. [Rate Limiting](#rate-limiting) 9. [Webhooks](#webhooks) ## Authentication All API calls via `gh api` automatically use the authenticated token from `gh auth login`. ```bash # Check authentication status gh auth status # View current token (use cautiously) gh auth status --show-token ``` **API Headers:** - `Accept: application/vnd.github+json` (automatically set) - `X-GitHub-Api-Version: 2022-11-28` (recommended) ## Pull Requests API ### List Pull Requests **Endpoint:** `GET /repos/{owner}/{repo}/pulls` ```bash # List all open PRs gh api repos/{owner}/{repo}/pulls # List PRs with filters gh api repos/{owner}/{repo}/pulls -f state=closed -f base=main # List PRs sorted by updated gh api repos/{owner}/{repo}/pulls -f sort=updated -f direction=desc ``` **Query Parameters:** - `state`: `open`, `closed`, `all` (default: `open`) - `head`: Filter by branch name (format: `user:ref-name`) - `base`: Filter by base branch - `sort`: `created`, `updated`, `popularity`, `long-running` - `direction`: `asc`, `desc` - `per_page`: Results per page (max: 100) - `page`: Page number ### Get Pull Request **Endpoint:** `GET /repos/{owner}/{repo}/pulls/{pull_number}` ```bash # Get PR details gh api repos/{owner}/{repo}/pulls/123 # Get PR with specific fields gh api repos/{owner}/{repo}/pulls/123 --jq '.title, .state, .mergeable' ``` **Response includes:** - Basic PR info (title, body, state) - Author and assignees - Labels, milestone - Merge status and conflicts - Review status - Head and base branch info ### Create Pull Request **Endpoint:** `POST /repos/{owner}/{repo}/pulls` ```bash # Create PR via API gh api repos/{owner}/{repo}/pulls \ -f title="NOJIRA: New feature" \ -f body="Description of changes" \ -f head="feature-branch" \ -f base="main" # Create draft PR gh api repos/{owner}/{repo}/pulls \ -f title="WIP: Feature" \ -f body="Work in progress" \ -f head="feature-branch" \ -f base="main" \ -F draft=true ``` **Required fields:** - `title`: PR title - `head`: Branch containing changes - `base`: Branch to merge into **Optional fields:** - `body`: PR description - `draft`: Boolean for draft PR - `maintainer_can_modify`: Allow maintainer edits ### Update Pull Request **Endpoint:** `PATCH /repos/{owner}/{repo}/pulls/{pull_number}` ```bash # Update PR title and body gh api repos/{owner}/{repo}/pulls/123 \ -X PATCH \ -f title="Updated title" \ -f body="Updated description" # Convert to draft gh api repos/{owner}/{repo}/pulls/123 \ -X PATCH \ -F draft=true # Change base branch gh api repos/{owner}/{repo}/pulls/123 \ -X PATCH \ -f base="develop" ``` ### Merge Pull Request **Endpoint:** `PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge` ```bash # Merge with commit message gh api repos/{owner}/{repo}/pulls/123/merge \ -X PUT \ -f commit_title="Merge PR #123" \ -f commit_message="Additional merge message" \ -f merge_method="squash" # Merge methods: merge, squash, rebase ``` ### List PR Comments **Endpoint:** `GET /repos/{owner}/{repo}/pulls/{pull_number}/comments` ```bash # Get all review comments gh api repos/{owner}/{repo}/pulls/123/comments # Get issue comments (conversation tab) gh api repos/{owner}/{repo}/issues/123/comments ``` ### Create PR Review **Endpoint:** `POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews` ```bash # Approve PR gh api repos/{owner}/{repo}/pulls/123/reviews \ -f event="APPROVE" \ -f body="Looks good!" # Request changes gh api repos/{owner}/{repo}/pulls/123/reviews \ -f event="REQUEST_CHANGES" \