skills/gh/SKILL.md
Use the GitHub CLI (`gh`) for repository operations including PR and issue inspection, GitHub search, checks, and API calls. Use when a user asks for GitHub URLs, PR metadata, issue details, checks, or repository automation.
npx skillsauth add adampoit/ai ghInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use gh for GitHub-related tasks.
gh pr view 123 --json number,title,body,commits,files,headRefName,url
View one PR as JSON:
gh pr view 123 --json number,title,body,commits,files,headRefName,url
List open PRs:
gh pr list --state open --json number,title,headRefName,url
View one issue as JSON:
gh issue view 456 --json number,title,body,comments,url
Prefer gh search for code/repo/issue/PR discovery.
Code search:
gh search code "TODO repo:owner/repo path:src" --limit 20
Repository search:
gh search repos "topic:cli language:go" --limit 20 --json name,description,url
Issue search:
gh search issues "repo:owner/repo is:issue is:open label:bug" --limit 50 --json number,title,url,state,updatedAt
PR search:
gh search prs "repo:owner/repo is:pr is:open author:alice" --limit 50 --json number,title,url,state,updatedAt
Search tips:
repo:, path:, language:, is:open, author:, label:rg) in checked-out repos when validating contextView checks for a PR branch:
gh pr checks 123
View run details with links:
gh run list --limit 20
Use gh api when subcommands do not expose required fields.
gh api repos/:owner/:repo/pulls --method POST -f title='My PR' -f head='feature-branch' -f base='main'
Prefer machine-readable output for automation:
--json where availablegh api output with jq for deterministic extraction of fields like number, title, body, and urlWhen the user provides a GitHub URL, parse owner/repo/number and fetch details with gh commands instead of browser scraping.
Examples:
gh pr view <number> --repo <owner>/<repo> ...gh issue view <number> --repo <owner>/<repo> ...Default to read-only operations unless the user explicitly requests mutation.
Read-only examples:
gh pr view, gh pr list, gh pr checksgh issue view, gh search ..., gh run list, gh api GET callsMutating examples (require explicit user intent):
gh pr create, gh pr merge, gh pr closegh issue create, gh issue edit, gh issue closegh api POST/PATCH/DELETE callstools
Use tmux instead of background bash for long-running, interactive, inspectable, or user-attachable terminal processes. Use for development servers, watch-mode tests, REPLs, debuggers, interactive CLIs, log tailing, and commands that may run indefinitely or need later input/inspection.
tools
Use Jujutsu (`jj`) for version control operations including status, history, diffs, commits, rebases, splits, squashes, and Git interop. Use when a repository is initialized for jj or the user asks for jj/Jujutsu workflows.
tools
Manage tasks with the `task` (Taskwarrior) CLI. Use when the user asks to review tasks, get task summaries, add work items, or complete tasks.
business
Search Slack messages and read Slack threads. Use when the user asks to search Slack, find messages, look up conversations, read thread replies, or retrieve Slack content. Triggers on requests involving Slack message lookup, conversation history, or thread reading.