Gh Cli skill for Claude
Enforces authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns.
When Claude uses it
Use when working with GitHub URLs, API access, pull requests, or issues.
Gh Cli SKILL.md
The full skill file from trailofbits/skills (CC-BY-SA-4.0).
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/
How to install Gh Cli
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit trailofbits/skills/plugins/gh-cli/skills/gh-cli#main ~/.claude/skills/gh-cliCodex
npx degit trailofbits/skills/plugins/gh-cli/skills/gh-cli#main ~/.codex/skills/gh-cliClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What does the Gh Cli skill do?
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.
+How do I install Gh Cli in Claude Code?
Copy the skill folder into ~/.claude/skills/gh-cli, for example with "npx degit trailofbits/skills/plugins/gh-cli/skills/gh-cli#main ~/.claude/skills/gh-cli". Claude Code loads it automatically and uses it when a task matches.
+Does Gh Cli work with ChatGPT or Codex?
Yes. Gh Cli uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/gh-cli. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is Gh Cli free?
Gh Cli is published on GitHub by trailofbits under the CC-BY-SA-4.0 license, which allows free use.