Gh Cli

by trailofbits82fe82262526No license7.4K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated yesterday

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.

Instructions onlySoftware Development
AI-generated overview

Guides agents to use the authenticated gh CLI instead of unauthenticated curl or fetch tools for GitHub access.

What it does
This skill provides guidance on preferring the authenticated gh CLI over raw HTTP fetches when working with GitHub content. It recommends commands such as gh repo view, gh pr view, gh pr list, gh issue view, and gh api, and suggests cloning repositories to read files locally rather than fetching raw blobs. It also advises against using GitHub API contents endpoints as a substitute for cloning. The skill is instructions only and produces no files.
When to use it
Use it when working with GitHub repositories, pull requests, issues, releases, or raw file URLs, or when authenticated access to private repositories or higher API rate limits is needed. It also applies when about to use curl, wget, WebFetch, or an MCP fetch tool against GitHub. It is not intended for non-GitHub targets or tasks already solved by plain local git operations.
Requirements
Requires the gh CLI with authentication configured for the target GitHub account. No scripts are shipped; the skill is instructions only.

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/repogh pr view 123 --repo owner/repogh api repos/owner/repo/pulls

For the hook implementation, see:

  • plugins/gh-cli/README.md
  • plugins/gh-cli/hooks/

Source and attribution

Source:trailofbits/skillsinplugins/gh-cli/skills/gh-cliat commit82fe822

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal

Gh Cli Agent Skill | SourceWeft