Gh CLI banner
Trail of Bits Trail of Bits

Gh CLI

Development community Advanced

Description

A Claude Code plugin that intercepts GitHub URL fetches and redirects Claude to use the authenticated `gh` CLI instead.

Installation

Terminal
claude install-skill https://github.com/trailofbits/skills/tree/main/plugins/gh-cli

README

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:

    undefined

Solution

This plugin provides:

    undefined

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

...