code-search

code-search is a skill for Claude Code, Codex from sumisingh10/qgrep-mcp. It costs 85 tokens per session (810 once invoked), scanned A, original, MIT.

A codebase search guide that finds text and patterns across project files, using an indexed search when that is useful.

In plain words
What is it for?
Use it to search with regular expressions, restrict searches by file pattern, ignore letter case, show context, or list matching files.
Why use it?
It helps locate definitions, references, usages, and unfinished work without manually checking files one by one.

Skill for Claude CodeCodex

Part of the qgrep-mcp plugin — 1 skill, 1 agent, 2 hooks shipped together

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

Made for: Claude Code, Codex.

Or install qgrep-mcp, the plugin that ships this one along with the rest of its 1 skill, 1 agent, 2 hooks.

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 code-search

README.md
[![agentmods](https://agentmods.dev/badge/skills/sumisingh10/qgrep-mcp/code-search.svg)](https://agentmods.dev/skills/sumisingh10/qgrep-mcp/code-search)
Your own site
<a href="https://agentmods.dev/skills/sumisingh10/qgrep-mcp/code-search"><img src="https://agentmods.dev/badge/skills/sumisingh10/qgrep-mcp/code-search.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 810 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.00085 $0.00810
Opus 5 $0.00043 $0.00405
Sonnet 5 $0.00017 $0.00162
Haiku 4.5 $0.00009 $0.00081

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

Security

Grade A, and why

code-search 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.

skills/code-search/SKILL.md · 83 lines

How it starts

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

This skill provides fast indexed code search via the search_code MCP tool, which is up to 300x faster than standard grep on large codebases.

When to Use search_code

Prefer the search_code MCP tool over the built-in Grep tool when searching file contents across a directory tree. The search_code tool automatically selects the fastest backend:

  • On large repos (15k+ files), it builds and uses a qgrep index. Searches complete in ~10ms instead of ~3-25s
  • On small repos (< 5k files), it transparently falls back to ripgrep
  • In the gray zone (5k-15k files), it measures ripgrep latency and indexes if beneficial

Available MCP Tools

search_code

Primary search tool. Supports regex patterns, glob filters, case-insensitive search, and context lines.

search_code(pattern="impl Iterator for", path="/path/to/repo")
search_code(pattern="TODO|FIXME", path="/path/to/repo", case_insensitive=True)
search_code(pattern="class.*Handler", path="/path/to/repo", glob="*.py")
search_code(pattern="fn main", path="/path/to/repo", output_mode="files_with_matches")

Parameters:

  • pattern (required): Regex pattern to search for
  • path (required): Absolute directory path to search in
  • glob: Filter files (e.g. "*.py", "*.{ts,tsx}")
  • case_insensitive: Case-insensitive search (default: false)
  • output_mode: "content" (default), "files_with_matches", or "count"
  • context_lines: Lines of context around matches
  • max_results: Maximum result lines (default: 200)

build_search_index

Manage the search index lifecycle. Build an index before searching to get maximum speed.

build_search_index(action="build", path="/path/to/repo")
build_search_index(action="status", path="/path/to/repo")
build_search_index(action="rebuild", path="/path/to/repo")
build_search_index(action="delete", path="/path/to/repo")

search_estimate

Analyze a directory and get an indexing recommendation with stats.

search_estimate(path="/path/to/repo")

Read the full file on GitHub · 83 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 First seen · 83 lines · 85 tokens per session scan A 22d772d03b82

Subscribe to this mod's changes

code-search is a skill published in the GitHub repository sumisingh10/qgrep-mcp (8 stars, last pushed 5mo ago), licensed MIT. It adds 85 tokens to every session and 810 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-31.

Related

Other skills, from other repositories

grepai

Semantic code search and call-graph tracing. Use for intent questions ('where is authentication handled?'), exploring unfamiliar code, or tracing callers/callees — as a ranking layer on top of exact-match Grep, not a replacement for it.

yoanbernabeu/grepai · 52 tokens

release

Create a new release for grepai. Checks CI, determines version type, updates CHANGELOG and documentation, credits contributors, and creates GitHub release.

yoanbernabeu/grepai · 32 tokens

Sverklo Code Intelligence

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

sverklo/sverklo · 27 tokens

code-context

How to answer codebase questions with the code-context MCP tools (search, sql, reindex): ranked hybrid keyword+semantic search, relevance-ranked SQL aggregation over the index, and index lifecycle. Use when a question spans many files ("how does X work", "where is Y handled"), when ranking or counting code by topic…

infino-ai/code-context · 103 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

review-pr-comments

Fetch PR review comments via gh CLI, classify them (valid & fix / valid & skip / invalid), fix the valid ones, reply and resolve the threads, and fix any CI failures. Invoke only when the user types /review-pr-comments — never auto-trigger.

IBazylchuk/paparats-mcp · 57 tokens