Gh CLI — Development skill for Claude Code
Trail of Bits security skill for gh cli.
How to install Gh CLI
Installs to ~/.claude/skills/gh-cli/
git clone --depth 1 https://github.com/trailofbits/skills /tmp/skills \
&& mkdir -p ~/.claude/skills \
&& cp -r /tmp/skills/plugins/gh-cli ~/.claude/skills/gh-cli Clones the whole repository, because a skill folder can carry scripts and resources beside its SKILL.md.
What Gh CLI does
A Claude Code plugin that intercepts GitHub URL fetches and redirects Claude to use the authenticated `gh` CLI instead.
Alternatives in Development
- Understand Anything — Graphs that teach graphs that impress 80.7k ★
- OpenAI Codex CLI — (Rust implementation) 67.8k ★
- Mempalace Help — Show comprehensive MemPalace help — available skills, MCP tools, CLI commands, hooks, and architecture 58.6k ★
Repository README
This is the README for trailofbits/skills, shared by 13 entries
in this directory. It describes the repository, not this entry specifically.
gh-cli
A Claude Code plugin that intercepts GitHub URL fetches and redirects Claude to use the authenticated `gh` CLI instead.
Problem
Claude Code's `WebFetch` tool and Bash `curl`/`wget` commands don't use the user's GitHub authentication. This means:
- Private repos: Fetches fail with 404 errors
- Rate limits: Unauthenticated requests are limited to 60/hour (vs 5,000/hour authenticated)
- Missing data: Some API responses are incomplete without authentication
Solution
This plugin provides:
- PreToolUse hooks that intercept GitHub URL access via
WebFetchorcurl/wget, and suggest the correctghCLI command - A
ghPATH shim that blocks anti-patterns: API/contents/fetching and non-session-scoped temp directory clones - A SessionEnd hook that automatically cleans up cloned repositories when the session ends
What Gets Intercepted
| Tool | Pattern | Suggestion |
|---|---|---|
WebFetch |
github.com/{owner}/{repo} |
gh repo view owner/repo |
WebFetch |
github.com/.../blob/... |
gh repo clone + Read |
WebFetch |
github.com/.../tree/... |
gh repo clone + Read/Glob/Grep |
WebFetch |
api.github.com/repos/.../pulls |
gh pr list / gh pr view |
WebFetch |
api.github.com/repos/.../issues |
gh issue list / gh issue view |
WebFetch |
api.github.com/... |
gh api |
WebFetch |
raw.githubusercontent.com/... |
gh repo clone + Read |
Bash |
curl https://api.github.com/... |
gh api |
Bash |
curl https://raw.githubusercontent.com/... |
gh repo clone + Read |
Bash |
wget https://github.com/... |
gh release download |
Bash (shim) |
gh api repos/.../contents/... |
gh repo clone + Read |
Bash (shim) |
gh repo clone ... /tmp/... (non-session-scoped) |
Session-scoped clone path |
What Passes Through
...
Related Skills
Debug Buttercup
Trail of Bits security skill for debug buttercup
Git Cleanup
Trail of Bits security skill for git cleanup
Agent Trail
Local web viewer for Claude Code and Codex CLI session history across multiple profiles.
Raven Harden
Reviews security_log.md and promotes accumulated observations into
Reactbits.Dev Skill
Claude Code skill for React Bits (reactbits.dev) — fetches real component source from the live registry instea
Paper Trail Cascade
Acquire PDFs via the 8-source cascade (11 with opt-in extended sources) for a single ref by slug, or a batch f
Related Agents
Session Trail Scribe
Writes a session-trail timeline milestone (title / what / why / how) from a short brief handed over by the mai
Factory Reviewer Grok
Opt-in cross-family seat for interrogate, architect, arena and eval judging, trail review, and the reflect div
Audit Logs
Query and manage Datadog Audit Trail events for compliance, security auditing, and tracking user actions acros