gh-cli

gh-cli is a skill for Claude Code, Codex from cdbattags/ai. It costs 53 tokens per session (1,250 once invoked), scanned A, original, MIT.

A command-line tool for working with GitHub, the code-hosting service, from a terminal. It covers pull requests, issues, releases, automated checks, and GitHub API requests.

In plain words
What is it for?
Create, inspect, review, merge, and check pull requests; manage issues and releases; run GitHub API calls; and check automated workflows.
Why use it?
It avoids switching between web pages and the terminal for routine GitHub work. It also gives the coding agent direct commands for checking changes and build results.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is gh release upload v1.2.0 ./dist/*.tar.gz.

Good fit Create, inspect, review, merge, and check pull requests; manage issues and releases; run GitHub API calls; and check automated workflows.

Compare 6 skills from other repositories ↓
View source ↗ cdbattags/ai
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/cdbattags/ai
agentmods
npx agentmods add skills/cdbattags/ai/gh-cli

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/cdbattags/ai/gh-cli/github.svg)](https://agentmods.dev/skills/cdbattags/ai/gh-cli)
Your own site
<a href="https://agentmods.dev/skills/cdbattags/ai/gh-cli"><img src="https://agentmods.dev/badge/skills/cdbattags/ai/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/cdbattags/ai/gh-cli"><img src="https://agentmods.dev/badge/skills/cdbattags/ai/gh-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,250 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.00053 $0.01250
Opus 5.5 $0.00021 $0.00500
Sonnet 5.5 $0.00011 $0.00250
Haiku 4.5 $0.00005 $0.00125

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

src/skills/gh-cli/SKILL.md · 205 lines

How it starts

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

GitHub CLI (gh)

Prerequisites

  • User is already authenticated (gh auth login completed)
  • All gh commands require required_permissions: ["full_network"] in the Shell tool

Pull Requests

# Create PR with HEREDOC body
gh pr create --title "feat: add caching layer" --body "$(cat <<'EOF'
## Summary
- Added Redis caching for API responses
- Cache TTL configurable via env var

## Test plan
- [ ] Unit tests pass
- [ ] Manual smoke test
EOF
)"

# List open PRs
gh pr list

# View PR details (accepts number, URL, or branch name)
gh pr view 42

# View in browser
gh pr view 42 --web

# Check CI status
gh pr checks 42

# View PR diff
gh pr diff 42

# Merge (auto-selects merge method)
gh pr merge 42

# Squash merge with auto-delete branch
gh pr merge 42 --squash --delete-branch

# Add review
gh pr review 42 --approve
gh pr review 42 --request-changes --body "Needs error handling"

# Checkout a PR locally
gh pr checkout 42

Issues

# Create issue
gh issue create --title "Bug: login fails on Safari" --body "Steps to reproduce..."

# Create with labels and assignee
gh issue create --title "..." --label bug --label urgent --assignee @me

# List issues (default: open)
gh issue list
gh issue list --label bug --state closed

# View issue
gh issue view 99

# Comment on issue
gh issue comment 99 --body "Fixed in PR #42"

# Close issue
gh issue close 99

# Create a branch linked to an issue
gh issue develop 99 --checkout

GitHub Actions

# List recent workflow runs
gh run list

# List runs for a specific workflow
gh run list --workflow ci.yml

# View a run's details and jobs
gh run view <run-id>

# Watch a run in real time (non-interactive: use --exit-status)
gh run watch <run-id> --exit-status

# Download artifacts
gh run download <run-id>

# Re-run failed jobs
gh run rerun <run-id> --failed

Releases

# Create release from tag
gh release create v1.2.0 --title "v1.2.0" --notes "Release notes here"

# Create release with auto-generated notes
gh release create v1.2.0 --generate-notes

# Upload assets to existing release
gh release upload v1.2.0 ./dist/*.tar.gz

# List releases
gh release list

# View a release
gh release view v1.2.0

Read the full file on GitHub · 205 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 First seen · 205 lines · 53 tokens per session scan A da9b6a07400d

Subscribe to this mod's changes

gh-cli is a skill published in the GitHub repository cdbattags/ai (5 stars, last pushed 7mo ago), licensed MIT. It adds 53 tokens to every session and 1,250 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

cognitive-version-snapshot

A controlled process for saving a major new version of a system document as a dated snapshot.

TashanGKD/tashan-cursor-skills · 63 tokens

git-workflow-and-versioning

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple…

addyosmani/agent-skills · 89 tokens

git-advanced-workflows

Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.

wshobson/agents · 54 tokens

workflow-patterns

Use this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the verification protocol.

wshobson/agents · 35 tokens

finishing-a-development-branch

A process for finishing a completed development branch. A branch is a separate line of code changes that can later be merged or submitted as a pull request.

jnMetaCode/superpowers-zh · 25 tokens

git-ops

Close out a local coding task on the bound daemon — stage, commit, branch, merge, push via cloud git — and when a merge conflicts, STOP and escalate with the file list instead of auto-resolving. Push reaches only the bare replica; prod-triggering tags are refused.

Prismer-AI/PrismerCloud · 62 tokens