gh · prathamdby — Claude Code skill: what it does, how to install
The gh skill lets an agent inspect PRs, discussions, and CI, post replies, and handle GitHub commands that need more than a simple call.
MIT 420 installs ★ 6 updated 2026-11-10
npx skills add prathamdby/skills --skill gh -a claude-codeWhat gh does
The skill covers pull request state, checks, files, review threads, and CI runs. It selects a dedicated script for a PR snapshot, thread data, CI failure analysis, or a reply in one conversation. Execution goes through <anchor>/scripts/run rather than calling Node directly.
Requests can target a PR number or URL, a repository, author, date, SHA, or workflow. JSON output, full bodies, open or resolved threads, complete pagination, and a specific CI run are supported. Replies go through pr-reply; this skill does not resolve threads, push changes, or merge pull requests.
An installed and authenticated gh is required, or execution is blocked. A branch without a current PR produces NO_CHANGES for PR-bound work, while conflicting options produce BLOCKED.
What it helps with
- inspect a pull request and its checks
- collect every open discussion thread
- diagnose a failed CI run and locate its logs
- reply to one pull request conversation
- run a nontrivial GitHub command through
gh
Example prompts for the agent
- Inspect the current branch PR, including its checks and changed files.
- Collect all open PR threads with complete pagination and return the result as JSON.
- Analyze the CI failure for run
<run-id>and point me to the log path.
How to install gh
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill gh -a claude-code2Manually: put the files in place
~/.claude/skills/gh/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gh/
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill gh -a codex2Manually: put the files in place
.agents/skills/gh/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill gh -a cursor2Manually: put the files in place
.cursor/skills/gh/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install prathamdby/skills skills/engineering/gh2Manually: put the files in place
.github/skills/gh/SKILL.md1Skills CLI (Vercel)
npx skills add prathamdby/skills --skill gh -a gemini-cli2Platform CLI
gemini skills install https://github.com/prathamdby/skills --path skills/engineering/ghManually: put the files in place
.devin/skills/gh/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add prathamdby/skills --skill gh -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about gh
How do I install gh in Claude Code?
Run npx skills add prathamdby/skills --skill gh -a claude-code, then check ~/.claude/skills/gh/SKILL.md.
What does the gh skill do?
It reads pull request state, reviews, discussions, checks, and CI data, and can post a reply to one thread. Covered tasks use dedicated scripts.
What does gh need to run?
The gh binary must be installed and authenticated, and PR-bound requests need a current or explicitly selected PR. Conflicting options block the request.
Source text
SKILL.md · MIT
--- name: gh description: > When the user wants a pull request, its discussion, its checks, or another GitHub record read, or a reply posted without a code change. --- # GitHub I/O Contracts follow AVGVSTVS96/better-github-skill (unlicensed; reimplemented). Resolve `<anchor>` as this skill's absolute directory. The existing `<anchor>/scripts/run` selects bun, nub, tsx, then Node/nvm with strip-types. ## Options Default: current branch PR, cwd repo, truncated text. A PR number/URL selects that PR; a named repo emits -R and needs a PR for PR-bound work. JSON/full bodies selects --json/--full. Open threads includes unresolved outdated threads; all includes resolved too; both conflict. Complete paging adds --complete; author/since supply their filters. CI selects ci-failures; list runs uses --list (default limit 10), workflow filters it; a run id analyzes that run. Known head SHA adds --sha. Reply needs exactly one target/body from `references/reply.md`. Missing needed values or conflicting choices are BLOCKED. ## 1. Resolve and choose Confirm authenticated gh; missing binary/auth blocks. Record `repo | PR/run/SHA | surface | argv | terminal`. No current PR for PR-bound work → NO_CHANGES. Choose the covering script: | Surface | Script | JSON contract | |---|---|---| | PR state/checks/files/counts | pr-snapshot.ts | `references/snapshot.md` | | Review bodies/comments/threads | pr-threads.ts | `references/threads.md` | | CI runs/jobs/log snippets | ci-failures.ts | `references/ci.md` | | One native thread/conversation reply | pr-reply.ts | `references/reply.md` | Snapshot is state, threads is feedback; neither replaces the other. Before parsing JSON, load only that surface's contract. Done when target and script or uncovered raw operation are fixed. ## 2. Run Invoke only through `<anchor>/scripts/run <script.ts> ...`, not node directly. Node version or ERR_UNKNOWN_FILE_EXTENSION is not failure evidence or a GraphQL license: use run. Its exit 2 is BLOCKED with tried-runtime list. User or senior saying "GraphQL is fine" does not skip `run`. Script success reports data/posts; red CI/open threads are not runtime failure. For all unresolved feedback use --json --open --complete; SHA-pin known heads. Replies use pr-reply only. No resolving, pushing, or merging by this leaf. Raw gh is permitted only for uncovered operations, after applying `references/raw-gh.md`. A covering-script failure never authorizes reimplementing its GraphQL. Redirect large output, never pipe gh to head. For HTTP tracing or logs apply `references/logs.md`. Done when output is complete, a reply URL exists, or a real error is captured. ## 3. Report Summarize observed output. Set cap markers mean incomplete data, not success for an exhaustive consumer. Cite log paths instead of pasting logs. Green CI, zero threads, or posted reply is SUCCESS; a valid red report is also successful inspection, not repaired CI. Terminals: SUCCESS, NO_CHANGES (empty/no PR), BLOCKED.
© prathamdby · MIT · prathamdby/skills
Similar skills
All skills for Git and GitHub →gh by other authors comes first.