gh-cli
An agent skill by trailofbits, from trailofbits/skills. Tags: api, automation, cli, github, web.
What it does
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.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add trailofbits/skills --skill gh-cli
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/trailofbits/skills
cp -r skills/plugins/gh-cli/skills/gh-cli ~/.claude/skills/gh-cli
Safety box score
Grade B, low risk: 12 of 100 risk points, rated 2026-10-02. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a lightweight policy layer that steers GitHub-related work toward the authenticated `gh` CLI instead of raw HTTP fetches. Its main blast radius is network access to GitHub and the use of whatever GitHub account/auth the local `gh` client already has configured.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 0 (none) | The provided files contain only Markdown, YAML metadata, and an SVG asset; there are no scripts or code to execute. |
| Network access | 2 (moderate) | It explicitly directs use of `gh repo view`, `gh pr view`, `gh issue view`, and `gh api` for GitHub access, which sends requests to GitHub over the network. |
| Filesystem reach | 0 (none) | No instructions here read, write, or delete files outside the project; the skill only describes how to fetch GitHub content. |
| Secrets & credentials | 1 (low) | The skill depends on an authenticated `gh` setup and says it is for situations needing access to private repositories or higher rate limits, so it can use the operator's existing GitHub credentials. |
| Privilege & persistence | 0 (none) | There is no sudo, service installation, shell startup modification, or other privilege-changing behavior in the provided files. |
| Instruction hijack surface | 0 (none) | No prompt-injection content, hidden instructions, or requests to ignore higher-level rules appear in the shipped files. |
| Irreversible actions | 0 (none) | The skill does not post, merge, deploy, delete, or otherwise take external actions beyond reading GitHub content. |
| Transparency | 0 (none) | All provided files are human-readable text or SVG; there are no binaries, minified blobs, or decoded-at-runtime payloads. |
Before installing
- Run `gh auth status` and confirm it shows the intended GitHub account and scopes.
- Decide whether this agent should be allowed to access private repositories or only public GitHub data.
- If you expect hook behavior, inspect the referenced `plugins/gh-cli/README.md` and `plugins/gh-cli/hooks/` in the full repo, since they are mentioned but not included here.
Rated 2026-10-02 by an automated review of 3 files from the skill's repository.
Source
- Repository
- trailofbits/skills (all skills from this repository)
- Path
- plugins/gh-cli/skills/gh-cli/SKILL.md
- Branch
- main
- Collection
- gh-cli
- Updated
- 2026-09-19
Related skills
- running-release-tests — Run automated release testing (UI or API) via the AWS DevOps Agent using a pre-configured test profile.
- agent-web-search-setup — Sets up working web search on an agent whose model backend cannot run it.
- cli-developer — Use when building CLI tools, implementing argument parsing, or adding interactive prompts.
- csharp-developer — Use when building C# applications with .NET 8+, ASP.NET Core APIs, or Blazor web apps. Builds REST APIs using minimal or controller-based routing.
- dev-browser — Browser automation with persistent named pages via the dev-browser CLI.
- fastapi-expert — Use when building high-performance async Python APIs with FastAPI and Pydantic V2.