gh-cli-patterns-5c9d16 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited gh-cli-patterns-5c9d16 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
gh already does the right thing in non-TTY contexts: it skips the pager, strips ANSI color, and errors out fast with a helpful message instead of prompting (e.g. must provide --title and --body when not running interactively). You don't need to defensively set GH_PAGER or pass --no-pager (no such flag exists).
Human output from gh is column-formatted. If you want structured data:
--json field1,field2,... for structured output.--json and no field list to print the full set ofavailable fields, then pick what you need.
--jq '<expr>' for filtering without piping through a separate jq.--template '<go-template>' (alongside --json) when you want shapedtext output. Note that --template/-T collides with a body-template flag on a few commands (e.g. gh pr create -T, gh issue create -T); always check --help before assuming which one you're hitting.
List commands cap results.
gh issue list, gh pr list, gh search ...: pass -L N (--limit N).The default is usually 30.
gh issue list / gh pr list do not expose aggregate totals liketotalCount via --json. If you need a true total, use gh api graphql to query totalCount; otherwise, treat -L as the cap for the current call.
gh api --paginate <path>. Combine with--jq and (optionally) --slurp to assemble one array.
gh infers the repo from the cwd's git remotes.
Pass --repo OWNER/REPO (-R) to override the resolved CWD repo.
gh search issues|prs|code|repos|commits|users uses GitHub's searchindex and accepts the full search syntax (is:open, author:, label:, repo:owner/name, in:title, ...). Pass the entire query as one quoted string, the same way you would for --search: gh search issues "is:open author:foo repo:cli/cli". Prefer it for anything cross-repo or filtered by author/label.
gh issue list --search "..." and gh pr list --search "..." acceptthe same syntax but are scoped to one repo.
gh api for anything --json doesn't exposeSometimes useful data isn't on the typed commands. Examples:
gh api repos/{owner}/{repo}/pulls/{n}/comments(the --comments flag on gh pr view shows issue-level comments only).
gh api graphql -f query='...' -F var=value.gh api repos/{owner}/{repo}/... - note the{owner}/{repo} placeholder is filled in for you when run from a repo with detected remotes; pass them literally if you want determinism.
gh auth status prints the active host(s), user, and which env var (ifany) is being honored.
gh auth status --json is supported.gh pr checkout <n> switches branches. Use gh pr diff <n> orgh pr view <n> if you only need to read.
NO_COLOR, CLICOLOR_FORCE, and GH_FORCE_TTY are honored. SetGH_FORCE_TTY=1 if you want TTY-style output (colors, tables, the pager, interactivity) inside an agent harness; leave it unset unless needed.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.