Agent skill

GitHub CLI

by zhinjs in zhinjs/zhin

使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。

MITAuto-check passed

Install GitHub CLI

skills CLI
$ npx skills add zhinjs/zhin --skill github-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zhinjs/zhin github-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/adapters/github/agents/github/skills/github-cli .claude/skills/github-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
github-cli
GitHub stars
137
Token cost
~366 tokens
SKILL.md length
51 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。

  • SKILL.md covers 常用命令 and 输出控制
  • Calls gh; needs GH_TOKEN

What it does

GitHub CLI is an agent skill from zhinjs/zhin. 使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。

Its SKILL.md is about 370 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with GitHub. The repository describes itself as: AI-native TypeScript bot framework — one codebase for 20+ chat platforms (QQ, Discord, Telegram, Slack, WeChat…). Opt-in AI agent with MCP, tools & security policies. <10MB core. The licence is MIT.

Example prompts

  • “/github-cli”

What it can do on your machine

Read from SKILL.md and the folder at commit fd5029a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GH_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

GitHub CLI loads about 366 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 51 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~366

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zhinjs/zhin at commit fd5029a, republished under its MIT licence (© zhinjs). 51 words, ~366 tokens.

Download SKILL.mdSave it as .claude/skills/github-cli/SKILL.md (or your agent's skills folder).
name
github-cli
description
使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。
platforms
github
keywords
github, gh, issue, pull request, release, workflow, search, api

GitHub CLI

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

常用命令

bash
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 检查必填参数。不要把命令失败推断成资源不存在。

© zhinjs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/adapters/github/agents/github/skills/github-cli of zhinjs/zhin.

Open the folder on GitHubat commit fd5029a

Compare with similar skills

GitHub CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

GitHub CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
GitHub CLI this skillzhinjs/zhin137—~366Automated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Diagnosing Superpowers Sessionsobra/superpowers296k3 repos~1.7kAutomated safety check: PassMIT
GitHub Deep Researchbytedance/deer-flow83k5 repos~1.3kAutomated safety check: PassMIT
Greplooponyx-dot-app/onyx32k4 repos~3.3kAutomated safety check: PassMIT
Update V8 Versionopeninterpreter/openinterpreter69k2 repos~845Automated safety check: PassApache-2.0

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Investigates a session where Superpowers went wrong, reads the transcripts on disk and produces an evidence-cited report, optionally prepared as a bug report for the maintainers.

    296k GitHub starsUsed in 3 repos~1.7k tokens
    Agent WorkflowsAuto-check passed
  • GitHub Deep Research

    bytedance/deer-flow

    Researches a GitHub repository over four rounds using the GitHub API and web search, then writes a structured markdown report with timeline, metrics and Mermaid diagrams.

    83k GitHub starsUsed in 5 repos~1.3k tokens
    Research & ScienceAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed
  • Update V8 Version

    openinterpreter/openinterpreter

    Bumps the pinned v8 and rusty_v8 versions in Codex, validates the release-candidate path with the v8-canary check, and traces failures to upstream build changes.

    69k GitHub starsUsed in 2 repos~845 tokens
    DevOps & CloudAuto-check passed
  • Check PR

    onyx-dot-app/onyx

    Checks a GitHub, GitLab, or Perforce (p4) pull request (or merge request, or shelved changelist) for unresolved review comments, failing status checks, and incomplete PR descriptions.

    32k GitHub starsUsed in 2 repos~2.3k tokens
    DevelopmentAuto-check passed

More from zhinjs/zhin

All 11 skills in this repo
  • Refactor existing Zhin.js plugins into a cleaner standard structure.

    137 GitHub stars~1.1k tokensUpdated 14 days ago
    Auto-check passed
  • Migrate legacy Zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and…

    137 GitHub stars~1.6k tokensUpdated 14 days ago
    Auto-check passed
  • Zhin Audit

    zhinjs/zhin

    Audit Zhin.js changes for security, performance, lifecycle, and architecture regressions.

    137 GitHub stars~596 tokensUpdated 14 days ago
    Auto-check: notes
  • Implement Zhin.js plugins with Plugin Runtime. An agent skill from zhinjs/zhin.

    137 GitHub stars~1.6k tokensUpdated 14 days ago
    Auto-check passed
  • Wecom

    zhinjs/zhin

    企业微信平台管理能力。当用户在企业微信中请求用户信息查询、部门架构查询、 发送文本消息时使用。即使用户没有提到企业微信,只要上下文是企业微信/WeCom 场景且涉及用户查询、部门管理或消息发送,就应触发。

    137 GitHub stars~297 tokensUpdated 14 days ago
    Auto-check passed
  • Checkin

    zhinjs/zhin

    签到积分系统查询能力。当用户想查看自己的积分、签到排行榜、连签天数、 或了解签到奖励时使用。日常签到通过聊天命令触发,此技能提供积分查询的 AI 工具。

    137 GitHub stars~167 tokensUpdated 14 days ago
    Auto-check passed

Works with

Questions about GitHub CLI

What does GitHub CLI do?

使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。. GitHub CLI is an agent skill from zhinjs/zhin.

How do I install GitHub CLI in Claude Code?

Run `npx skills add zhinjs/zhin --skill github-cli -a claude-code`. Or copy the skill folder (plugins/adapters/github/agents/github/skills/github-cli in zhinjs/zhin) into .claude/skills/github-cli in your project. Claude Code loads it when a task matches its description.

How do I install GitHub CLI in Codex?

Run `npx skills add zhinjs/zhin --skill github-cli -a codex`. Or copy the skill folder (plugins/adapters/github/agents/github/skills/github-cli in zhinjs/zhin) into .agents/skills/github-cli in your project. Codex loads it when a task matches its description.

Can I use GitHub CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhinjs/zhin --skill github-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/github-cli, .gemini/skills/github-cli, .github/skills/github-cli and .opencode/skills/github-cli in your project.

What does GitHub CLI need to run?

Going by SKILL.md and its folder, GitHub CLI needs the command-line tools its instructions call (gh) and credentials named GH_TOKEN.

Does GitHub CLI access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is GitHub CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does GitHub CLI use?

GitHub CLI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does GitHub CLI use?

About 366 tokens (SKILL.md is roughly 1.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to GitHub CLI?

Skills that share tags, products or a category with GitHub CLI: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Diagnosing Superpowers Sessions (obra/superpowers, 296k stars), GitHub Deep Research (bytedance/deer-flow, 83k stars) and Greploop (onyx-dot-app/onyx, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains GitHub CLI?

zhinjs (a GitHub organization) maintains it in zhinjs/zhin, which has 137 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on September 23, 2026.

Source: zhinjs/zhin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.