GitHub CLI skills
GitHub CLI skills (gh, gh-skill)
Official GitHub CLI skills: how an agent should call gh correctly and how to manage skills with gh skill
- 46,798 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The agent runs gh commands as the user and can change issues, pull requests and releases
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/github-cli-skills-gh-gh-skillDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The agent runs gh commands as the user and can change issues, pull requests and releases
This is third-party code. Review the repository files before installing.
What it does
The gh skill explains how an agent should use GitHub CLI without common mistakes: get structured output with --json and --jq, respect list limits and pagination, target repositories explicitly and fall back to gh api when a regular command is not enough. It covers how gh behaves outside a terminal so the agent does not add useless flags. The second skill, gh-skill, teaches the agent to search, preview, install, update and publish skills with the built-in gh skill command. GitHub CLI itself gives the agent access to issues, pull requests, releases and Actions.
Who it is for. For developers whose agents work with GitHub through the command line.
Good fit when
- The agent handles issues and pull requests via gh and trips over the output
- You want the agent to get complete lists rather than silently truncated ones
- You want to install and update skills from GitHub repositories with gh skill
Not a fit when
- Code lives on GitLab or another host rather than GitHub
- The agent already uses a GitHub MCP server and does not call gh
Example request
Use gh to find all open pull requests labeled bug with no review and show them as a tableLimitations
Requires GitHub CLI installed and authorized with gh auth login; gh skill exists only in recent versions. The skill covers usage patterns; access rights come from the user's token.
How to disable. Remove the gh skill folder from the user skills directory.
FAQ
Where does gh skill come from?
It is built into GitHub CLI; upgrade gh to a current version.
Why update the skill?
The skill tracks gh features, so the authors recommend updating it after each CLI release.
Discussion
No questions or reviews yet.
Related
SkillsThe GitHub CLI extension gh stack and an agent skill: a chain of dependent branches and PRs with rebase, submit and merge of the whole stack
A skill that searches GitHub for an already proven path to an engineering problem and adapts it to your code with a minimal change
A GitHub CLI extension and agent skill that uploads screenshots, PDFs, archives and logs to issues and pull requests and returns a ready link
The author's personal set: shared agent rules and dozens of skills for GitHub, the browser, macOS, messaging and releases, plus a sync script
skill-creator: skills from OpenAPI, GraphQL and MCP
@asnd/skill-creator
The /skill-creator command turns a link to an OpenAPI spec, GraphQL schema or MCP server into a ready skill with wrappers.
OpenClaw Agent Skills
openclaw-agent-skills
Shared skills for coding agents that work on OpenClaw projects: review and other workflows. A narrow topic for people who write OpenClaw code
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Repository stars | Main difference |
|---|---|---|---|
| GitHub CLI skills (this entry) | no | 46,798 | |
| gh-axi | no | 349 | a GitHub CLI wrapper for agents |
| agent-reviews | no | 309 | a CLI and three skills that work through review-bot comments on a PR |
| gh-image | no | 281 | a GitHub CLI extension and agent skill that uploads screenshots |
README in short
GitHub CLI is GitHub's official tool for working with repositories, issues, pull requests and Actions from the terminal. The README has an agent skills section: the skill for driving gh is installed and updated with the built-in gh skill command. The other skills under .github/skills serve the CLI's own maintainers. MIT licensed.
README badge
Original SKILL.md
--- name: gh description: Patterns for invoking the GitHub CLI (gh) from agents. Covers structured output, pagination, repo targeting, search vs list, gh api fallback. --- # Reference ## Interactivity policy `gh` already does the right thing in non-TTY contexts: it skips the pager, strips ANSI color, and errors out fast with a helpful message instead of prompting (e.g. `must provide --title and --body when not running interactively`). You don't need to defensively set `GH_PAGER` or pass `--no-pager` (no such flag exists). ## Parsing JSON Human output from `gh` is column-formatted. If you want structured data: - Add `--json field1,field2,...` for structured output. - Run a command with `--json` and **no field list** to print the full set of available fields, then pick what you need. - Use `--jq '<expr>'` for filtering without piping through a separate `jq`. - Use `--template '<go-template>'` (alongside `--json`) when you want shaped text output. Note that `--template`/`-T` collides with a body-template flag on a few commands (e.g. `gh pr create -T`, `gh issue create -T`); always check `--help` before assuming which one you're hitting. ## Pagination and silent truncation List commands cap results. - `gh issue list`, `gh pr list`, `gh search ...`: pass `-L N` (`--limit N`). The default is usually 30.