github-cli

A guide for using GitHub CLI, known as gh, from the terminal. GitHub is a service for hosting code and collaborating through repositories, issues, pull requests, and automated workflows.

In plain words
What is it for?
Managing repositories, issues, pull requests, releases, GitHub Actions, API queries, and other GitHub tasks from scripts or the command line.
Why use it?
It explains how to authenticate, choose the right gh commands, use the GitHub API, and protect repository changes during automation.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/and3r817/dot-claude-plugins/github-cli
Any agent
npx skills add and3r817/dot-claude-plugins --skill github-cli
Clone the repo
git clone --depth 1 https://github.com/and3r817/dot-claude-plugins

Made for: Claude Code, Codex.

Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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 $0.00052 $0.01514
Opus 5 $0.00026 $0.00757
Sonnet 5 $0.00010 $0.00303
Haiku 4.5 $0.00005 $0.00151

Measured yesterday against content hash 98c5e646502a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

github-cli scanned grade A 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 yesterday.

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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

The security guard can be configured in `~/.claude/settings.json`:

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

github-cli/skills/github-cli/SKILL.md · 200 lines

How it starts

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

GitHub CLI (gh) Usage Skill

Purpose

GitHub CLI (gh) is the official command-line interface to GitHub, enabling direct interaction with repositories, pull requests, issues, GitHub Actions, and the GitHub API without leaving the terminal. This skill provides systematic guidance for using gh effectively while maintaining security through the integrated write-guard protection.

When to Use This Skill

Invoke this skill when:

  • Creating or managing pull requests and issues via command line
  • Querying GitHub API (REST or GraphQL) for repository data
  • Automating GitHub workflows and Actions
  • Managing releases, gists, projects, or codespaces
  • Scripting GitHub operations for CI/CD pipelines
  • User explicitly mentions "gh", "github cli", or requests GitHub interactions

Core Concepts

Authentication First

Before any gh operations, verify authentication status:

gh auth status              # Check current authentication
gh auth login               # Interactive authentication setup
gh auth refresh             # Refresh expired tokens

Authentication automatically stores Git credentials when HTTPS is selected as the preferred protocol.

gh vs git Distinction

  • git: Version control operations (commit, push, pull) - works with any remote service
  • gh: GitHub-specific operations (PRs, issues, API, Actions) - GitHub only

Use gh for GitHub platform interactions; use git for repository version control.

Quick Command Reference

Common Operations

Repositories:

gh repo view OWNER/REPO     # View repository details
gh repo clone OWNER/REPO    # Clone repository
gh repo list OWNER          # List repositories

Pull Requests:

gh pr list                  # List pull requests
gh pr view 123              # View PR details
gh pr checkout 123          # Checkout PR branch
gh pr create --draft        # Create draft PR (⚠️ write operation)

Issues:

gh issue list               # List issues
gh issue view 456           # View issue details
gh issue create             # Create issue (⚠️ write operation)

Read the full file on GitHub · 200 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. yesterday First seen · 200 lines · 52 tokens per session scan A 98c5e646502a

Subscribe to this mod's changes

github-cli is a skill published in the GitHub repository and3r817/dot-claude-plugins (2 stars, last pushed 8mo ago), licensed MIT. It adds 52 tokens to every session and 1,514 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (reads agent configuration directories). 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

orchestrator

FULLY AUTONOMOUS Flutter development pipeline orchestrator. Smart routing: PM analyzes -> creates targeted tasks -> Orchestrator executes only needed agents. Supports Asana task URLs. Includes QE verification via Maestro E2E tests. 7-phase flow: PM -> TodoWrite -> Execute -> Review -> Tests -> QE E2E -> Close.

aleksandr-chaika/flutter-clean-arch-skills · 72 tokens

flutter-guide

Flutter/BLoC Clean Architecture patterns, review checklists, and testing guides. Background knowledge for flutter-dev, flutter-reviewer, flutter-tester. Not user-invocable.

aleksandr-chaika/flutter-clean-arch-skills · 39 tokens

maestro-flutter

Maestro E2E testing knowledge for Flutter apps. YAML-based flows, TestKeys, visual regression, Maestro MCP integration. Background knowledge for QE E2E testing phase.

aleksandr-chaika/flutter-clean-arch-skills · 41 tokens

enforcing-doc-hierarchy

Audit documentation against its declared hierarchy — broken links, duplicates, misplaced content, stale references, single-source-of-truth enforcement. Use for doc health reviews.

qte77/claude-code-plugins · 37 tokens

synthesizing-cc-bigpicture

Synthesizes a living big-picture meta-plan from Claude Code sessions, plans, tasks, and team communications. Use when orienting across projects, assessing reasoning modes, or creating a plan-to-plan overview.

qte77/claude-code-plugins · 50 tokens

distilling-plan-learnings

Extracts decisions, rejected alternatives, and patterns from recent plans into a persistent learnings document. Use after completing a plan or sprint.

qte77/claude-code-plugins · 33 tokens