agentsclimarketplace

Ripgrep search

Skill MauricioPerera/agent-skills-pack/skills/ripgrep-search

A curated pack of 7 practical agent-skills demonstrating real-world patterns: HTTP, GitHub CLI, ripgrep, file ops, JSON processing, encoding. Each SKILL.md validated against the v0.1 spec.

Install
npx -y skills add MauricioPerera/agent-skills-pack --skill ripgrep-search

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Recursively searches files in a directory for a regex pattern using ripgrep. Returns matching lines with file:line:column prefixes. Respects .gitignore by default. Sandboxed banks (SPEC §2.11) restrict the search root to the declared `filesystem` allowlist plus `$AGENT_SCRATCH`.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

4.6 KB, as published. Nobody here has run it

Search code with ripgrep

Wraps ripgrep (rg) as a deterministic, agent-friendly search tool.

Why ripgrep over grep

  • Faster on large codebases (parallelism + SIMD).
  • Respects .gitignore automatically (use -uuu to disable; intentionally not exposed here to keep the skill focused).
  • Default UTF-8 handling.
  • Cleaner output format (file:line:col:match).

Output format

src/handler.ts:42:3:    handleRequest(req);
src/router.ts:18:5:    routeHandler.dispatch(...)

Each line is <file>:<line>:<column>:<matching content>. The agent can parse this with awk -F: or pipe through jq after rg --json.

Safety: pattern position vs path position

  • The pattern arg is single-quoted by the bank — regex special characters survive intact.
  • The path arg's regex strictly forbids ;, |, &, $, backticks, newlines — defense in depth even though single-quoting would already neutralize most injection attempts.
  • The --max-count flag prevents unbounded output from pathological matches.

Caveats

  • --hidden is enabled by default — searches dotfiles (.gitignore, .env, etc.). Be careful in directories that may contain secrets.
  • .gitignore is respected; files in node_modules / dist / .git are skipped automatically. Use -uuu if you genuinely need to search them.
  • Very long lines (>10MB) are skipped by ripgrep's defaults.
  • The pattern uses ripgrep's default regex flavor (Rust regex crate). For PCRE2 features (lookarounds, backreferences), the skill could be extended with a --pcre2 flag.
  • If the pattern is potentially shell-metacharacter-heavy (e.g., contains *, [, (, )), the bank's single-quoting protects it; no manual escaping needed by the agent.

Pairing with read-file

A common agent flow:

  1. ripgrep-search to find candidate files.
  2. Parse the output to extract file paths.
  3. read-file to load full content of each match for context.

This avoids loading every file in the repo into context — only the relevant ones, after the regex narrows them down.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.