DEVELOPMENT TOOLING / trailofbits
Authenticated GitHub CLI Workflow
Prefer authenticated GitHub CLI reads and scoped clones when inspecting GitHub resources.
“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.”
01 / THE REASONING
Why this made the selection.
- The hook denies an entire batched fetch when one GitHub URL matches; the shim blocks contents API patterns and some unscoped temporary clones, while cleanup validates the session identifier.
- Read a private repository or PR with the intended GitHub identity instead of interpreting an unauthenticated 404 as absence.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- plugins/gh-cli/skills/gh-cli/SKILL.md
- plugins/gh-cli/README.md
- plugins/gh-cli/hooks/hooks.json
- plugins/gh-cli/hooks/intercept-github-curl.sh
- plugins/gh-cli/hooks/intercept-github-fetch.sh
- plugins/gh-cli/hooks/cleanup-clones.sh
- plugins/gh-cli/hooks/shims/gh
- LICENSE
- README.md
Our findings
- The hook denies an entire batched fetch when one GitHub URL matches; the shim blocks contents API patterns and some unscoped temporary clones, while cleanup validates the session identifier.
Not established by this review
- Third-party instructions and helpers were not executed; service access, host compatibility and outcomes remain untested.
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Add a skill to your workflow.
DOCUMENTED COMMAND
npx skills add trailofbits/skills/plugins/gh-cli/skills/gh-cli Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.
Optional: install the reviewed revision
Keeps the original source and installer version where recorded, while leaving your AI tools and installation scope for you to choose.
npx skills add https://github.com/trailofbits/skills/tree/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/skills/gh-cli - Install the pinned directory interactively and retain its referenced files; inspect the source before granting tool access.
- Verify gh authentication and repository scope; retain the definition for guidance and review the separate plugin hook configuration before enabling interception or automatic cleanup.
Before you start
- GitHub CLI, Git and authorized repository access; plugin hooks additionally require Bash, jq and a compatible host
04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/skills/gh-cli/SKILL.md
Supports: summary, review, install, access, limitations
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/README.md
Supports: summary, review, install, access, limitations
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/hooks/hooks.json
Supports: summary, review, install, access, limitations
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/hooks/intercept-github-curl.sh
Supports: summary, review, install, access, limitations
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/hooks/intercept-github-fetch.sh
Supports: summary, review, install, access, limitations
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/hooks/cleanup-clones.sh
Supports: summary, review, install, access, limitations
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/plugins/gh-cli/hooks/shims/gh
Supports: summary, review, install, access, limitations
- Pinned LICENSE ↗Checked
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/LICENSE
Supports: license
- Pinned README.md ↗Checked
https://github.com/trailofbits/skills/blob/0f44fe01dcb00bd6929b4ba82a257d305de04554/README.md
Supports: summary, review, install, access, limitations