gh-api

Access GitHub REST and GraphQL endpoints via gh api.

1|Updated Jun 1, 2025
One-click install
npx skills add https://github.com/rcdailey/dotfiles --skill gh-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-api
Source: https://github.com/rcdailey/dotfiles/tree/main/home/dot_config/opencode/exact_skills/gh-api
Command: npx skills add https://github.com/rcdailey/dotfiles --skill gh-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use when operating on the GitHub REST or GraphQL API via gh api for cases not covered by higher-level gh subcommands: creating or managing draft pull requests, posting pull request review-body or issue comments programmatically, querying or mutating GitHub Discussions, or any GitHub API call requiring raw endpoints. Do NOT use for standard gh pr, gh issue, gh release, or gh repo workflows, or for PR review comments (use gh-pr-review instead).

Core Features & Use Cases

  • Create and manage draft PRs, PR review bodies, and issue comments via raw endpoints.
  • Query, mutate, and orchestrate GitHub data not exposed by higher-level gh commands.
  • Use cases include automation of repository workflows, bulk updates to discussions, and custom integrations.

Quick Start

Use the gh-api to perform a raw GitHub API call, for example creating a draft PR.

Frequently Asked Questions about gh-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make raw GitHub API calls for endpoints not covered by standard gh commands?

Use the gh-api Skill to access GitHub REST and GraphQL endpoints via `gh api` for advanced operations. It handles raw API calls for cases like creating draft PRs or querying GitHub Discussions that lack higher-level subcommands.

Can I automate creating draft pull requests using the GitHub API?

Yes, you can create and manage draft PRs by using this Skill to access the necessary raw GitHub REST endpoints. It applies to developers needing endpoints not covered by existing `gh pr` subcommands.

Do I need a GitHub token to authenticate gh api calls?

Yes, performing raw GitHub API operations requires authentication with a GitHub token. This ensures secure access to both REST and GraphQL endpoints for executing programmatic queries and mutations.

When should I use raw GitHub API endpoints instead of standard gh subcommands?

Use raw GitHub API endpoints when you need to perform operations like posting PR review-body comments, mutating GitHub Discussions, or custom integrations. Avoid this approach for standard `gh pr`, `gh issue`, or `gh release` workflows.

Can I query and mutate GitHub Discussions through the GraphQL API?

Yes, you can query, mutate, and orchestrate GitHub Discussions by executing raw GraphQL calls. This Skill supports accessing GitHub REST and GraphQL endpoints for data not exposed by higher-level gh commands.

What is the best way to post issue comments programmatically via the GitHub API?

The best way to post issue comments programmatically is using this Skill to access the required raw GitHub REST endpoints. It facilitates automation of repository workflows and custom integrations not covered by `gh issue`.