ygrep

A skill that tells the agent to try ygrep first when searching code or files. ygrep is a search tool that uses an index of the workspace to return text matches quickly.

In plain words
What is it for?
Use it when locating files, functions, classes, variables, or other text in an unfamiliar project.
Why use it?
It can make repeated codebase searches faster and gives the agent a defined fallback when files are not indexed.

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/yetidevworks/ygrep/claude-code
Any agent
npx skills add yetidevworks/ygrep --skill claude-code
Clone the repo
git clone --depth 1 https://github.com/yetidevworks/ygrep

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 947 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 89% copy Near-identical to another mod 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.00055 $0.00947
Opus 5 $0.00028 $0.00474
Sonnet 5 $0.00011 $0.00189
Haiku 4.5 $0.00006 $0.00095

Measured 3d ago against content hash 1ce72f7dadb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ygrep 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.

Origin

This is a copy

89% identical to ygrep — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

crates/ygrep-cli/claude-code/SKILL.md · 72 lines

How it starts

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

IMPORTANT: Try ygrep First

Always try ygrep "query" via Bash before using built-in Grep, Glob, or Task explore agents for code searches. ygrep uses a pre-built full-text index and returns results in milliseconds vs seconds/minutes for built-in tools.

Searching an unindexed workspace builds a text index automatically on the first search, so there is nothing to set up. That first call takes a few seconds; every later one is instant.

If ygrep returns no results, fall back to built-in Grep or Glob — not every file may be indexed.

When to Invoke This Skill

Invoke this skill immediately when:

  • You need to find files, code, functions, classes, or variables
  • User asks to search or find something in the codebase
  • You need to understand where something is defined or used
  • You need to explore an unfamiliar codebase

Usage

All flags are global — they work in any position with or without the search subcommand:

ygrep "search query"                  # Search (AI-optimized output)
ygrep "query" -n 10                   # Limit results
ygrep "query" -e rs -e ts             # Filter by extension
ygrep "query" -p 'src/api/'           # Filter by path prefix
ygrep "query" -p 'src/*/tests/'       # Glob pattern in path filter (quote it!)
ygrep search "query" -p 'lib/' -n 5   # Explicit search subcommand
ygrep "fn\\s+main" -r                 # Regex search
ygrep "Config" -s                     # Case-sensitive search
ygrep "error" -A 3                    # 3 lines of context after match
ygrep "error" -B 2                    # 2 lines of context before match
ygrep "error" -K 3                    # 3 lines of context before and after
ygrep "query" --json                  # JSON output with full metadata
ygrep "query" --text-only             # Force text-only search

IMPORTANT: Quote glob patterns in -p to prevent shell expansion:

  • Right: -p 'user/plugins/*/tests/' — ygrep receives the glob and matches internally
  • Wrong: -p user/plugins/*/tests/ — shell expands into multiple args, causes errors

Read the full file on GitHub · 72 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 72 lines · 55 tokens per session scan A 1ce72f7dadb8

Subscribe to this mod's changes

ygrep is a skill published in the GitHub repository yetidevworks/ygrep (58 stars, last pushed 6d ago), licensed MIT. It adds 55 tokens to every session and 947 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 89% identical to ygrep, differing in 7 lines, and is treated as a copy.

Related

Other skills, from other repositories

weekly-summary

Generate a comprehensive summary of AI coding sessions from the past week. Use when the user says "weekly summary", "what did I do this week", "summarize my week", "weekly recap", "week in review", or asks for a summary of recent work across projects.

nicknisi/sessions · 60 tokens

ripgrep

Use when the user needs text or regex content search with ripgrep: composing rg commands, choosing flags, glob/type filtering, multiline or PCRE2 searches, pipeline output, grep-to-rg migration, or diagnosing why rg missed a file (gitignore, hidden, binary defaults). Not for syntax-aware structural queries (ast-grep)…

bahayonghang/my-ai-cli-toolkit · 81 tokens

handoff

Wrap up a work session so the next session (or another agent) can pick up cleanly — what was done, what's in flight, what to watch out for. Use when ending a session, switching tasks, or asked to hand off, wrap up, or save state for later.

TheWinci/mimirs · 61 tokens

memtrace-daily

Orient at the start of a coding session, review what recently changed in a repository, and self-audit after completing work. Use when the user wants the daily briefing (what changed in the last 24h with complexity deltas), hotspots (complexity × churn refactor priorities), or a session review (clean/review/risky…

syncable-dev/memtrace-public · 134 tokens

siyuan-cli

操作思源笔记的 CLI 工具。当用户要求管理笔记本、文档、块、标签、搜索笔记、导入导出、管理资源、同步数据时使用此 skill。可执行路径下的 siyuan-cli.exe(或 go run .)。不包含 auth/chat/mcp 命令。.

cicbyte/siyuan-cli · 73 tokens

frg-search

Fast indexed code search using frg (5x faster than ripgrep).

qhkm/fastripgrep · 15 tokens