Skip to content
Skillpedia
Deploy & cloud (DevOps)8.0k · #12680

gh-cli

What it does

Guides an AI to use the gh command-line tool for GitHub work, rather than raw web fetches. It is for developers working with GitHub repositories, pull requests and issues.

When to use it

  • ✓When a developer asks an AI to read a GitHub pull request, issue or repository.
  • ✓When a developer needs access to a private GitHub repository.
  • ✓When an AI is about to fetch GitHub content with curl or a web tool.

Skill link

https://github.com/trailofbits/skills/blob/main/plugins/gh-cli/skills/gh-cli/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/trailofbits/skills/blob/main/plugins/gh-cli/skills/gh-cli/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Look at pull request 123 on my team's GitHub repo and summarize it.”

5 new skills a week. 1 minute to read.

How it works

The skill tells the AI to use gh commands, which run with your account's authentication, instead of plain web requests. It suggests cloning the repository to read files locally.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

gh-cli

When to Use

  • Working with GitHub repositories, pull requests, issues, releases, or raw file URLs.
  • You need authenticated access to private repositories or higher API rate limits.
  • You are about to use curl, wget, WebFetch, or an MCP fetch tool against GitHub.

When NOT to Use

  • The target is not GitHub.
  • Plain local git operations already solve the task.

Guidance

Prefer the authenticated gh CLI over raw HTTP fetches for GitHub content. In particular:

  • Prefer gh repo view, gh pr view, gh pr list, gh issue view, and gh api over unauthenticated curl or wget.
  • Prefer cloning a repository and reading files locally over fetching raw.githubusercontent.com blobs directly.
  • Avoid using GitHub API /contents/ endpoints as a substitute for cloning and reading repository files.

Examples:

gh repo view owner/repo
gh pr view 123 --repo owner/repo
gh api repos/owner/repo/pulls

For the hook implementation, see:

  • plugins/gh-cli/README.md
  • plugins/gh-cli/hooks/
FAQ

Why not just use a web link?

The skill says the authenticated tool gets access to private repositories and higher rate limits.

Does it apply to non-GitHub sites?

No. It is only for GitHub content.

Do I need to sign in to gh first?

The skill relies on gh being authenticated, which is how it reaches private repositories.

Details

Original description by the author

Enforces authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns. Use when working with GitHub URLs, API access, pull requests, or issues.

repo: trailofbits/skills

Popularity

GitHub stars
8.0k
Ranking position
#12680
License
CC-BY-SA-4.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills