skills/gh-cli/SKILL.md
Standardize all GitHub interactions via the GitHub CLI (`gh`) instead of ad-hoc URLs, UI clicks, or direct REST API calls. Use when you need to read or change GitHub state (repos, issues, pull requests, reviews, check status, Actions workflows/runs, releases, labels, milestones, discussions, gists) and want deterministic output (prefer `--json` + `--jq`). Also use when the user provides a GitHub URL, including deep links like `https://github.com/OWNER/REPO/pull/123`, `.../issues/123`, `.../pull/123/files`, or comment permalinks like `#issuecomment-...`, and you need to fetch the underlying PR/issue/thread and reply. Fall back to `gh api` only when there is no first-class `gh NOUN VERB` command.
npx skillsauth add strantalis/agent-skills gh-cliInstall 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.
gh CLIUse gh for GitHub operations with explicit repo targeting, JSON output, and command help-driven discovery of flags/fields. Avoid scraping human-readable output and avoid raw REST calls unless you must (use gh api as the controlled fallback).
gh is installed and authenticated:gh --version
gh auth status
# One-off: target a repo explicitly
gh issue list -R OWNER/REPO --json number,title,url -q '.[] | "\(.number)\t\(.title)\t\(.url)"'
# Repeated work: set a default repo for this shell + directory context
gh repo set-default OWNER/REPO
Prefer first-class commands over APIs.
gh issue, gh pr, gh repo, gh run, gh workflow, gh release, etc.gh api only when the CLI lacks a dedicated command (document the endpoint and why).Avoid guessing flags/fields; discover them.
gh <command> --help to find flags and supported --json fields.gh help formatting for --json, --jq, and --template patterns.Prefer machine-readable output.
--json <fields> -q '<jq>' instead of parsing table output.Make repo targeting explicit.
-R OWNER/REPO when not operating in a known local checkout.gh repo view --json nameWithOwner -q .nameWithOwner.Treat state changes as production-impacting.
Use skills/gh-cli/references/gh-commands.md for a categorized command reference with examples for:
gh api fallback patterns (REST + GraphQL) when requiredRun a quick environment/context capture when debugging auth/repo targeting problems:
./skills/gh-cli/scripts/gh_context.sh
This prints gh version/auth status and tries to identify the active repo (when run inside a checkout).
Fetch a PR’s review feedback (reviews + PR comments + inline review comments + review threads) as JSON:
./skills/gh-cli/scripts/pr_feedback.sh -R OWNER/REPO 123
Reply back to review feedback:
# Reply to an inline review comment (REST)
./skills/gh-cli/scripts/pr_review_comment_reply.sh -R OWNER/REPO 123 987654321 --body "Thanks — fixed in 8c0ffee."
# Reply to a review thread (GraphQL)
./skills/gh-cli/scripts/pr_review_thread_reply.sh PRRT_kwDO... --body "Good catch — updated to handle nil."
development
Run an iterative, hypothesis-driven “debug mode” loop to diagnose and fix a bug using targeted instrumentation and log capture. Use when the user wants an interactive debug loop, when you need to quickly narrow a failure via added debug statements, or when you need a lightweight way to centralize logs from a repro run (via `agent-skills debug` server + SSE UI).
development
Crypto best-practices guidance and review across languages and domains. Use whenever cryptography, encryption, hashing, signatures, key/nonce/IV handling, randomness, password storage, TLS/PKI, secure channels, token formats, or "roll your own crypto" is mentioned, including high-level questions or code/design reviews. Trigger broadly to prevent subtle security mistakes.
tools
Use the local Context7 CLI in this repo to search libraries and fetch Context7 context for skills or documentation tasks. Trigger when you need to run `c7 search`/`c7 context`, resolve library IDs, or retrieve text/json outputs from Context7 via the CLI.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.