gh-cli

gh-cli is a skill for Claude Code, Codex from znlgis/my-opencode-deepseek-config. It costs 88 tokens per session (4,960 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

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.

agentmods
npx agentmods add skills/znlgis/my-opencode-deepseek-config/gh-cli
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.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.svg" alt="Measured on agentmods" 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 4,960 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00088 $0.04960
Opus 5 $0.00044 $0.02480
Sonnet 5 $0.00018 $0.00992
Haiku 4.5 $0.00009 $0.00496

Measured today against content hash f13b9acbf997, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 327 lines

How it starts

The opening of the file, as written. The whole thing — 327 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.99.0) from agents, based on cli/cli trunk. Prefer gh over raw curl or gh apigh 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 · 327 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. today Changed · +9 lines f13b9acbf997
  2. 4d 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 (57 stars, last pushed yesterday), licensed MIT. It adds 88 tokens to every session and 4,960 once invoked, about $0.0004 per session on Opus 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

Other skills, from other repositories