gh-cli

Manage GitHub repositories, issues, pull requests, and Actions from the command line.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/marcocpt/trae_skills --skill gh-cli-marcocpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/marcocpt/trae_skills/tree/main/gh-cli
Command: npx skills add https://github.com/marcocpt/trae_skills --skill gh-cli-marcocpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It eliminates the need to switch between the terminal and the GitHub web interface by providing a complete command-line reference for every GitHub operation, from authentication to releases. ## Core Features & Use Cases - Repository & Issue Management: Create, clone, fork, and edit repositories, and manage issues with labels, assignees, and milestones directly from the shell. - Pull Request Workflows: Create, review, merge, and check the status of pull requests, including draft PRs and branch updates. - GitHub Actions & Automation: List and watch workflow runs, manage secrets, variables, and caches, and trigger workflows with custom inputs. - Use Case: A developer finishes a feature branch and runs gh pr create --title "Add login" --reviewer teammate, then watches CI with gh pr checks --watch and merges with gh pr merge --squash without leaving the terminal. ## Quick Start Ask the AI to use the gh-cli reference to create a pull request from the current branch and watch its CI checks until they complete.

Frequently Asked Questions about gh-cli

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

FAQPage Schema
How do I create a pull request from the command line with gh?

Run gh pr create with flags like --title, --body, --base, and --reviewer to open a pull request without leaving the terminal. Add --draft for a draft PR or --web to finish in the browser.

How to authenticate GitHub CLI with a token?

Run gh auth login --with-token and pipe a token file via stdin, or set the GH_TOKEN environment variable for automation. Verify the setup with gh auth status, which shows hosts, accounts, and scopes.

Can gh CLI work with GitHub Enterprise Server?

Yes, gh supports GitHub Enterprise by passing --hostname to gh auth login and related commands. You can also set GH_HOST or GH_ENTERPRISE_HOSTNAME environment variables to target an enterprise instance.

How do I filter gh CLI output with jq?

Most gh list and view commands accept --json with field names and a --jq flag for jq expressions. For example, gh issue list --json number,title --jq '.[] | .title' prints only issue titles.

Why does gh pr merge fail when checks are pending?

Branch protection rules block merging until required status checks pass. Use gh pr checks --watch to monitor them, or merge with --admin if you have administrator privileges and need to bypass protections.