
Description
gh-cli is an agent skill that gives patterns for invoking the GitHub CLI, gh, from an agent. The skill notes that gh already behaves well in non-interactive contexts: it skips the pager, strips colour codes, and fails fast with a helpful message instead of prompting, so for example it asks for a title and body to be provided directly when not running interactively. You therefore do not need to set GH_PAGER or pass a no-pager flag, which does not exist. Its other guidance covers structured output and parsing JSON, since human output from gh is column-formatted, as well as pagination, repository targeting, the difference between search and list commands, and the gh api fallback for requests the higher-level commands do not cover. Use it when an agent runs gh commands and needs reliable, machine-readable results. It is part of the cli/cli repository on GitHub, which has about 46,700 stars. The listing shows it as free, and it has about 2,000 installs. Its security audits show passes from Gen Agent Trust Hub and Socket, with a warning from Snyk. Install it with npx skills add https://github.com/cli/cli --skill gh.…
Highlights
- Non-interactive behaviour explained
- Structured JSON output
- Pagination and repository targeting
- Search versus list commands
- gh api fallback
Ratings & Reviews
No ratings yet
Be the first to rate gh.
People also visit
gh FAQ
Does gh need special flags for agents?
Not usually. The skill says gh skips the pager and strips colour in non-interactive use, and no no-pager flag exists.
How do I get structured data?
Use JSON output, since human output is column-formatted.
When should I use gh api?
As a fallback for requests the higher-level commands do not cover.
How do I install it?
Run npx skills add https://github.com/cli/cli --skill gh.
What do the security audits show?
skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Warn. A Warn or Fail is worth reading before you install.
What are the best gh alternatives?
Popular alternatives to gh include agentic-os, autonomous-loops and open-code-review-delegate. See all gh alternatives








