gh-search-commits

gh-search-commits is a skill for Claude Code from aaddrick/gh-cli-search. It costs 37 tokens per session (2,434 once invoked), scanned A, original, MIT.

A guide to searching commit history across GitHub repositories with the GitHub CLI, a command-line tool for GitHub.

In plain words
What is it for?
Use it to find commits across GitHub and construct searches with filters such as author, date, repository, keyword, or merge-commit exclusions.
Why use it?
It explains how to narrow results by author, committer, dates, hashes, messages, repositories, organizations, and merge status.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the gh-cli-search plugin — 9 skills, 1 command, 3 agents, 1 hook shipped together

Good fit Use it to find commits across GitHub and construct searches with filters such as author, date, repository, keyword, or merge-commit exclusions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aaddrick/gh-cli-search/gh-search-commits
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 aaddrick/gh-cli-search --skill gh-search-commits
Clone the repo
git clone --depth 1 https://github.com/aaddrick/gh-cli-search

Made for: Claude Code.

Or install gh-cli-search, the plugin that ships this one along with the rest of its 9 skills, 1 command, 3 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/aaddrick/gh-cli-search/gh-search-commits/github.svg)](https://agentmods.dev/skills/aaddrick/gh-cli-search/gh-search-commits)
Your own site
<a href="https://agentmods.dev/skills/aaddrick/gh-cli-search/gh-search-commits"><img src="https://agentmods.dev/badge/skills/aaddrick/gh-cli-search/gh-search-commits/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-search-commits

Your own site · 80×15
<a href="https://agentmods.dev/skills/aaddrick/gh-cli-search/gh-search-commits"><img src="https://agentmods.dev/badge/skills/aaddrick/gh-cli-search/gh-search-commits.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,434 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.00037 $0.02434
Opus 5 $0.00018 $0.01217
Sonnet 5 $0.00007 $0.00487
Haiku 4.5 $0.00004 $0.00243

Measured 9d ago against content hash b34589217edb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

gh-search-commits 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 9d 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/gh-search-commits/SKILL.md · 278 lines

How it starts

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

GitHub CLI: Search Commits

Overview

Search for commits across GitHub repositories using gh search commits. Filter by author, committer, dates, commit hashes, and more.

When to Use This Skill

Use this skill when searching commits across GitHub:

  • Finding commits by author or committer across repos/orgs
  • Searching commit messages for keywords across repositories
  • Filtering by commit dates or hashes in specific repos
  • Looking for merge commits across an organization
  • Searching in specific repositories or organizations
  • Need to exclude certain results (requires -- flag)

Syntax

gh search commits [<query>] [flags]

Key Flags Reference

Author & Committer Filters

Flag Purpose Example
--author <string> Filter by author username --author octocat
--author-name <string> Filter by author name --author-name "John Doe"
--author-email <string> Filter by author email --author-email [email protected]
--author-date <date> Filter by authored date --author-date ">2024-01-01"
--committer <string> Filter by committer username --committer octocat
--committer-name <string> Filter by committer name --committer-name "Jane Doe"
--committer-email <string> Filter by committer email --committer-email [email protected]
--committer-date <date> Filter by committed date --committer-date "<2024-06-01"

Commit Attributes

Flag Purpose Example
--hash <string> Filter by commit hash --hash 8dd03144
--parent <string> Filter by parent hash --parent abc123
--tree <string> Filter by tree hash --tree def456
--merge Filter merge commits only --merge

Repository Filters

Flag Purpose Example
--owner <strings> Filter by repo owner --owner github
-R, --repo <strings> Search in specific repo --repo cli/cli
--visibility <strings> Filter by visibility --visibility public

Read the full file on GitHub · 278 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. 9d ago First seen · 278 lines · 37 tokens per session scan A b34589217edb

Subscribe to this mod's changes

gh-search-commits is a skill published in the GitHub repository aaddrick/gh-cli-search (8 stars, last pushed 9mo ago), licensed MIT. It adds 37 tokens to every session and 2,434 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-31.