gh-cli

Enforce authenticated gh CLI usage for GitHub repository operations.

6.5k|561|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/trailofbits/skills --skill gh-cli-trailofbits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/trailofbits/skills/tree/main/plugins/gh-cli/skills/gh-cli
Command: npx skills add https://github.com/trailofbits/skills --skill gh-cli-trailofbits

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures that GitHub workflows use the authenticated gh CLI instead of unauthenticated curl or wget, improving security and API rate limit management.

Core Features & Use Cases

  • Authenticated Access: Ensures private repositories and higher API rate limits are used with GitHub.
  • Prefer gh CLI: Encourages use of gh commands like repo view, pr view, and issue view over curl or wget.
  • Local vs. Remote: Promotes local repository cloning for file access over direct raw.githubusercontent.com access.
  • API Endpoint Avoidance: Recommends against use of /contents/ endpoints as they don't offer the same benefits as cloning.

Quick Start

Use the gh-cli skill to check the view of a GitHub repository.

Frequently Asked Questions about gh-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent GitHub API rate limits when accessing repositories in automated workflows?

To prevent GitHub API rate limits, you should use the authenticated gh CLI instead of unauthenticated curl or wget commands. This ensures you benefit from higher API rate limits and secure access to private repositories.

Why should I use gh CLI commands instead of curl for GitHub repository operations?

You should use gh CLI commands instead of curl because gh CLI enforces authenticated access, which significantly improves security and API rate limit management. Commands like repo view, pr view, and issue view provide secure, authenticated interactions.

What is the best way to access GitHub repository files without hitting raw.githubusercontent.com directly?

The best way to access repository files without hitting raw.githubusercontent.com directly is to clone the repository locally. This approach bypasses unauthenticated endpoints and ensures secure, authenticated access to your repository content.

Does the gh CLI skill recommend using the GitHub /contents/ API endpoint?

No, the gh CLI skill recommends against using the GitHub /contents/ API endpoint. Cloning the repository locally is preferred because /contents/ endpoints do not offer the same security and rate limit benefits as local repository access.

Can I use unauthenticated wget to fetch private GitHub repository data?

No, you cannot use unauthenticated wget to fetch private GitHub repository data securely. The gh CLI skill replaces unauthenticated curl and wget commands to ensure private repositories are accessed with proper authentication.