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,925 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/github.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/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 grepai

Your own site · 80×15
<a href="https://agentmods.dev/skills/yoanbernabeu/grepai/grepai"><img src="https://agentmods.dev/badge/skills/yoanbernabeu/grepai/grepai.svg" alt="Reviewed on agentmods" width="80" 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.5 $0.00021 $0.00408
Sonnet 5.5 $0.00010 $0.00204
Haiku 4.5 $0.00005 $0.00102

Measured 1mo ago against content hash 63a1fc417ba4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo ago Changed · +5 lines · +9 tokens per session 63a1fc417ba4
  2. 1mo 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,925 stars, last pushed yesterday), licensed MIT. It adds 52 tokens to every session and 1,020 once invoked, about $0.0002 per session on Opus 5.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

tilth

Use the tilth CLI for code reading, outlining, search, callers, blast-radius deps, and structural diffs. Activate when the user asks to explore a repo, find a symbol, trace callers, read a file, view a diff, or analyze impact. Prefer tilth over grep/cat/find/ls — one invocation returns AST-aware outlines, definitions…

jahala/tilth · 95 tokens

cocosearch-debugging

Use when debugging an error, unexpected behavior, or tracing how code flows through a system. Guides root cause analysis using CocoSearch semantic and symbol search.

VioletCranberry/coco-search · 37 tokens

cocosearch-deps

Use when exploring dependency relationships, tracing file connections, analyzing change impact, or identifying hub files. Guides dependency graph exploration using CocoSearch.

VioletCranberry/coco-search · 34 tokens

cocosearch-refactoring

Use when planning a refactoring, extracting code into a new module, renaming across the codebase, or splitting a large file. Guides impact analysis and safe step-by-step execution using CocoSearch.

VioletCranberry/coco-search · 47 tokens

parallel-investigation

Coordinates parallel investigation threads to simultaneously explore multiple hypotheses or root causes across different system areas. Use when debugging production incidents, slow API performance, multi-system integration failures, or complex bugs where the root cause is unclear and multiple plausible theories exist…

rohitg00/skillkit · 97 tokens

hypothesis-testing

Applies the scientific method to debugging by helping users form specific, testable hypotheses, design targeted experiments, and systematically confirm or reject theories to find root causes. Use when a user says their code isn't working, they're getting an error, something broke, they want to troubleshoot a bug, or…

rohitg00/skillkit · 103 tokens