gh

gh is a skill for Claude Code, Codex from open-gsd/gsd-pi. It costs 141 tokens per session (2,253 once invoked), scanned A, original, MIT.

A setup and usage guide for GitHub’s command-line program, called gh. GitHub is a service for hosting code and collaborating through issues, pull requests, releases, and automated workflows.

In plain words
What is it for?
Use it to install or verify gh, authenticate with a GitHub token, and work with issues, pull requests, releases, projects, labels, and workflow status.
Why use it?
It helps an agent use GitHub when the gh program is missing, authentication needs checking, or the repository uses a proxy instead of the usual GitHub address.

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 node src/resources/skills/github-workflows/references/gh/scripts/ci_monitor.cjs.

About the project

GSD Pi is a command-line coding agent and project workflow system that plans, implements, verifies, and tracks software work through milestones, tasks, Git worktrees, and stored project notes. It is for developers who want structured, longer-running agent sessions using different model providers. The catalogue entries extend GSD Pi with skills and agents.

open-gsd/gsd-pi · 1,201 stars · on GitHub · opengsd.net

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/open-gsd/gsd-pi
agentmods
npx agentmods add skills/open-gsd/gsd-pi/gh

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/open-gsd/gsd-pi/gh.svg)](https://agentmods.dev/skills/open-gsd/gsd-pi/gh)
Your own site
<a href="https://agentmods.dev/skills/open-gsd/gsd-pi/gh"><img src="https://agentmods.dev/badge/skills/open-gsd/gsd-pi/gh.svg" alt="Measured on agentmods" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,253 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00141 $0.02253
Opus 5 $0.00071 $0.01126
Sonnet 5 $0.00028 $0.00451
Haiku 4.5 $0.00014 $0.00225

Measured 6d ago against content hash 722b961e69f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gh 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 6d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/experiment_cleanup.py, scripts/github_project_setup.py, tests/__init__.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/resources/skills/github-workflows/references/gh/SKILL.md · 277 lines

How it starts

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

GitHub CLI (gh) — Setup and Usage

Purpose

Ensures the GitHub CLI (gh) is available and provides correct usage patterns for AI agents operating in environments where gh may not be pre-installed and where git remotes point to local proxies instead of github.com.

When to Use

  • gh command not found or shutil.which("gh") returns None
  • Need to interact with GitHub API (issues, PRs, releases, workflows)
  • Repository remote does not point to github.com (proxy environments)
  • Need authenticated GitHub operations with GITHUB_TOKEN
  • Managing GitHub Issues, Projects V2, Milestones, or Labels

Installation

gh is assumed to be already installed via the system package manager:

  • macOS: brew install gh
  • Windows: winget install GitHub.cli
  • Linux (Debian/Ubuntu): apt install gh

For CI monitoring operations (watching workflow runs, checking statuses, waiting for jobs), use ci_monitor.cjs:

node src/resources/skills/github-workflows/references/gh/scripts/ci_monitor.cjs

Authentication

GITHUB_TOKEN environment variable provides automatic authentication. No manual gh auth login needed.

# Verify authentication
gh auth status

If GITHUB_TOKEN is set, gh authenticates automatically for all API calls.


Repository Detection

<repo_detection>

Git remote points to a local proxy (127.0.0.1), NOT github.com. Every gh command fails without explicit repo specification:

failed to determine base repo: none of the git remotes configured for this
repository point to a known GitHub host.

RULE: Pass -R (or --repo) on EVERY gh command:

gh <command> -R open-gsd/gsd-pi

This applies to ALL gh subcommands: pr, issue, run, api, release, project, etc.

</repo_detection>


Common Commands (v2.87.0)

<gh_commands>

Pull Requests

# List open PRs
gh pr list -R open-gsd/gsd-pi

# View PR details
gh pr view <number> -R open-gsd/gsd-pi

# Check PR CI status
gh pr checks <number> -R open-gsd/gsd-pi

# Create PR
gh pr create -R open-gsd/gsd-pi --title "title" --body "body"

# View PR comments
gh api repos/open-gsd/gsd-pi/pulls/<number>/comments

Read the full file on GitHub · 277 lines

Files

What ships with it

8 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. 6d ago First seen · 277 lines · 141 tokens per session scan A 722b961e69f0

Subscribe to this mod's changes

gh is a skill published in the GitHub repository open-gsd/gsd-pi (1,201 stars, last pushed today), licensed MIT. It adds 141 tokens to every session and 2,253 once invoked, about $0.0007 per session on Opus 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.