Agent skill · Backend & API

gh-cli

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

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codeCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill gh-cli --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 1 KB
Bundled scripts: none
Path: plugins/gh-cli/skills/gh-cli/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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`, or unauthenticated web fetches 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: ```sh 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/`

What's inside
Steps it walks through
  1. When to Use
  2. When NOT to Use
  3. Guidance
Ships with 2 files
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
Commands it runs
gh repo view owner/repo
gh pr view 123 --repo owner/repo
gh api repos/owner/repo/pulls
More from skills
All skills →
About this skill
What does the gh-cli skill do?

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

How do I install it?

Run `npx skills add trailofbits/skills --skill gh-cli --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going