github-cli

A GitHub command-line workflow for working with repositories, issues, pull requests, pipelines, and project management. GitHub is a platform for hosting and collaborating on software projects.

In plain words
What is it for?
Use it to review pull requests, inspect changed files and context, and perform supported GitHub operations through the gh command-line tool.
Why use it?
It provides a consistent way to inspect GitHub work, including complete pull-request metadata, diffs, and surrounding source code, while applying the required review rules.

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

Made for: Claude Code, Codex.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 657 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.00070 $0.00657
Opus 5 $0.00035 $0.00329
Sonnet 5 $0.00014 $0.00131
Haiku 4.5 $0.00007 $0.00066

Measured yesterday against content hash e87b1853ac81, 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 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.

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-cli/SKILL.md · 41 lines

How it starts

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

GitHub CLI Skill

Use the instance and rules below when constructing all gh commands.

Instance

All gh CLI and git operations use host: github.com

Prerequisites (one-time setup by user)

If not already authenticated, inform the user that authentication is required and ask them to complete the following steps manually. Do not perform these steps yourself.

  1. Install the gh CLI if not already installed:
brew install gh
  1. Run the following command to authenticate with GitHub:
gh auth login

PR Code Review

When asked to review a GitHub PR (URL or PR ID provided), extract the <owner/repo> and <PR_ID> from the URL (ask the user if the repo is missing), then use gh api to fetch the PR metadata (repos/<owner>/<repo>/pulls/<PR_ID>) and its diff (repos/<owner>/<repo>/pulls/<PR_ID>/files --paginate). To fully understand the context and impact of all code changes, read the complete source branch codebase — the diff alone does not capture the surrounding logic, dependencies, or broader design that the changes interact with. Report the PR title, author, and branches, then review all changed files for: secrets/injection/XSS (security), inefficient algorithms/memory leaks (performance), code smells/dead code (quality), missing error handling, excessive or sensitive logging, and missing/outdated documentation. For each finding, include the file path, line number(s), the problematic snippet, and a suggested fix. If nothing is wrong, summarize what was reviewed and state it looks good.

Rules

  • Always pass --repo <owner>/<repo> explicitly for any gh subcommand that accepts it (e.g., pr list, issue list, run list) — without it, the command infers the repo from the current git directory, which may silently return wrong results.
  • When using gh api, use the path relative to https://api.github.com — e.g., gh api repos/<owner>/<repo>/pulls.
  • All gh api calls that return lists are paginated (default 30/page). Always pass --paginate to fetch all pages: gh api --paginate "repos/<owner>/<repo>/pulls".
  • For gh pr list, prefer explicit state flags: use --state closed for closed, --state merged for merged, or --state all for all states. Omitting --state returns open PRs by default.
  • NEVER target any GitHub Enterprise instance unless the user explicitly provides the hostname and confirms it is correct. If a URL references an unfamiliar hostname, stop and ask the user to confirm.

Read the full file on GitHub · 41 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. yesterday First seen · 41 lines · 70 tokens per session scan A e87b1853ac81

Subscribe to this mod's changes

github-cli is a skill published in the GitHub repository abdullahkhawer/devops-skills (7 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 70 tokens to every session and 657 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

a11y-remediate

Use to produce a leader-facing remediation proposal from one or more /a11y-audit outputs plus team and product context. Translates audit findings into sprint plans, staffing asks, customer-facing language, compliance rollups, and critical-path analysis. Refuses to fabricate numbers, owners, or commitments beyond the…

gitkraken/vscode-gitlens · 72 tokens

prioritize

Prioritize triaged/investigated issues — recommends shortlist, backlog, won't fix, or community contribution with priority signals and draft communications.

gitkraken/vscode-gitlens · 30 tokens

docs-manage

Manage the Grounded Docs MCP Server documentation index. Covers scraping and indexing documentation from URLs or local files, refreshing existing indexes with changed content, and removing libraries from the index. Use when you need to add, update, or delete indexed documentation.

arabold/docs-mcp-server · 53 tokens

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens

lore

SpecStory Lore - mine your SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more) into a persistent corpus, surface your reproducible workflows with corroborated evidence, and interactively forge the chosen ones into skills installed across all your agent harnesses. Use when the user…

specstoryai/getspecstory · 109 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens