github-cli

A command-line tool for working with GitHub, the website and service where developers host code and collaborate. It covers pull requests, issues, releases, automated checks, and repository settings.

In plain words
What is it for?
Creating and reviewing pull requests, managing issues, checking automated build results, creating releases and tags, changing repository settings, and querying GitHub's API.
Why use it?
It lets developers manage common GitHub tasks from a terminal or automation script instead of switching between separate web pages.

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

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 715 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.00037 $0.00715
Opus 5 $0.00018 $0.00358
Sonnet 5 $0.00007 $0.00143
Haiku 4.5 $0.00004 $0.00072

Measured yesterday against content hash 6e11cbc7fb17, 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 · 120 lines

How it starts

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

GitHub CLI (gh)

When to use this skill

  • Creating, reviewing, or merging pull requests
  • Managing issues (create, close, label, assign)
  • Checking CI/CD status and workflow runs
  • Creating releases and managing tags
  • Repository settings and management
  • Querying GitHub API for custom automation

Pull Requests

# Create PR
gh pr create --title "feat: add auth" --body "Description here"

# Create PR with template
gh pr create --fill  # Uses commit messages

# List open PRs
gh pr list

# View PR details
gh pr view <number>

# Review PR
gh pr diff <number>
gh pr review <number> --approve
gh pr review <number> --request-changes --body "Please fix X"

# Merge PR
gh pr merge <number> --squash --delete-branch

# Check PR CI status
gh pr checks <number>

Issues

# Create issue
gh issue create --title "Bug: login fails" --body "Steps to reproduce..."

# Create with labels and assignee
gh issue create --title "Bug" --label bug,urgent --assignee @me

# List issues
gh issue list --label bug --state open

# Close issue
gh issue close <number> --reason completed

# Transfer issue
gh issue transfer <number> <target-repo>

Actions & CI/CD

# List workflow runs
gh run list --workflow=ci.yml

# View run details
gh run view <run-id>

# Watch a running workflow
gh run watch <run-id>

# Re-run failed jobs
gh run rerun <run-id> --failed

# Trigger workflow manually
gh workflow run <workflow-name> --ref main

Releases

# Create release
gh release create v1.0.0 --title "v1.0.0" --generate-notes

# Create draft release
gh release create v1.0.0 --draft --notes "Release notes here"

# Upload assets
gh release upload v1.0.0 ./dist/app.tar.gz

# List releases
gh release list

API Queries

# Custom API calls
gh api repos/{owner}/{repo}/pulls --jq '.[].title'

# GraphQL
gh api graphql -f query='{ viewer { login } }'

# Paginated results
gh api repos/{owner}/{repo}/issues --paginate --jq '.[].title'

Best Practices

Read the full file on GitHub · 120 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 · 120 lines · 37 tokens per session scan A 6e11cbc7fb17

Subscribe to this mod's changes

github-cli is a skill published in the GitHub repository asgarovf/locusai (23 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 715 once invoked, about $0.0002 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.