ripgrep

ripgrep is a skill for Claude Code, Codex from bahayonghang/my-ai-cli-toolkit. It costs 81 tokens per session (2,326 once invoked), scanned A, original, MIT.

A command-line search tool for finding exact text or regular-expression patterns in files and folders.

In plain words
What is it for?
Use it to find names, strings, and patterns, list matching files, count matches, filter by file type, or replace older grep commands.
Why use it?
It helps you search code and other files without missing results because of hidden files, ignore rules, binary files, or search options.

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/bahayonghang/my-ai-cli-toolkit/ripgrep
Any agent
npx skills add bahayonghang/my-ai-cli-toolkit --skill ripgrep
Clone the repo
git clone --depth 1 https://github.com/bahayonghang/my-ai-cli-toolkit

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 ripgrep

README.md
[![agentmods](https://agentmods.dev/badge/skills/bahayonghang/my-ai-cli-toolkit/ripgrep.svg)](https://agentmods.dev/skills/bahayonghang/my-ai-cli-toolkit/ripgrep)
Your own site
<a href="https://agentmods.dev/skills/bahayonghang/my-ai-cli-toolkit/ripgrep"><img src="https://agentmods.dev/badge/skills/bahayonghang/my-ai-cli-toolkit/ripgrep.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,326 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00081 $0.02326
Opus 5 $0.00041 $0.01163
Sonnet 5 $0.00016 $0.00465
Haiku 4.5 $0.00008 $0.00233

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

Security

Grade A, and why

ripgrep 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 5d 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/developer-tools-integrations/ripgrep/SKILL.md · 193 lines

How it starts

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

Use ripgrep (rg) when the user needs fast text or regex content search from the command line. The useful outcome is a copy-pasteable command plus a clear statement of what it matches, what it skips, and why.

Triage

Start with the smallest tool that can answer the question.

  • For trivial in-conversation lookups, use the harness's built-in ripgrep-backed search tool instead of shelling out to rg.
  • Use rg for exact names, strings, regex content searches, file lists, counts, and pipeline-friendly output.
  • Use ast-grep for syntax shape: descendants, ancestors, call forms, decorators, missing constructs, or nested contexts.
  • Use language tooling for semantic facts such as type resolution, references, imports, or rename safety.

Before trusting local behavior, verify the binary: rg --version should print a ripgrep version plus enabled features such as +PCRE2. If it does not, run which rg — an alias or another tool named rg may shadow it.

Defaults Model

rg is a filter wrapped around a search. By default it:

  • searches the current directory recursively (rg foo equals rg foo ./),
  • respects .gitignore, .ignore, and .rgignore rules (precedence: .rgignore over .ignore over .gitignore),
  • skips hidden files and directories,
  • skips binary files (any file containing a NUL byte),
  • does not follow symlinks (opt in with -L/--follow).

Escalation ladder: -u disables ignore-file handling, -uu also searches hidden files, -uuu also searches binary files — roughly grep -r with no smart filtering. Individual toggles: --no-ignore, --hidden, -a/--text.

When rg "can't find" a file, diagnose before changing the pattern:

  1. rg --files | rg name — is the file in the searched set at all?
  2. rg pattern --debug — which ignore rule or config excluded it? A * rule in the global gitignore is the most common cause.
  3. rg pattern -uuu — does the match appear with all filtering off?

Workflow

  1. Compose the simplest command that could work; prefer -F for literals.
  2. Dry-run the file set with --files plus your -g/-t filters when the search scope matters.
  3. Run on a narrow path first (rg pattern src/module), then widen.
  4. For complex or shell-hostile patterns, write one pattern per line to a file and use -f patterns.txt (patterns are ORed). On Windows this is the preferred escape hatch from quoting problems; save the file as UTF-8 without BOM.
  5. Report the command, what it matches, and what it may miss.

Read the full file on GitHub · 193 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. 5d ago First seen · 193 lines · 81 tokens per session scan A c905f2d708ac

Subscribe to this mod's changes

ripgrep is a skill published in the GitHub repository bahayonghang/my-ai-cli-toolkit (16 stars, last pushed 2d ago), licensed MIT. It adds 81 tokens to every session and 2,326 once invoked, about $0.0004 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.