Skip to content
Agentmart
Submit a tool

gh

Complete GitHub tasks using the gh CLI.

Skill by paulnsorensen

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/paulnsorensen-gh

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Complete GitHub tasks using the gh CLI. Use for any GitHub operation — PRs, issues, CI checks, repo management, releases, code search. Use git commands (log, diff, status) for local context. Use when the user says "create PR", "merge PR", "check CI", "list issues", "review PR", "PR status", "close issue". Do NOT use for local git operations like commit, stage, or push — use commit skill for those. Do NOT use for code quality review — use age or code-review. Examples: "review PR 14", "create a PR for my branch", "what's the CI status on this PR?", "list open issues labeled bug", "merge PR 23 with squash", "show me issue 42 with comments".

Use cases: devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/gh

Tools it pre-approves 1

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • bash

What's inside

Skill name
gh
Description
Complete GitHub tasks using the gh CLI. Use for any GitHub operation — PRs, issues, CI checks, repo management, releases, code search. Use git commands (log, diff, status) for local context. Use when the user says "create PR", "merge PR", "check CI", "list issues", "review PR", "PR status", "close issue". Do NOT use for local git operations like commit, stage, or push — use commit skill for those. Do NOT use for code quality review — use age or code-review. Examples: "review PR 14", "create a PR for my branch", "what's the CI status on this PR?", "list open issues labeled bug", "merge PR 23 with squash", "show me issue 42 with comments".
License
MIT
Allowed tools
bash
Instructions
131 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# gh

GitHub operations via the `gh` CLI and `git` (read-only).

**Rule**: `git` is read-only here — log, diff, status only. No commits, no push via git.

---

## CLI Rules

**Never pipe `gh` output.** Use `--json`, `--jq`, and `--template` flags instead:

```bash
# WRONG — pipe needs external jq
gh pr list --json number | jq '.[].number'

# RIGHT — inline jq
gh pr list --json number --jq '.[].number'

# Complex filtering
gh pr list --json number,title,state --jq '.[] | select(.state == "OPEN") | .title'

# Go template alternative
gh pr view 42 --json title --template '{{.title}}'
```

**Never use heredoc `--body` with `gh pr create`.** Use `--body-file` instead.

---

## Operation Reference

### Pull Requests

| Operation | Command |
|-----------|---------|
| View PR | `gh pr view <number>` |
| PR diff | `gh pr diff <number>` |
| PR checks / CI status | `gh pr checks <number>` |
| List open PRs | `gh pr list --state open` |
| Create PR | `gh pr create --title "..." --body-file <file>` |
| Merge PR | `gh pr merge <number> --squash` |
| Review PR | `gh pr review <number> --approve` / `--request-changes` |
| List review comments | `gh api repos/{owner}/{repo}/pulls/<number>/comments` |

### Issues

| Operation | Command |
|-----------|---------|
| View issue | `gh issue view <number>` |
| List issues | `gh issue list --state open --label bug` |
| Create issue | `gh issue create --title "..." --body "..."` |
| Close issue | `gh issue close <number>` |
| Search issues | `gh search issues "query" --repo owner/repo` |

### CI/CD

| Operation | Command |
|-----------|---------|
| Watch a run | `gh run watch <id>` |
| View failed logs | `gh run view <id> --log-failed` |
| Re-run failed jobs | `gh run rerun <id> --failed` |
| Trigger workflow | `gh workflow run <workflow>` |
| List runs | `gh run list --workflow <name>` |

### Releases

| Operation | Command |
|-----------|---------|
| Create release | `gh release create <tag> --notes "..."` |
| Delete release | `gh release delete <tag>` |
| List releases | `gh release list` |

---

## Git Context (read-only)

Before creating PRs or writing descriptions, use git for local context:

```bash
git log --oneline origin/main..HEAD   # commits going into the PR
git diff origin/main...HEAD           # full diff for PR body
git status                            # working tree state
```

---

## Common Workflows

### Create a PR

```bash
git log --oneline origin/main..HEAD
git diff --stat origin/main...HEAD

gh pr create --title "Add user authentication" --body-file /tmp/pr-body.md
```

### Review a PR

```bash
gh pr view 42
gh pr diff 42
gh pr checks 42
gh api repos/{owner}/{repo}/pulls/42/comments
```

### Investigate Failed CI

```bash
gh pr checks 42
gh run list --limit 5
gh run view <run-id> --log-failed
```

### Merge a PR

```bash
gh pr merge 42 --squash

From paulnsorensen/cheese-flow, MIT.

More from paulnsorensen/cheese-flow

Signals

Stars
1
Forks
1
Open issues
25
Last commit (this folder)
Apr 27, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from paulnsorensen

Cite this page

gh skill. Agent Mart. https://agentmart.dev/skills/paulnsorensen-gh (last updated 2026-10-24)