gh-cli-search

gh-cli-search is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 25 tokens per session (542 once invoked), scanned A, original, MIT.

A guide to using the GitHub CLI, a command-line tool for working with GitHub, to find issues and pull requests. It covers date ranges, labels, repository selection, and structured output.

In plain words
What is it for?
Use it to list issues or pull requests by date, state, or label and select fields for further processing.
Why use it?
It removes the need to search and filter GitHub work manually in the website.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to list issues or pull requests by date, state, or…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/gh-cli-search
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.

Any agent
npx skills add cxcscmu/SkillLearnBench --skill gh-cli-search
Clone the repo
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench

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-cli-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/gh-cli-search.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/gh-cli-search)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/gh-cli-search"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/gh-cli-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 542 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00025 $0.00542
Opus 5 $0.00013 $0.00271
Sonnet 5 $0.00005 $0.00108
Haiku 4.5 $0.00003 $0.00054

Measured 3d ago against content hash 27f4e691e194, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

gh-cli-search 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 3d ago.

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/b1-one-shot-claude-opus-4-6/github-repo-analytics/gh-cli-search/SKILL.md · 55 lines

What it actually says

GitHub CLI: Searching Issues and Pull Requests

Overview

The gh CLI provides powerful commands for listing and searching issues and PRs in any public repository. Key subcommands: gh pr list, gh issue list, and gh search variants.

Listing PRs by Date Range

# List PRs created in a date range (returns up to --limit items)
gh pr list --repo owner/repo --state all --search "created:2024-12-01..2024-12-31" --limit 500 --json number,state,author,createdAt,mergedAt,closedAt

Key flags:

  • --state all includes open, closed, and merged PRs
  • --search accepts GitHub search qualifiers like created:YYYY-MM-DD..YYYY-MM-DD
  • --json selects fields; available fields include: number, state, author, createdAt, mergedAt, closedAt, title, labels
  • --limit N controls max results (default 30)

Listing Issues by Date Range

# List issues created in a date range
gh issue list --repo owner/repo --state all --search "created:2024-12-01..2024-12-31" --limit 500 --json number,state,labels,createdAt,closedAt

Note: gh issue list excludes pull requests by default.

Searching with Labels

# Search for issues with a label containing "bug"
gh issue list --repo owner/repo --state all --search "created:2024-12-01..2024-12-31 label:bug" --limit 500 --json number,state,labels,closedAt

For labels with spaces or special characters, quote them: label:"type: bug".

Pagination / Limits

  • The --limit flag can go up to 1000 per call.
  • For very large result sets, paginate using gh api with --paginate.

Using gh api for More Control

# Direct API call with search endpoint
gh api search/issues --method GET \
  -f q='repo:owner/repo is:pr created:2024-12-01..2024-12-31' \
  -f per_page=100 \
  --paginate
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. 3d ago First seen · 55 lines · 25 tokens per session scan A 27f4e691e194

Subscribe to this mod's changes

gh-cli-search is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 542 once invoked, about $0.0001 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-09-03.

Related

Other skills, from other repositories