gh-cli

gh-cli is a skill for Claude Code, Codex from znlgis/my-opencode-deepseek-config. It costs 88 tokens per session (5,692 once invoked), scanned A, original, MIT.

A guide for using GitHub’s official command-line tool, gh, from coding agents. GitHub is a service for hosting code, pull requests, issues, releases, and automated workflows.

In plain words
What is it for?
It helps agents work with pull requests, issues, releases, gists, Actions runs, forks, reviews, discussions, projects, rulesets, and repository files.
Why use it?
It reduces guesswork around exact gh commands, repository targeting, pagination, and safe handling of untrusted terminal output.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit It helps agents work with pull requests, issues, releases, gists, Actions runs, forks, reviews, discussions, projects, rulesets, and repository files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/my-opencode-deepseek-config/gh-cli
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/my-opencode-deepseek-config --skill gh-cli
Clone the repo
git clone --depth 1 https://github.com/znlgis/my-opencode-deepseek-config

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gh-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/gh-cli/github.svg)](https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/gh-cli)
Your own site
<a href="https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/gh-cli"><img src="https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/gh-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/my-opencode-deepseek-config/gh-cli"><img src="https://agentmods.dev/badge/skills/znlgis/my-opencode-deepseek-config/gh-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,692 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 154
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00088 $0.05692
Opus 5.5 $0.00035 $0.02277
Sonnet 5.5 $0.00018 $0.01138
Haiku 4.5 $0.00009 $0.00569

Measured 1mo ago against content hash 1c2147acc5b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gh-cli scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

based on [cli/cli](https://github.com/cli/cli) trunk. Prefer `gh` over raw `curl`
opencode/skills/gh-cli/SKILL.md · 399 lines

How it starts

The opening of the file, as written. The whole thing — 399 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitHub CLI (gh) agent patterns

Authoritative patterns for driving the official gh CLI (v2.103.3) from agents, based on cli/cli trunk. Prefer gh over raw curl or gh api — gh handles auth, pagination, and JSON output automatically.

Security Advisory — escape-sequence injection (v2.97.0)

v2.97.0 fixed 4 escape-sequence injection vulnerabilities. These commands can inject ANSI control sequences (cursor movement, screen clearing, clipboard exfiltration) when output is rendered to a terminal:

Affected command Risk
gh gist view Untrusted gist content → terminal
gh api Untrusted API response → terminal
gh pr diff Untrusted PR content → terminal
gh release download --output - Untrusted release artifact → stdout/terminal
gh codespace logs Untrusted container output → terminal
gh agent-task view / create Untrusted task description/output → terminal

Agent rules:

  • Never pipe output to a terminal renderer — prefer --json, use > file for raw content; never gh release download --output - (stdout), always --output <path>.
  • For gh repo read-file, binary content is auto-refused and ANSI is stripped by default since v2.97; use --allow-escape-sequences only when you need raw escapes and understand the risk.
  • When fetching issues/PRs/comments from untrusted repos, prefer --json over human-readable output — JSON is not vulnerable to escape injection.

Other v2.96.0 / v2.97.0 fixes (advisory → impact → rule):

Advisory Impact Agent rule
GHSA-cg6r-mpgc-h9mm gh auth status (without --show-token) prints a token fragment for github_pat_* / ghs_* / ghu_* and the Actions GITHUB_TOKEN; classic gho_* / ghp_* are unaffected. Upgrade ≥2.97.0; redact the token line before sharing output; never ship this output to CI logs.
GHSA-mm27-mwq9-fr5g gh attestation verify --signer-repo/--signer-workflow interpolates the value into a regex without escaping metacharacters (. matches any char), so a lookalike name can satisfy a matcher intended for a trusted signer. Only safe on ≥2.97.0; else use --repo/--owner (exact string match) or manually verify the SAN.
GHSA-4fjg-2h4q-fwg3 Some REST request URLs built without escaping variable path segments → path traversal; a crafted name redirects gh to a different resource than intended. Upgrade 2.97.0; be cautious with untrusted repo/input names.
GHSA-8cg3-r6g9-fpg2 gh codespace jupyter opens the codespace-supplied URL unvalidated; a malicious codespace returns a vscode:// link → command execution on the host (variant of GHSA-p2h2-3vg9-4p87 / CVE-2024-52308). Upgrade ≥2.96.0; only use trusted codespaces.

Read the full file on GitHub · 399 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +1 lines 1c2147acc5b8
  2. 1mo ago Changed · +26 lines acb369a8bcc1
  3. 1mo ago Changed · +1 lines 6725e8845bd7
  4. 2mo ago Changed · +42 lines e821c92e2613
  5. 2mo ago Changed · +2 lines 704132750fe1
  6. 3mo ago Changed · +9 lines f13b9acbf997
  7. 3mo ago First seen · 318 lines · 88 tokens per session scan A c8b87b80a8f3

Subscribe to this mod's changes

gh-cli is a skill published in the GitHub repository znlgis/my-opencode-deepseek-config (66 stars, last pushed yesterday), licensed MIT. It adds 88 tokens to every session and 5,692 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

gh-cli compared with skills from other repositories

gh-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gh-cliznlgis/my-opencode-deepseek-configSkill66yesterdayMITA88Claude Code, Codex
pr-stewardagent-of-empires/agent-of-empiresSkill5.3ktodayMITA63Claude Code, Codex
pre-publish-reviewcode-yeongyu/oh-my-openagentSkill71ktodaynoneA161Claude Code, Codex
githubcode-yeongyu/oh-my-openagentSkill71ktodaynoneA226Claude Code, Codex
final-release-reviewsandbaseai/sandbase-skillsSkill21213d agoApache-2.0A39Claude Code
land-and-deploygarrytan/gstackSkill143ktodayMITA29Claude Code
landing-reportgarrytan/gstackSkill143ktodayMITA28Claude Code