github-cli

github-cli is a skill for Codex from DongLiStudio/personal-agent-foundation. It costs 109 tokens per session (1,031 once invoked), scanned A, original, Apache-2.0.

A guide for using GitHub CLI, a command-line tool for working with GitHub repositories and collaboration features. It covers account checks, repository information, issues, pull requests, and Actions.

In plain words
What is it for?
Use it to view repositories, issues, pull requests, checks, workflow runs, and related GitHub settings, and to plan approved GitHub changes.
Why use it?
It provides a safer, repeatable way to inspect and manage GitHub work from the terminal while checking the target repository and account first.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to view repositories, issues, pull requests, checks, workflow runs, and related GitHub settings, and to plan approved GitHub changes.

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

Made for: 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/donglistudio/personal-agent-foundation/github-cli/github.svg)](https://agentmods.dev/skills/donglistudio/personal-agent-foundation/github-cli)
Your own site
<a href="https://agentmods.dev/skills/donglistudio/personal-agent-foundation/github-cli"><img src="https://agentmods.dev/badge/skills/donglistudio/personal-agent-foundation/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/donglistudio/personal-agent-foundation/github-cli"><img src="https://agentmods.dev/badge/skills/donglistudio/personal-agent-foundation/github-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,031 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.00109 $0.01031
Opus 5.5 $0.00044 $0.00412
Sonnet 5.5 $0.00022 $0.00206
Haiku 4.5 $0.00011 $0.00103

Measured 1mo ago against content hash c2a52011b502, 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 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.

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.

template/GLOBAL/.agents/skills/github-cli/SKILL.md · 63 lines

How it starts

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

GitHub CLI

使用 gh 处理 GitHub 托管状态和协作流程。使用本地 git 处理本地仓库状态、diff、分支、commit 和 remote。优先使用官方 gh 子命令;只有高层命令无法满足时才使用 gh api。

安全起步

  1. 使用 gh 前先确认目标仓库。在本地仓库中检查 git remote -v;不在仓库中时,要求或推断 OWNER/REPO,并传入 -R OWNER/REPO。
  2. 执行 GitHub 操作前先检查认证:
    gh auth status
    
  3. 多账号场景下,如可用,先读取 {{AGENT_ROOT}}\GLOBAL\GITHUB_ACCOUNTS.md,再确认 active 账号与目标项目或用户意图匹配。
  4. 如果 active 账号不对,不要继续写操作。显式切换账号:
    gh auth switch --hostname github.com --user <username>
    
  5. 除非用户明确要求诊断凭据,否则不要打印或索要 token。避免使用 gh auth token 和 gh auth status --show-token。
  6. 涉及账号新增、重新授权、默认/专属账号路由、换机恢复、安全退出、远程仓库创建或首次 push 时,读取 references/account-routing.md。

先读后写

任何写操作前,先用只读命令建立上下文:

gh repo view OWNER/REPO
gh issue view 123 -R OWNER/REPO --comments
gh pr view 123 -R OWNER/REPO --comments
gh pr checks 123 -R OWNER/REPO --json bucket,completedAt,link,name,state,workflow
gh run list -R OWNER/REPO
gh run view <run-id> -R OWNER/REPO --log

优先使用 --json 配合 --jq 或模板获得机器可读结果。命令支持 --web 时,除非用户希望打开浏览器,否则不要使用。

写操作和确认

以下操作必须有明确用户意图后再执行:创建/编辑/关闭 Issue 或 PR、PR 评论/Review、push 分支、merge PR、创建/发布/删除 Release、workflow dispatch/rerun/cancel、Secret 或 Variable 变更、仓库创建/删除/归档/可见性变更、deploy key、SSH/GPG key,以及 GitHub CLI extension/skill 安装。

高影响写操作前,说明目标账号、仓库、操作和主要参数。可行时先使用非变更预览,例如 gh pr diff、gh pr view、gh release view、gh workflow view、gh api --method GET。

常见工作流

任务涉及 PR、Issue、Actions/CI、Release、gh api 或 GitHub CLI skills 时,读取 references/commands.md 获取具体命令模式。账号生命周期、项目路由、remote 与首次 push 读取 references/account-routing.md。

错误处理

  • 如果找不到 gh,在 Windows 上先检查 %LOCALAPPDATA%\Programs\GitHub CLI\gh.exe,再询问是否安装或修复 PATH。
  • 如果尚未登录,运行 gh auth login --hostname github.com --git-protocol https --web,并把浏览器/设备授权指引返回给用户。
  • 如果缺少 scopes,先说明为什么需要该 scope,再使用 gh auth refresh --scopes <scope>。
  • 如果 rate limited 或 unauthorized,先确认 active 账号、host 和仓库访问权限;不要重试破坏性命令。
  • 如果输出包含 secrets,回复前先脱敏。

Read the full file on GitHub · 63 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 First seen · 63 lines · 109 tokens per session scan A c2a52011b502

Subscribe to this mod's changes

github-cli is a skill published in the GitHub repository DongLiStudio/personal-agent-foundation (16 stars, last pushed 10d ago), licensed Apache-2.0. It adds 109 tokens to every session and 1,031 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

readme-update

A workflow for updating existing README files after code changes, including translated editions. It checks the target version before editing and compares the README with the repository's current code.

KieranGao/general-readme-skill · 126 tokens

git-expert

Expert-level Git version control with advanced workflows, branching strategies, and best practices for team collaboration. Use when the user mentions version control, collaboration, or workflow, or when the task involves Essential Git Commands, Advanced Git Techniques, Branching Strategies, or Conflict Resolution.

personamanagmentlayer/pcl · 57 tokens

git-assistant

Smart git operations — interactive rebase, conflict resolution, changelog generation. Helps users perform git workflows safely and efficiently, from everyday operations to complex history manipulation. Use when the user needs help with git commands, merge conflicts, rebasing, or changelog generation.

zeroclaw-labs/zeroclaw-skills · 57 tokens

git-phase-restore

Autonomous Git-based project phase restoration. Uses Git history (commits, tags, branches, diffs, semantic messages) to identify and restore any development phase automatically. Trigger for: "restore to when X worked", "go back to before Y broke", "show project phases", "undo the last feature", "roll back to [phase]"…

mahmoud20138/Tradecraft · 165 tokens

merge-batch

Prepare and merge an owner-selected PR batch with contributor credit and exact-candidate admission. Use for a pasted PR list; combined focused validation is diagnostic, and every actual landing still requires its applicable checks and authorization.

diegosouzapw/OmniRoute · 46 tokens

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens