GitHub CLI

A development skill sourced from ClawHub (105k+ downloads, 344 stars, by steipete). Provides structured access to the full GitHub platform via the gh CLI.

90Trust High
by steipetedevelopmentintermediatev1.0.0updated Feb 25, 2026
42.1kTotal Runs
94.5%Success Rate
2.6kInstalls
90Trust Score

Tags

#github#git#issues#pull-requests#ci-cd#cli#devtools#clawhub

Required Tools

bash

Inputs

NameTypeDescriptionReq
commandtextThe gh subcommand to run: issue, pr, run, release, api, repo, gist.yes
actiontextAction for the subcommand: list, create, view, close, merge, comment, edit, delete.yes
repotextRepository in owner/name format. Defaults to current directory repo.--
paramsjsonAdditional parameters as JSON (varies by command+action).--

Outputs

NameTypeDescriptionReq
resultjsonStructured JSON output from the gh command.yes

Compatible Skills

SKILL.md

---
name: github
description: Interact with GitHub using the gh CLI. Use gh issue, gh pr, gh run, and gh api for issues, PRs, CI runs, and advanced queries.
---

# GitHub Skill

Use the gh CLI to interact with GitHub. Always specify --repo owner/repo when not in a git directory, or use URLs directly.

## Pull Requests

Check CI status on a PR:

```bash
gh pr checks 55 --repo owner/repo
```

List recent workflow runs:

```bash
gh run list --repo owner/repo --limit 10
```

View a run and see which steps failed:

```bash
gh run view <run-id> --repo owner/repo
```

View logs for failed steps only:

```bash
gh run view <run-id> --repo owner/repo --log-failed
```

## API for Advanced Queries

The gh api command is useful for accessing data not available through other subcommands.

Get PR with specific fields:

```bash
gh api repos/owner/repo/pulls/55 --jq '.title, .state, .user.login'
```

## JSON Output

Most commands support --json for structured output. You can use --jq to filter:

```bash
gh issue list --repo owner/repo --json number,title --jq '.[] | "\(.number): \(.title)"'
```

## Common Commands

```bash
# Issues
gh issue list --repo owner/repo
gh issue create --repo owner/repo --title "Bug" --body "Description"
gh issue view 123 --repo owner/repo

# PRs
gh pr list --repo owner/repo
gh pr create --repo owner/repo --title "Feature" --body "Changes"
gh pr merge 55 --repo owner/repo
gh pr checkout 55 --repo owner/repo

# Repos
gh repo view owner/repo
gh repo clone owner/repo
gh repo fork owner/repo

# Releases
gh release list --repo owner/repo
gh release create v1.0.0 --repo owner/repo --title "Release 1.0" --notes "Changes"
```

## Authentication

```bash
gh auth login
gh auth status
```

## Tips

- Use --web to open results in browser
- Use --json for machine-readable output
- Use --jq to filter/transform JSON
- Use --repo when not in a git directory