gh-cli
Enforces authenticated gh CLI workflows over unauthenticated curl/WebFetch patterns. Use when working with GitHub URLs, API access, pull requests, or issues.
Security Assessment
About gh-cli
The gh-cli skill is designed to streamline and secure interactions with GitHub by enforcing authenticated usage of the GitHub CLI over unauthenticated web requests such as curl or WebFetch. It addresses the challenges developers often face when accessing private repositories, performing pull request operations, or fetching GitHub resources directly via HTTP without proper authentication. By standardizing on the gh CLI, it ensures that API requests benefit from higher rate limits and the authentication context necessary for accessing protected resources.
Key capabilities of this skill include leveraging authenticated gh CLI commands like `gh repo view`, `gh pr view`, and `gh api` to interact with repositories, pull requests, issues, and releases. It promotes best practices such as cloning repositories to access raw files rather than fetching content directly from `raw.githubusercontent.com` or relying on `/contents/` API endpoints. The skill provides guidance on avoiding common pitfalls when performing HTTP-based operations against GitHub and encourages using built-in CLI workflows to maintain security and efficiency.
Typical use cases involve developers or teams working with private GitHub repositories, automating pull request management, or integrating GitHub resources into scripts and workflows while requiring authenticated access. Target users include software engineers, DevOps professionals, and technical teams who need reliable, secure, and authenticated GitHub interactions within automated processes or manual workflows, minimizing the risks associated with unauthenticated data fetching.
FAQ
When should I use gh-cli instead of curl or wget?
Use gh-cli whenever you need authenticated access to GitHub repositories, pull requests, issues, releases, or raw files. It is preferred over unauthenticated HTTP fetches to ensure higher API rate limits and proper access to private resources.
Can I use gh-cli for non-GitHub repositories?
No, gh-cli is specifically designed for GitHub. For repositories hosted elsewhere, standard git commands or other platform-specific tools should be used.
What are the limitations of using gh-cli?
gh-cli is limited to GitHub resources and requires authentication setup. It is unnecessary for plain local git operations or tasks that do not require API access or interaction with GitHub URLs.
Do I need to authenticate before using gh-cli?
Yes, authenticated access is required to fully utilize gh-cli capabilities, particularly for private repositories or API operations that exceed unauthenticated rate limits.
Can I fetch raw files from GitHub using gh-cli?
Yes, but it is recommended to clone the repository and read files locally rather than fetching raw files directly from `raw.githubusercontent.com` or using the `/contents/` API endpoints.
Install gh-cli
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
trailofbits/skills