github

Interact with GitHub issues, pull requests, and CI runs using the gh CLI.

Updated Feb 22, 2024
One-click install
npx skills add https://github.com/tlipoca9/dotfiles --skill github-tlipoca9
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: github
Source: https://github.com/tlipoca9/dotfiles/tree/main/home/dot_agents/skills/github
Command: npx skills add https://github.com/tlipoca9/dotfiles --skill github-tlipoca9

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working with GitHub issues, pull requests, and CI runs often requires switching to the browser or memorizing complex API calls. This Skill lets you perform these tasks directly from the terminal using the gh CLI with clear, ready-to-use command patterns. ## Core Features & Use Cases - Pull Request & CI Inspection: Check PR status with gh pr checks, list workflow runs with gh run list, and view failed step logs via gh run view --log-failed. - Advanced API Queries: Use gh api with --jq filtering to retrieve specific fields from GitHub REST API endpoints not covered by standard subcommands. - Structured JSON Output: Combine --json and --jq flags to filter and format issue and PR data for scripting and reporting. - Use Case: When a pull request's CI fails, run gh run view <run-id> --repo owner/repo --log-failed to see only the failed step logs without leaving your terminal. ## Quick Start Ask the AI to check the CI status of pull request 55 in the repository owner/repo using the gh CLI.

Frequently Asked Questions about github

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

FAQPage Schema
How do I check CI status on a GitHub pull request from the terminal?▼

Run gh pr checks <pr-number> --repo owner/repo to see the CI status of a pull request. You can also list recent workflow runs with gh run list --repo owner/repo --limit 10.

How to view only failed step logs in a GitHub Actions run?▼

Use gh run view <run-id> --repo owner/repo --log-failed to display logs for failed steps only. First run gh run view <run-id> to identify which steps failed.

Can I query the GitHub API for fields not available in gh subcommands?▼

Yes, gh api accesses GitHub REST API endpoints directly. For example, gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login' retrieves specific PR fields.

How do I get structured JSON output from gh commands?▼

Most gh commands support the --json flag for structured output. Combine it with --jq to filter results, such as gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'.

When do I need to specify --repo with gh commands?▼

Specify --repo owner/repo whenever you are not inside a git directory for that repository. You can also use full GitHub URLs directly instead of the flag.