github

A guide for using GitHub CLI, a terminal program for working with GitHub repositories, pull requests, issues, automated workflows, releases, and API requests.

In plain words
What is it for?
It helps with repository checks, pull request and issue work, GitHub Actions, releases, API calls, and authentication troubleshooting.
Why use it?
It gives you a consistent way to inspect GitHub work and explains how to apply changes safely when using the terminal.

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/ivancampos/agents/github
Any agent
npx skills add IvanCampos/agents --skill github
Clone the repo
git clone --depth 1 https://github.com/IvanCampos/agents

Made for: Claude Code, Codex.

Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 938 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 $0.00071 $0.00938
Opus 5 $0.00036 $0.00469
Sonnet 5 $0.00014 $0.00188
Haiku 4.5 $0.00007 $0.00094

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

Security

Grade A, and why

github 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 yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/gh_preflight.sh), 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.

skills/github/SKILL.md · 102 lines

How it starts

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

GitHub CLI

Overview

Use gh for day-to-day GitHub operations from the terminal. Prefer read-only commands first, then run mutating commands only after clear user intent.

Quick Start

  1. Check installation and auth:
gh --version
gh auth status
  1. Establish repository context:
scripts/gh_preflight.sh --repo owner/repo
  1. If not in the target repository, pass -R owner/repo to commands.
  2. Use --json with --jq or --template for automation-friendly output.

Workflow

  1. Establish context first.
  • Determine GitHub host (github.com by default), repository, and branch.
  • Run scripts/gh_preflight.sh before multi-step operations.
  1. Read current state.
  • Use list, view, and status subcommands before changing anything.
  1. Apply requested mutation.
  • For create/edit/merge/delete actions, restate the operation and require explicit confirmation unless the user already asked clearly.
  1. Report stable identifiers.
  • Return URLs and IDs for created or changed objects (PR number, issue number, run URL, release tag).

Common Commands

  • Repository:
    • gh repo view
    • gh repo clone owner/repo
    • gh repo create
    • gh repo set-default owner/repo
  • Pull requests:
    • gh pr list
    • gh pr view <number>
    • gh pr checkout <number>
    • gh pr create
    • gh pr review <number> --approve|--request-changes|--comment
    • gh pr merge <number>
  • Issues:
    • gh issue list
    • gh issue view <number>
    • gh issue create
    • gh issue comment <number> --body "..."
    • gh issue close <number>
  • Actions:
    • gh workflow list
    • gh workflow run <workflow>
    • gh run list
    • gh run watch <run-id>
    • gh run view <run-id> --log
  • Releases:
    • gh release list
    • gh release view <tag>
    • gh release create <tag> [assets...]
    • gh release upload <tag> <file>
  • API:
    • gh api repos/{owner}/{repo}/pulls --paginate

For broader command coverage, read references/command-map.md.

Safety Defaults

  • Confirm before commands that change remote state:
    • gh pr create|merge|close|reopen|ready
    • gh issue create|edit|close|reopen|delete
    • gh repo create|edit|archive|delete
    • gh release create|edit|delete
    • gh secret set|delete
    • gh variable set|delete
    • gh workflow run
  • Avoid destructive flags (--delete-branch, force flags) unless explicitly requested.
  • Show exact command before bulk updates and prefer smallest safe scope.

Read the full file on GitHub · 102 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 · 102 lines · 71 tokens per session scan A d342bab1d15d

Subscribe to this mod's changes

github is a skill published in the GitHub repository IvanCampos/agents (5 stars, last pushed 6mo ago), licensed MIT. It adds 71 tokens to every session and 938 once invoked, about $0.0004 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-31.