gh-cli

Execute GitHub CLI commands for PR management, issue triage, and repository operations.

253|7|Updated Apr 8, 2016
One-click install
npx skills add https://github.com/fredrikaverpil/dotfiles --skill gh-cli-fredrikaverpil
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gh-cli
Source: https://github.com/fredrikaverpil/dotfiles/tree/main/stow/shared/.claude/skills/gh-cli
Command: npx skills add https://github.com/fredrikaverpil/dotfiles --skill gh-cli-fredrikaverpil

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides quick references for common gh commands to streamline automations and scripting with gh.

Core Features & Use Cases

  • Command Quick Help: Access --help for any command, ensuring correct usage.
  • Scripting Tips: Guidelines for common gh workflows (PRs, issues, runs, repos)
  • Best Practices: Use --limit and --web flags to optimize results

Quick Start

Example: list PRs: gh pr list --limit 5

Frequently Asked Questions about gh-cli

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

FAQPage Schema
How do I automate GitHub tasks from the command line?▼

GitHub CLI (gh) automates command-line GitHub operations for PR management, issue triage, CI/CD debugging, and repository operations. Use gh commands like `gh pr list`, `gh issue create`, and `gh run view` to script workflows efficiently without leaving the terminal.

What are the most common gh commands for managing pull requests and issues?▼

Common gh commands include `gh pr list --limit 5` to view PRs, `gh pr create` to open new PRs, `gh issue list` for issues, and `gh pr review` for code reviews. Each command supports --help for syntax and --json for structured output in scripts.

Can I use gh commands in automation scripts and CI/CD pipelines?▼

Yes. gh supports JSON output with --json flags, environment variable configuration for authentication, tab completion for accuracy, and alias usage for custom shortcuts. These features make gh ideal for automating workflows in scripts and CI/CD systems.

How do I optimize gh command output for large repositories?▼

Use the --limit flag to cap results, --json to parse structured data in scripts, and --web to open browser views when needed. These options prevent overwhelming output and enable efficient filtering in automation workflows.

Does gh support environment variables for configuration and authentication?▼

Yes. gh uses environment variables for authentication tokens and configuration. You can set variables to customize behavior across commands, making it easier to integrate gh into automated workflows without hardcoding credentials.