gh-cli

Query GitHub API for file contents, PR comments, and historical issue searches.

2|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/zachmayer/skills --skill gh-cli-zachmayer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/zachmayer/skills/tree/main/.claude/skills/gh-cli
Command: npx skills add https://github.com/zachmayer/skills --skill gh-cli-zachmayer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the difficulty of navigating complex GitHub API interactions and searching for historical context, preventing redundant work and ensuring developers follow established repository standards.

Core Features & Use Cases

  • Advanced API Queries: Perform complex operations like reading file contents without cloning, fetching specific PR review comments, and paginating large datasets.
  • Prior Art Discovery: Search across all states of issues and PRs to understand why features were built, rejected, or abandoned.
  • Use Case: Before starting a new feature, use this skill to query closed PRs and related issues to identify previous implementation attempts and avoid repeating past mistakes.

Quick Start

Use the gh-cli skill to search for all closed issues related to authentication in the current repository and summarize the findings.

Frequently Asked Questions about gh-cli

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

FAQPage Schema
How do I search GitHub for prior art and closed PRs before starting a new feature?

Search GitHub for prior art by querying closed pull requests and issues across all states. This identifies previous implementation attempts, revealing why features were built or rejected to prevent repeating past mistakes.

Can I read file contents from a GitHub repository without cloning it?

You can read file contents directly from GitHub repositories without cloning by executing advanced GitHub API queries. This facilitates efficient searching and retrieval of specific file data across remote repositories.

How do I fetch specific PR review comments using the GitHub CLI?

Fetch specific PR review comments using the GitHub CLI by executing advanced API queries. This allows precise retrieval of historical context and review feedback without navigating the web interface.

Do I need to authenticate the GitHub CLI before accessing API endpoints?

You need the GitHub CLI installed and authenticated with appropriate scopes before accessing API endpoints. Proper authentication is required to perform advanced queries for prior art, comments, and file contents.

What's the best way to paginate large datasets from the GitHub API?

Paginate large datasets from the GitHub API by applying advanced CLI patterns for non-obvious API interactions. This handles extensive repository data efficiently, ensuring complete retrieval of issues and pull requests.

Why does searching for historical context across GitHub repositories prevent redundant work?

Searching historical context prevents redundant work by surfacing established repository standards and past decisions. Querying closed issues and PRs clarifies why features were abandoned, ensuring developers follow existing patterns.