Skip to content
Agentmart
Submit a tool

gh-github

Use the gh CLI to interact with GitHub when the user references GitHub URLs, repos, PRs, issues, actions, releases, or any github.com resource.

Skill by danievanzyl

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/danievanzyl-gh-github

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

Use the gh CLI to interact with GitHub when the user references GitHub URLs, repos, PRs, issues, actions, releases, or any github.com resource. Activates for GitHub URLs (github.com/*), PR/issue references (#123), repo references (owner/repo), or questions about GitHub resources.

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-github

Tools it pre-approves 3

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

  • Bash(gh
  • *),
  • Read

What's inside

Skill name
gh-github
Description
Use the gh CLI to interact with GitHub when the user references GitHub URLs, repos, PRs, issues, actions, releases, or any github.com resource. Activates for GitHub URLs (github.com/*), PR/issue references (#123), repo references (owner/repo), or questions about GitHub resources.
License
MIT
Allowed tools
Bash(gh, *),, Read
Instructions
88 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves some shell commands

Files (1)

  • SKILL.md

SKILL.md (first lines)

# GitHub CLI Skill

Use `gh` CLI for all GitHub interactions. Never use raw API calls, `curl`, or `WebFetch` for github.com URLs.

## URL Parsing

When the user provides a GitHub URL, extract the relevant parts and map to `gh` subcommands:

| URL Pattern | Command |
|---|---|
| `github.com/OWNER/REPO` | `gh repo view OWNER/REPO` |
| `github.com/OWNER/REPO/pull/N` | `gh pr view N --repo OWNER/REPO` |
| `github.com/OWNER/REPO/issues/N` | `gh issue view N --repo OWNER/REPO` |
| `github.com/OWNER/REPO/actions/runs/ID` | `gh run view ID --repo OWNER/REPO` |
| `github.com/OWNER/REPO/releases/tag/TAG` | `gh release view TAG --repo OWNER/REPO` |
| `github.com/OWNER/REPO/commit/SHA` | `gh api repos/OWNER/REPO/commits/SHA` |
| `github.com/OWNER/REPO/blob/...` | `gh api` to fetch file contents or clone |

Always include `--repo OWNER/REPO` when operating outside the current repo context.

## Common Operations

### PRs
```bash
gh pr view N                    # view PR details
gh pr view N --comments         # view PR with comments
gh pr diff N                    # view PR diff
gh pr checks N                  # view CI status
gh pr list                      # list open PRs
gh pr list --state merged       # list merged PRs
gh pr list --author @me         # my PRs
gh pr review N --approve        # approve PR
gh pr merge N --squash          # merge PR
```

### Issues
```bash
gh issue view N                 # view issue
gh issue list                   # list open issues
gh issue list --label bug       # filter by label
gh issue create --title "..." --body "..."
gh issue comment N --body "..."
```

### Repos
```bash
gh repo view OWNER/REPO         # repo overview
gh repo clone OWNER/REPO        # clone
gh repo list OWNER              # list repos for owner
gh search repos "query"         # search repos
```

### Actions / CI
```bash
gh run list                     # recent workflow runs
gh run view ID                  # run details
gh run view ID --log            # full logs
gh run view ID --log-failed     # only failed step logs
gh run rerun ID                 # rerun a failed run
gh workflow list                # list workflows
gh workflow run NAME            # trigger workflow
```

### Releases
```bash
gh release list                 # list releases
gh release view TAG             # view specific release
gh release create TAG --generate-notes
```

### API (fallback for anything gh doesn't have a subcommand for)
```bash
gh api repos/OWNER/REPO/commits/SHA
gh api repos/OWNER/REPO/pulls/N/comments
gh api repos/OWNER/REPO/actions/artifacts
gh api graphql -f query='{ ... }'
```

## Rules

- Always prefer `gh` subcommands over `gh api` when a subcommand exists.
- For PR review comments use `gh api repos/OWNER/REPO/pulls/N/comments` (review comments) vs `gh issue view N --comments` (conversation comments).
- Use `--json` flag + `--jq` for extracting specific fields when the user needs structured data.
- If `gh auth status` fails, tell the user to run `gh auth login`.
- When inside a git repo that tracks a GitHub remote, `--repo` can be omitted.
- For large outputs (logs, diffs), pipe through `head` or use `--limit` flags to avoid flooding the terminal.

From danievanzyl/code-skills, MIT.

More from danievanzyl/code-skills

Signals

Stars
1
Forks
1
Open issues
1
Last commit (this folder)
Mar 9, 2026 (7 months ago)
Last release
Oct 12, 2026 (16 days ago)

From GitHub (fetched Oct 24, 2026).

Details

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

More from danievanzyl

Cite this page

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