From gh-recipes
This skill should be used when Claude attempts a gh CLI operation that fails because the subcommand doesn't exist, when Claude encounters "unknown command" errors from gh, when the user says "GitHub API", "gh api", "REST API for GitHub", or when the user asks about GitHub operations that require `gh api` directly. Common triggers include questions about "milestones", "branch protection", "repo topics", "autolinks", "deploy keys", "webhooks", "environments", "repository rulesets", "repository settings", "collaborators", "repo access", "traffic", "repo analytics", "notifications", "GitHub Pages", "actions permissions", "GITHUB_TOKEN permissions", "commit statuses", "interaction limits", "repository dispatch", "dependabot alerts", "resolve review threads", or "resolve conversations". Also applies when the user asks natural questions like "who has access to this repo", "check repo traffic", "repo stats", "check forks", "how many stars", "add a collaborator", "manage notifications", "set up GitHub Pages", "configure actions permissions", "restrict allowed actions", "post a commit status", "lock down repo interactions", "trigger a repository dispatch", "list dependabot alerts", "dismiss dependabot alert", "resolve PR review conversations", "create a milestone", "add a webhook", "set up branch protection", "configure rulesets".
How this skill is triggered — by the user, by Claude, or both
Slash command
/gh-recipes:gh-api-recipesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Many GitHub operations don't have dedicated `gh` subcommands and require using `gh api` directly. This skill provides tested recipes for common operations.
references/actions-permissions.mdreferences/collaborators.mdreferences/commit-statuses.mdreferences/dependabot.mdreferences/interaction-limits.mdreferences/milestones.mdreferences/notifications.mdreferences/pages.mdreferences/repo-settings.mdreferences/repository-dispatch.mdreferences/review-threads.mdreferences/traffic.mdMany GitHub operations don't have dedicated gh subcommands and require using gh api directly. This skill provides tested recipes for common operations.
All recipes use gh api with REST endpoints. When run inside a git repo with a GitHub remote, gh api automatically resolves :owner/:repo placeholders:
# List resources
gh api repos/:owner/:repo/milestones --jq '.[] | [.number, .title, .state, .due_on] | @tsv'
# Create resources
gh api repos/:owner/:repo/milestones -f title="v1.0" -f state=open -f due_on="2026-03-01T00:00:00Z"
# Update resources
gh api -X PATCH repos/:owner/:repo/milestones/1 -f state=closed
# Delete resources
gh api -X DELETE repos/:owner/:repo/milestones/1
Format output as tables:
# TSV for simple tables
--jq '.[] | [.field1, .field2] | @tsv'
# Custom formatting
--jq '.[] | "\(.number)\t\(.title)\t\(.state)"'
# Filter results
--jq '[.[] | select(.state == "open")]'
# Count results
--jq 'length'
For endpoints that return many results, use --paginate:
gh api repos/:owner/:repo/milestones --paginate --jq '.[] | .title'
Detailed recipes are in the references/ directory. Consult these when the user needs help with a specific operation:
references/milestones.md — Create, list, update, close, delete milestones; assign issues to milestonesreferences/collaborators.md — Add/remove collaborators, permissions, invitations, team accessreferences/traffic.md — Views, clones, referrers, popular paths (14-day retention)references/notifications.md — List, mark read, subscribe/unsubscribe, watch reposreferences/pages.md — Enable/disable Pages, source config, custom domains, build statusreferences/actions-permissions.md — Actions enable/disable, allowed actions, GITHUB_TOKEN permissions, runnersreferences/commit-statuses.md — Create/read legacy commit statuses for CI integrationsreferences/interaction-limits.md — Temporarily restrict repo interactions (spam control)references/repository-dispatch.md — Trigger custom events for cross-repo automationreferences/dependabot.md — List, dismiss, reopen Dependabot vulnerability alertsreferences/review-threads.md — Resolve/unresolve PR review conversations, reply to threads (GraphQL)references/repo-settings.md — Topics, autolinks, deploy keys, branch protection, rulesets, webhooks, environments, repository visibilityWhen an operation isn't covered by an existing recipe, construct the gh api call from the GitHub REST API docs. The pattern is consistent: identify the endpoint, use gh api with the right HTTP method and fields.
If a recipe is missing, suggest the user run /gh-recipes:add to file an issue requesting it be added to the plugin.
npx claudepluginhub metcalfc/claude-plugin --plugin gh-recipesOrchestrates GitHub REST v3 and GraphQL v4 API access, routing to resources for authentication, repos, issues/PRs, workflows, security, search, and more. Use for integrations and automation.
GitHub CLI operations via `gh` for issues, PRs, Actions, releases, and REST/GraphQL API with `--json`/`--jq` parsing.
Provides GitHub CLI (gh) usage for repos, issues, PRs, releases, gists, and workflow dispatches. Includes safety gates for destructive operations and JSON projection recipes to reduce token usage.