Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

gh-cli — Claude Code skill: GitHub work via CLI

A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill gh-cli -a claude-code
Open on GitHub

What gh-cli does

gh-cli shifts GitHub workflows from unauthenticated methods (curl, wget, WebFetch, MCP fetch) to the gh CLI. When an agent works with repos, PRs, issues, or releases, the skill prompts use of gh repo view, gh pr view, and gh api instead of direct HTTP calls. This unlocks private repository access and raises API rate limits.

The skill includes hook rules in plugins/gh-cli/hooks/. It works on Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. Licensed CC-BY-SA-4.0.

What it helps with

  • Access a private GitHub repository through AI coding
  • Work with GitHub API without leaking authentication
  • Read repository files instead of direct raw.githubusercontent.com fetches
  • View pull requests and issues via CLI agent
  • Bypass rate limits for unauthenticated API requests

Example prompts for the agent

  • Install gh-cli in Claude Code and show me info about owner/repo
  • List pull requests from that repo using gh CLI
  • Read a file from the repo via `gh repo` instead of curl

How to install gh-cli

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill gh-cli -a claude-code

2Manually: put the files in place

~/.claude/skills/gh-cli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gh-cli/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs variant-analysis trailofbits Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking. Claude Code CX Codex Cursor +1 6,400installs sarif-parsing trailofbits Processes existing SARIF reports from CodeQL, Semgrep, and other scanners. Use it to filter findings, remove duplicates, or prepare results for CI/CD. Claude Code CX Codex Cursor +1 5,900installs

Similar

github-workflow-automation ruvnet Automates GitHub Actions with AI agent coordination. Generates optimised pipelines, manages pull requests, analyzes failed runs, and deploys updates with risk assessment. Claude Code CX Codex Cursor +1 1,300installs github-code-review ruvnet Runs a swarm of specialized AI agents to inspect GitHub pull requests for security, performance, and architecture issues. Claude Code CX Codex Cursor +1 1,300installs visual-pr humanlayer A skill that automates pull request descriptions: reads the diff, gathers context, and fills a template so reviewers understand why the change exists and how it's shaped. Claude Code CX Codex Cursor +1 3,000installs agentic-jujutsu ruvnet Coordinates multiple AI agents working on code simultaneously without version control locks, learning from execution trajectories. Claude Code CX Codex Cursor +1 1,200installs github-release-management ruvnet Automates GitHub releases: drafts, changelogs, builds, multi-target deploys. Handy when releases ship often and manual steps eat the afternoon. Claude Code CX Codex Cursor +1 1,200installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. Claude Code 990,453installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. Claude Code 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. Claude Code 774,700installs

Questions about gh-cli

How do I install gh-cli in Claude Code?

Run npx skills add trailofbits/skills --skill gh-cli -a claude-code, then the skill will be at ~/.claude/skills/gh-cli/SKILL.md.

What does gh-cli do?

The skill redirects GitHub requests to authenticated gh CLI instead of curl and fetch, giving access to private repos and higher API rate limits.

When should I skip gh-cli?

If your target is not GitHub or local git operations already solve your task.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor