grepai: Skill for Claude Code

.claude/skills/grepai/SKILL.md

grepai is a skill for Claude Code from yoanbernabeu/grepai. It costs 52 tokens per session (1,020 once invoked), scanned A, original, MIT.

A semantic code-search skill that finds code by meaning, such as authentication or error handling, and can trace which functions call another function. It replaces built-in search for these intent-based tasks.

In plain words
What is it for?
Use it to explore unfamiliar code, find implementations by purpose, trace callers, and understand how parts of a codebase connect.
Why use it?
It helps locate related code when you do not know the exact file names, function names, or wording used in the source.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is yoanbernabeu/grepai's own configuration. It tells Claude Code how to work on grepai itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything grepai configures →

About the project

grepai is a local command-line tool that searches source code by meaning and traces function call graphs, rather than matching only exact words. Developers and coding agents use it to find relevant code, understand relationships between functions, and provide focused context for changes while keeping the code on the local machine. The catalogue entries expose its commands, skills, agent, and instruction for coding-agent workflows.

yoanbernabeu/grepai · 1,838 stars · on GitHub · yoanbernabeu.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to yoanbernabeu/grepai. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yoanbernabeu/grepai/main/.claude/skills/grepai/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/yoanbernabeu/grepai

Made for: Claude Code.

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 grepai

README.md
[![agentmods](https://agentmods.dev/badge/skills/yoanbernabeu/grepai/grepai.svg)](https://agentmods.dev/skills/yoanbernabeu/grepai/grepai)
Your own site
<a href="https://agentmods.dev/skills/yoanbernabeu/grepai/grepai"><img src="https://agentmods.dev/badge/skills/yoanbernabeu/grepai/grepai.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,020 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.00052 $0.01020
Opus 5 $0.00026 $0.00510
Sonnet 5 $0.00010 $0.00204
Haiku 4.5 $0.00005 $0.00102

Measured 4d ago against content hash 63a1fc417ba4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

grepai 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 4d 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.

.claude/skills/grepai/SKILL.md · 117 lines

How it starts

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

grepai: ranked semantic search (not a Grep replacement)

grepai search answers a natural-language query with ~10 scored chunks in one call — a ranked starting point at a fraction of the tokens of dumping raw grep output (--json --compact alone saves ~80%). It is a ranking layer, not an exhaustive one: a vector top-10 can miss a relevant file that keyword grep finds trivially. The rules below save tokens without losing recall.

Tool Choice

Query Tool
Exact identifiers, imports, string literals built-in Grep / git grep — fastest, exhaustive
Intent with a canonical syntax anchor (@main, func main(, class AppDelegate) Grep the anchor — many "intent" questions are exact-match queries in disguise
Intent with no obvious anchor ("where are errors handled?") recall-safe combo below
Function relationships (callers/callees) grepai trace — grep has no equivalent
File patterns (**/*.go) Glob

Recall-Safe Combo (cheap AND exhaustive)

grep's token cost is in dumping content lines; its recall is nearly free when you ask for file names only. For an intent query, run both cheap layers:

# 1. Ranking: ~10 scored chunks, one call
grepai search "where errors are handled and logged" --json --compact

# 2. Recall: exhaustive candidate checklist — file NAMES only, ~zero tokens
git grep -ilE 'error|handl|logg' | head -50

Read grepai's top hits first, then scan the checklist for relevant-looking files grepai did not rank — read those too. Never dump full grep content output for an intent query; the file list gives you grep's recall at ~1% of the tokens.

If grepai's top hits are docs/reports instead of code: scope with grepai search "<query>" --path <srcdir>, or add generated content to a .grepaiignore.

How to Use This Skill

Semantic Search

Use grepai search to find code by describing what it does:

# Search with natural language (ALWAYS use English for best results)
grepai search "user authentication flow"
grepai search "error handling middleware"
grepai search "database connection pooling"
grepai search "API request validation"

# JSON output for AI agents (--compact saves ~80% tokens)
grepai search "authentication flow" --json --compact

# Limit results
grepai search "error handling" -n 5

Read the full file on GitHub · 117 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. 4d ago Changed · +5 lines · +9 tokens per session 63a1fc417ba4
  2. 7d ago First seen · 112 lines · 43 tokens per session scan A d82a72e3f324

Subscribe to this mod's changes

grepai is a skill published in the GitHub repository yoanbernabeu/grepai (1,838 stars, last pushed 5d ago), licensed MIT. It adds 52 tokens to every session and 1,020 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-30.

Related

Other skills, from other repositories

Sverklo Code Intelligence

Gives you deep codebase understanding — semantic search, blast-radius analysis, PR review, and health audits.

sverklo/sverklo · 27 tokens

use-ivygrep

Gather focused local repository context with ivygrep before implementing, debugging, reviewing, or explaining code. Use for coding tasks involving unfamiliar paths, branch changes, stack traces, architectural relationships, callers, dependents, tests, configuration, or documentation. Prefer one bounded context pack…

bvolpato/ivygrep · 65 tokens

systematic-debugging

4-phase debugging protocol for diagnosing and fixing failing tests.

PedroMosquera/squadai · 15 tokens

printing-press-amend

Amend a published CLI from one of two input sources: (1) dogfood mode mines the active Claude Code session transcript for friction (missing flags, hand- rolled API payloads, silent-null returns); (2) direct-input mode accepts user-supplied asks (rename a command, add commands or feeds, fix a named bug, optionally…

mvanhorn/cli-printing-press · 222 tokens

systemic-issue-triage

Trigger: new issue, bug report, triage, backlog, issue flood, community report, root cause, dead-end, blocked user. Attack issues by root class, never one-by-one; fixes must shrink the system, not grow it.

Gentleman-Programming/gentle-ai · 57 tokens

report

Investigate bugs comprehensively — cascade through trace, capture browser evidence, extract observability data, and prepare or explicitly create a GitHub issue with grounded findings.

automagik-dev/genie · 34 tokens