gh
Skill1 starsChanged 42 days ago0BSDView on GitHub
This skill covers the GitHub CLI (gh, v2.102.x as of Oct 2026). Use it for auth and token handling, gh api REST/GraphQL patterns, repo/pr/ issue/workflow/run/release commands, secrets and variables, attestation verification, extensions, and scripting flags (--json/--jq/--template).
- Reads credentials
- Installs packages
- Commits and pushes
In this repository75 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentsSkill
- android-connectivitySkill
- android-devSkill
- android-mediaSkill
- android-performanceSkill
- anti-hallucinationSkill
- blue-teamingSkill
- bug-huntingSkill
- cdnSkill
- ci-securitySkill
- contextSkill
- coolifySkill
- dep-versionsSkill
- devopsSkill
- devsecopsSkill
- dockerSkill
- electronSkill
- firecrackerSkill
- gatewaySkill
- goSkill
- i18nSkill
- k3sSkill
- lxmfSkill
- lxmfySkill
- mcp-toolkitSkill
- media-stackSkill
- mediawikiSkill
- memorySkill
- meshchatxSkill
- mesh-vpnSkill
- micronSkill
- microservices-haSkill
- nebulaSkill
- no-slopSkill
- no-trickerySkill
- opensubsonicSkill
- osintSkill
- owaspSkill
- pnpmSkill
- podmanSkill
- project-scaffoldSkill
- python-packagingSkill
- qaSkill
- releaseSkill
- research-methodsSkill
- reticulum-goSkill
- reticulumSkill
- rngitSkill
- rnsSkill
- rustSkill
- sastSkill
- shipped-textSkill
- stylometrySkill
- surrealdb-cliSkill
- surrealdb-docsSkill
- surrealdb-jsSkill
- surrealdb-pythonSkill
- surrealdbSkill
- surrealdb-vectorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Read this file for the command map and scripting patterns.
- Very specific: line 22
Run gh <cmd> --help or check https://cli.github.com/manual/gh for flag-level detail.
- Very specific: line 24
Run --json bare on a list/view command to enumerate its fields.
- Very specific: line 109
Every list/view supports --json <fields> + --jq/--template.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to use this skill
- You are scripting GitHub operations in shell or CI.
- You need
gh apifor a REST or GraphQL endpoint, with pagination. - You are watching runs, downloading artifacts, or managing releases.
- You are verifying artifact attestations or managing secrets/vars.
How to use
- Read this file for the command map and scripting patterns.
- Load references/api.md for
gh apiREST and GraphQL recipes, pagination, output shaping, and token hygiene. - Run
gh <cmd> --helpor check https://cli.github.com/manual/gh for flag-level detail. - Run
--jsonbare on a list/view command to enumerate its fields.
Examples
- "Watch the failing CI run and dump only the failed job log."
- "Page through all repos in an org via gh api graphql."
- "Verify the provenance attestation on a release tarball."
- "Set a repo secret for Actions from stdin."
GitHub CLI
Version and install
- Latest v2.102.0 (Sept 30, 2026). Releases are immutable since
2.93 and ship SLSA attestations:
gh at verify -R cli/cli <asset>. - Install:
brew install gh,winget install GitHub.cli, official APT repo (cli.github.com/packages), RPM, or release binaries. - v2.101.0 caveat: the APT/RPM repo signing key rotated. Installs
made before April 8, 2026 must refresh the keyring at
/etc/apt/keyrings/githubcli-archive-keyring.gpg. - v2.102 security fixes: symlink path writes in
gh release download/run download/attestation download/repo read-file --output, attestation--source-refcase-insensitive compare,--signer-workflowprefix-match bypass,gh skill searchoption injection. - v2.97 security fixes: terminal escape injection in
gh api/pr diff/gist view, partial token leaks ingh auth status, attestation--signer-*regex bypass. Keep gh current.
Auth
gh auth login- browser OAuth device flow (code auto-copied to clipboard since 2.101.gh config set clipboard disabledopts out) or--with-tokenon stdin.--hostnamefor GHES.- Token precedence:
GH_TOKEN>GITHUB_TOKEN> stored~/.config/gh/hosts.yml. GHES:GH_ENTERPRISE_TOKEN>GITHUB_ENTERPRISE_TOKEN. gh auth tokenprints the token for scripts:git clone https://x-access-token:$(gh auth token)@github.com/o/r.gh auth setup-gitinstalls gh as the git credential helper.gh auth switchfor multi-account.gh auth refresh -s <scope>.
Core commands
gh repo create|clone|fork|view|list|sync|rename|archive|read-file| read-dir- read-file/read-dir fetch repo content without cloning.gh pr create|list|view|checkout|merge|diff|review|checks|ready| status-pr checkout --worktree PATH(2.98+),pr merge --squash --delete-branch --auto.gh issue ...-issue develop --checkout --worktree(2.99),--attachon create/edit/comment for uploads (2.99).gh workflow run <name> -f input=value,workflow enable|disable.gh run list|view|watch|rerun|download|cancel-run watch --exit- statusfor CI gating,run view --log-failed,-j <job>for one job's log.gh release create v1.2.3 --generate-notes,release download <tag> -p '*.tar.gz'(public assets need no auth).gh secret set NAME -b "$(cat file)" -a actions/gh variable set. Scopes:-R repo,--org,--env.gh attestation verify <file|oci://ref> -R owner/repo,--signer-workflow,at download,at trusted-root.gh search repos|issues|prs|code|commits- semantic/hybrid issue search via--search-type(2.98).gh ruleset check,gh cache list|delete,gh status,gh agent-task(Copilot coding agent),gh skill(agent skills).
gh api
gh api repos/{owner}/{repo}/issues-{owner}/{repo}/{branch}placeholders resolve from the git remote.-X,-H,-f(raw string field),-F(typed:=int,@file,@-stdin).- GraphQL:
gh api graphql -f query='...' -F owner=$OWNER. - Pagination:
--paginatefollows REST Link headers and GraphQLpageInfo.endCursorautomatically. Add--slurpto merge pages. - Output:
--jq '.items[].name'(built-in jq),--templateGo templates ({{range}},{{tablerow}},{{pluck}},{{timeago}}). gh api rate_limitfor quota.GH_DEBUG=apitraces requests.
Extensions and scripting
gh ext install owner/repo,upgrade --all,browse. Extensions aregh-*executables. Install needs no auth since 2.90. Notable: gh-dash (TUI), gh-poi (prune merged branches), gh-models, gh-aw, officialwebhook(2.100).gh copilotnow forwards to the Copilot CLI (gh-copilot extension deprecated Oct 2025).- Every list/view supports
--json <fields>+--jq/--template.GH_FORCE_TTY,GH_PAGER,GH_REPO,GH_HOSTsteer scripting.
Sources
- Manual: https://cli.github.com/manual
- Releases: https://github.com/cli/cli/releases
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

