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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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, andgh apiover unauthenticatedcurlorwget. - Prefer cloning a repository and reading files locally over fetching
raw.githubusercontent.comblobs 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.mdplugins/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
Comments
- …
More skills from this repository
audit-context-building
8.0kHelps your agent learn an unfamiliar codebase before a security review, mapping what each function assumes, guarantees and depends on.
algorand-vulnerability-scanner
8.0kHelps your agent scan Algorand smart contracts, written in TEAL or PyTeal, for 11 common security problems such as rekeying attacks and unchecked fees.
audit-prep-assistant
8.0kHelps your agent get a codebase ready for an outside security review, with static analysis, test coverage, dead-code cleanup and clear documentation.
cairo-vulnerability-scanner
8.0kHelps your agent scan Cairo smart contracts on StarkNet for 6 serious problems, including arithmetic overflow, risky cross-layer messages and signature replay.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.