github-cli

github-cli is a skill for Claude Code, Codex from zhinjs/zhin. It costs 30 tokens per session (549 once invoked), scanned A, original, MIT.

A command-line tool connection for GitHub tasks that built-in tools do not cover. It uses GitHub's command-line program to work with issues, pull requests, releases, workflows, searches, and the GitHub API.

In plain words
What is it for?
Use it to list or inspect issues and pull requests, view checks and diffs, manage releases and workflow runs, search code or issues, or call other GitHub API endpoints. Creating, changing, merging, closing, rerunning, or publishing requires approval.
Why use it?
It provides one controlled fallback for repository information and actions while checking identity, limiting output, and distinguishing permission errors from missing resources.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to list or inspect issues and pull requests, view checks and diffs, manage releases and workflow runs, search code or issues, or call other GitHub API endpoints. Creating, changing, merging, closing, rerunning, or publishing requires approval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhinjs/zhin/github-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 zhinjs/zhin --skill github-cli
Clone the repo
git clone --depth 1 https://github.com/zhinjs/zhin

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 github-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhinjs/zhin/github-cli/github.svg)](https://agentmods.dev/skills/zhinjs/zhin/github-cli)
Your own site
<a href="https://agentmods.dev/skills/zhinjs/zhin/github-cli"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/github-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 github-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhinjs/zhin/github-cli"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/github-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 549 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00030 $0.00549
Opus 5.5 $0.00012 $0.00220
Sonnet 5.5 $0.00006 $0.00110
Haiku 4.5 $0.00003 $0.00055

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

Security

Grade A, and why

github-cli scanned grade A with 0 findings 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 25d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/adapters/github/agents/github/skills/github-cli/SKILL.md · 48 lines

What it actually says

GitHub CLI

只有内置 GitHub Skill 不覆盖任务时才加载本 Skill。当前进程通过 GH_TOKEN 提供 gh CLI 身份;先执行 gh auth status 核对身份和权限。仓库参数统一使用 owner/repo。

常用命令

gh issue list -R owner/repo --state open --limit 20 --json number,title,state,labels,assignees
gh issue view 123 -R owner/repo --json number,title,body,state,labels,assignees
gh issue create -R owner/repo --title "标题" --body "正文"
gh pr list -R owner/repo --state open --limit 20 --json number,title,state,author,mergeable
gh pr view 456 -R owner/repo --json number,title,body,state,author,mergeable,reviewDecision
gh pr checks 456 -R owner/repo
gh pr diff 456 -R owner/repo
gh release list -R owner/repo --limit 10
gh run list -R owner/repo --limit 10 --json databaseId,displayTitle,status,conclusion
gh workflow list -R owner/repo
gh search issues "关键词" --repo owner/repo --limit 10 --json number,title,state
gh search code "函数名" --repo owner/repo --limit 10 --json path,textMatches

需要其他 API 时使用 gh api 或 gh api graphql。任何创建、修改、合并、关闭、重跑或发布操作都属于外部副作用,必须遵守执行工具的审批策略。

输出控制

  • 列表必须使用 --limit,默认不超过 20 条。
  • 使用 --json 与 --jq 只保留任务需要的字段。
  • 正文最多读取 2000 字符,diff 最多读取 200 行。
  • 单次调用输出应小于 15KB。

遇到 401 检查身份与 Token;404 同时检查资源存在性和权限;422 检查必填参数。不要把命令失败推断成资源不存在。

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. 25d ago First seen · 48 lines · 30 tokens per session scan A 1e3b46723efb

Subscribe to this mod's changes

github-cli is a skill published in the GitHub repository zhinjs/zhin (136 stars, last pushed today), licensed MIT. It adds 30 tokens to every session and 549 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-21.