gh-cli-setup-skill

gh-cli-setup-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 76 tokens per session (725 once invoked), scanned B, original, Apache-2.0.

A setup procedure for the GitHub CLI, the command-line tool for working with GitHub, including installation, sign-in, and authentication checks.

In plain words
What is it for?
Use it on a new machine or whenever GitHub CLI commands fail before creating issues, tickets, or pull requests.
Why use it?
It removes a common blocker when ticket or pull-request workflows cannot run because the tool is missing or not signed in.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it on a new machine or whenever GitHub CLI commands fail before creating issues, tickets, or pull requests.

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

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-setup-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/gh-cli-setup-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/gh-cli-setup-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/gh-cli-setup-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/gh-cli-setup-skill/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-setup-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/gh-cli-setup-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/gh-cli-setup-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 725 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00076 $0.00725
Opus 5.5 $0.00030 $0.00290
Sonnet 5.5 $0.00015 $0.00145
Haiku 4.5 $0.00008 $0.00072

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

Security

Grade B, and why

gh-cli-setup-skill scanned grade B 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 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| Debian/Ubuntu | `sudo apt update && sudo apt install -y gh` (needs `gh` apt repo on older images: see https://github.com/cli/cli/blob/trunk/docs/install_linux.md) |
skills/gh-cli-setup-skill/SKILL.md · 86 lines

How it starts

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

What I do

Set up the GitHub CLI so ticket- and PR-creation flows can continue in environments where gh is missing or unauthenticated. I am the fallback referenced by ticket-creation-skill (§Prerequisites, §Common Issues) and pr-creation-workflow-skill (step 6): they invoke me when command -v gh fails, then resume their flow.

When to use me

  • command -v gh fails inside a ticket/PR flow
  • gh installed but gh auth status is not valid
  • Fresh machine setup before any GitHub operation

Steps

1. Verify absence

command -v gh || echo "MISSING"
gh auth status 2>&1 || true

If gh exists and is authenticated, return to the calling flow — nothing to do.

2. Install per OS

OS Command
macOS brew install gh
Debian/Ubuntu sudo apt update && sudo apt install -y gh (needs gh apt repo on older images: see https://github.com/cli/cli/blob/trunk/docs/install_linux.md)
Fedora/RHEL sudo dnf install -y gh
Windows winget install --id GitHub.cli (or choco install gh)

Confirm: gh --version.

3. Authenticate

gh auth login

Device flow is the default for headless/SSH environments: pick GitHub.com → SSH protocol (matches this config's git operations) → Login with a web browser, then open https://github.com/login/device and enter the one-time code. In a browser-less session, gh auth login prints the code and URL regardless — copy it to the user.

4. Verify

gh auth status
  • ✓ Logged in to github.com account <login> → done; report the login and return to the calling flow.
  • Token present but missing repo scope → re-auth with gh auth refresh -s repo (ticket/PR creation requires repo); if the refresh fails, redo step 3.

Common Issues

  • No browser available — the device flow works from any second device; hand the user the code + URL.
  • gh not found after install — new install path not on $PATH; hash -r (bash) or reopen the shell.
  • Corporate proxy — export HTTPS_PROXY before gh auth login.

Read the full file on GitHub · 86 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 · 86 lines · 76 tokens per session scan B c5ab8a827137

Subscribe to this mod's changes

gh-cli-setup-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 28d ago), licensed Apache-2.0. It adds 76 tokens to every session and 725 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-19.

Related

Other skills, from other repositories

git-ship

An automated Git release workflow that takes code changes through a branch, commit, pull request, review checks, squash merge, and return to the main branch. A pull request is a request to review and merge changes into a shared branch.

oil-oil/git-ship · 273 tokens

jig-github-sync

Use when synchronizing this repository's GitHub setup: main/develop branches, optional branch protection, and the managed local guards (the git pre-push hook plus the native Codex and Antigravity push hooks), including guard cleanup before uninstalling jig. Do not use for creating a release.

0x0w1/jig · 66 tokens

jig-version-rubric

Use when creating, reviewing, or re-setting this repository's version grading rubric at .jig/versioning.md: adopt the jig default human-intervention rubric, write a project-specific one, edit one grade, or reset to the default. Owns the rubric file; never runs a release.

0x0w1/jig · 66 tokens

jig-develop-task-flow

Use for ordinary implementation tasks in a repository that has adopted the jig develop/main model: start from develop, create a feature/fix/chore branch, complete changes and tests, squash-merge back into develop locally, and push develop. No pull requests. Execution scope comes from the current request and explicitly…

0x0w1/jig · 80 tokens

jig-github-release

Use when releasing this repository from the CLI by promoting develop to main with a fast-forward push, grading the release as patch/minor/major by what installed projects actually pay, computing the next version from the latest tag, and publishing a GitHub release with agent-written notes. No release PR, no…

0x0w1/jig · 71 tokens

jig-hotfix-flow

Use when a released defect on main must ship before the work already sitting on develop. Branches from main, lands one squashed commit on main through the guard-allowed hotfix push, tags and publishes, then merges main back into develop so the next release still fast-forwards.

0x0w1/jig · 63 tokens