Official agent skill

Gh CLI

by trailofbits in trailofbits/skills

Enforces authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns.

OfficialCC-BY-SA-4.0Auto-check passedDevelopment

Install Gh CLI

skills CLI
$ npx skills add trailofbits/skills --skill gh-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trailofbits/skills gh-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trailofbits/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/gh-cli/skills/gh-cli .claude/skills/gh-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gh-cli
GitHub stars
7.4k
Token cost
~311 tokens
SKILL.md length
132 words
Files
3 (incl. assets)
Skills in repo
79
Repo updated
First seen
Licence
CC-BY-SA-4.0

At a glance

Enforces authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns.

  • Working with GitHub URLs
  • SKILL.md covers When to Use, When NOT to Use and Guidance
  • Calls gh
  • Tasks that involve Pull requests

What it does

Gh CLI is an agent skill from trailofbits/skills, published by the product's own GitHub organization. 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.

Its SKILL.md is about 310 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including assets (for example `agents/openai.yaml`).

It sits in Development, covering Pull requests. It works with GitHub and Model Context Protocol. The repository describes itself as: Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows. The licence is CC-BY-SA-4.0.

When your agent uses it

  • Working with GitHub URLs
  • Tasks that involve Pull requests

Example prompts

  • “Use the gh-cli skill to enforce authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns”
  • “/gh-cli”

What it can do on your machine

Read from SKILL.md and the folder at commit 82fe822. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gh CLI loads about 311 tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 132 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~311

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trailofbits/skills at commit 82fe822, republished under its CC-BY-SA-4.0 licence (© trailofbits). 132 words, ~311 tokens.

Download SKILL.mdSave it as .claude/skills/gh-cli/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
gh-cli
description
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.

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:

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/

© trailofbits, CC-BY-SA-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (assets) in plugins/gh-cli/skills/gh-cli of trailofbits/skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg

Open the folder on GitHubat commit 82fe822

Compare with similar skills

Gh CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gh CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gh CLI this skilltrailofbits/skills7.4k—~311Automated safety check: PassCC-BY-SA-4.0
Plane Release Notes Generatormakeplane/plane61k—~2.5kAutomated safety check: PassAGPL-3.0
Mariadb Operator PR Reviewmariadb-operator/mariadb-operator1k—~3.3kAutomated safety check: PassApache-2.0
Link Ticket To SessionJayantDevkar/claude-code-karma329—~1.8kAutomated safety check: NotesApache-2.0
Code Reviewnteract/semiotic2.7k—~1.5kAutomated safety check: PassApache-2.0
Trailsnap CommitLC044/TrailSnap769—~557Automated safety check: PassAGPL-3.0

Similar skills

  • Builds categorized release notes for a Plane release pull request from its commits and writes them into the PR description, for both the plane-cloud and plane-ee repos.

    61k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Mariadb Operator PR Review

    mariadb-operator/mariadb-operator

    Perform a structured maintainer-style PR review for the mariadb-operator repository.

    1k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Link Ticket To Session

    JayantDevkar/claude-code-karma

    Link the current Claude Code session to a ticket (Linear, Jira, GitHub Issues, or GitHub Pull Requests) and cache its title/status in karma.

    329 GitHub stars~1.8k tokensUpdated 9 days ago
    DevelopmentAuto-check: notes
  • Code Review

    nteract/semiotic

    Review Semiotic pull requests for behavioral bugs, regressions, contract drift, and missing evidence.

    2.7k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Trailsnap Commit

    LC044/TrailSnap

    TrailSnap 仓库提交、推送、需求平台与 PR 工作流规则。Use when preparing commits, pushing branches, managing the corresponding platform requirement, creating or merging pull requests, or monitoring PR CI in this…

    769 GitHub stars~557 tokensUpdated today
    DevelopmentAuto-check passed
  • Review This Branch

    no-human-ai/no_human

    Run the nohuman review gate (fresh-session adversarial reviewer + tamper guard) over the current branch or a GitHub pull request, with no server, no database, and no onboarding, and relay the…

    330 GitHub stars~1.4k tokensUpdated 3 days ago
    DevelopmentAuto-check passed

More from trailofbits/skills

All 79 skills in this repo
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated today
    Auto-check: notes
  • Trailmark Graph Evolution

    trailofbits/skills

    Official

    Compares Trailmark code graphs at two snapshots, such as commits, tags or directories, to surface attack paths, blast radius and taint changes that text diffs miss.

    7.4k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Let Fate Decide

    trailofbits/skills

    Official

    Draws a 12 Houses tarot spread to break ties when a request is vague or casually delegated, then reads the cards to pick the next step.

    7.4k GitHub stars~2.5k tokensUpdated today
    Auto-check: notes
  • Burp Suite Project Parser

    trailofbits/skills

    Official

    Searches and extracts data from Burp Suite project files on the command line: regex searches over responses, audit findings, proxy history and site map data.

    7.4k GitHub starsUsed in 4 repos~4.2k tokens
    Auto-check: notes
  • Semgrep Security Scan

    trailofbits/skills

    Official

    Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

    7.4k GitHub stars~3.7k tokensUpdated today
    Auto-check: notes

Categories

Questions about Gh CLI

What does Gh CLI do?

Enforces authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns. Gh CLI is an agent skill from trailofbits/skills, published by the product's own GitHub organization. Enforces authenticated gh CLI workflows over unauthenticated curl, WebFetch, and MCP fetch patterns.

When should I use Gh CLI?

Gh CLI fits situations like: working with GitHub URLs; tasks that involve Pull requests.

How do I install Gh CLI in Claude Code?

Run `npx skills add trailofbits/skills --skill gh-cli -a claude-code`. Or copy the skill folder (plugins/gh-cli/skills/gh-cli in trailofbits/skills) into .claude/skills/gh-cli in your project. Claude Code loads it when a task matches its description.

How do I install Gh CLI in Codex?

Run `npx skills add trailofbits/skills --skill gh-cli -a codex`. Or copy the skill folder (plugins/gh-cli/skills/gh-cli in trailofbits/skills) into .agents/skills/gh-cli in your project. Codex loads it when a task matches its description.

Can I use Gh CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trailofbits/skills --skill gh-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gh-cli, .gemini/skills/gh-cli, .github/skills/gh-cli and .opencode/skills/gh-cli in your project.

What does Gh CLI need to run?

Going by SKILL.md and its folder, Gh CLI needs the command-line tools its instructions call (gh).

Does Gh CLI access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Gh CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gh CLI use?

Gh CLI is published under the CC-BY-SA-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gh CLI use?

About 311 tokens (SKILL.md is roughly 1.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gh CLI?

Skills that share tags, products or a category with Gh CLI: Plane Release Notes Generator (makeplane/plane, 61k stars), Mariadb Operator PR Review (mariadb-operator/mariadb-operator, 1k stars), Link Ticket To Session (JayantDevkar/claude-code-karma, 329 stars) and Code Review (nteract/semiotic, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gh CLI?

trailofbits (a GitHub organization, an official publisher) maintains it in trailofbits/skills, which has 7,420 GitHub stars. The repository holds 79 skills in this directory. The repository was last updated on October 7, 2026.

Source: trailofbits/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.