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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 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/`
The line at the top of this page pins the label git:20260825.43d7af8, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
GET https://markdownregistry.com/api/v1/artifacts/art_blflc73yzbph4zuf
GET https://markdownregistry.com/api/v1/resolve?ref=trailofbits/skills/gh-cli
GET https://markdownregistry.com/api/v1/blob/3810c9ff56ae9a26f4c6c1e0d058a946cd97e800441630208007a0983b9cfc49
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
trailofbits/skills · plugins/agentic-actions-auditor/skills/agentic-actions-auditor/SKILL.md · Audits GitHub Actions workflows for security vulnerabilities in AI agent integrations including Claude Code Action…
trailofbits/skills · plugins/audit-context-building/skills/audit-context-building/SKILL.md · Understand a codebase before looking for bugs in it - what each function assumes, what it guarantees, and what it…
trailofbits/skills · plugins/building-secure-contracts/skills/guidelines-advisor/SKILL.md · Smart contract development advisor based on Trail of Bits' best practices. Analyzes codebase to generate…
trailofbits/skills · plugins/building-secure-contracts/skills/secure-workflow-guide/SKILL.md · Guides through Trail of Bits' 5-step secure development workflow. Runs Slither scans, checks special features…
higoralves/orc · orc/skills/gh-cli/SKILL.md · GitHub CLI (gh) reference for repos, issues, PRs, Actions, releases, gists, projects, codespaces, and the API
oleg-koval/agent-skills · plugins/olko-git-tools/skills/gh-cli/SKILL.md · Reach for the GitHub CLI (gh) to do something on GitHub from the command line: repositories, issues, pull requests…
oleg-koval/agent-skills · adapters/cursor/olko-git-tools/skills/gh-cli/SKILL.md · Reach for the GitHub CLI (gh) to do something on GitHub from the command line: repositories, issues, pull requests…
oleg-koval/agent-skills · adapters/grok/olko-git-tools/skills/gh-cli/SKILL.md · Reach for the GitHub CLI (gh) to do something on GitHub from the command line: repositories, issues, pull requests…
oleg-koval/agent-skills · adapters/claude/olko-git-tools/skills/gh-cli/SKILL.md · Reach for the GitHub CLI (gh) to do something on GitHub from the command line: repositories, issues, pull requests…