code-search-selector

code-search-selector is a skill for Claude Code from MadAppGang/claude-code. It costs 62 tokens per session (2,438 once invoked), scanned A, original, MIT.

A guide for choosing between semantic code search and ordinary text or file search. Semantic search looks for related code by meaning, while ordinary search finds exact text or file patterns.

In plain words
What is it for?
Use it when investigating how code works, finding implementations, mapping architecture, tracing data flow, auditing integrations, or locating exact symbols and files.
Why use it?
It helps select an appropriate search method, reducing unnecessary file reading for broad codebase questions and avoiding semantic tools for simple exact matches.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the code-analysis plugin — 12 skills, 2 commands, 1 agent shipped together

Good fit Use it when investigating how code works, finding implementations, mapping architecture, tracing data flow, auditing integrations, or locating exact symbols and files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/madappgang/claude-code/code-search-selector
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.

Any agent
npx skills add MadAppGang/claude-code --skill code-search-selector
Clone the repo
git clone --depth 1 https://github.com/MadAppGang/claude-code

Made for: Claude Code.

Or install code-analysis, the plugin that ships this one along with the rest of its 12 skills, 2 commands, 1 agent.

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-selector

README.md
[![agentmods](https://agentmods.dev/badge/skills/madappgang/claude-code/code-search-selector/github.svg)](https://agentmods.dev/skills/madappgang/claude-code/code-search-selector)
Your own site
<a href="https://agentmods.dev/skills/madappgang/claude-code/code-search-selector"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/code-search-selector/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 code-search-selector

Your own site · 80×15
<a href="https://agentmods.dev/skills/madappgang/claude-code/code-search-selector"><img src="https://agentmods.dev/badge/skills/madappgang/claude-code/code-search-selector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,438 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.
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.00062 $0.02438
Opus 5.5 $0.00025 $0.00975
Sonnet 5.5 $0.00012 $0.00488
Haiku 4.5 $0.00006 $0.00244

Measured 3mo ago against content hash dfc851eae1ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-search-selector 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 3mo 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.

plugins/code-analysis/skills/code-search-selector/SKILL.md · 303 lines

How it starts

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

Code Search Tool Selector

This skill helps choose the most effective search tool for your task.

When Semantic Search Works Better

Claudemem provides better results for conceptual queries:

Query Type Example Recommended Tool
"How does X work?" "How does authentication work?" claudemem search
Find implementations "Find all API endpoints" claudemem search
Architecture questions "Map the service layer" claudemem --agent map
Trace data flow "How does user data flow?" claudemem search
Audit integrations "Audit Prime API usage" claudemem search

When Native Tools Work Better

Query Type Example Recommended Tool
Exact string match "Find 'DEPRECATED_FLAG'" Grep
Count occurrences "How many TODO comments?" Grep -c
Specific symbol "Find class UserService" Grep
File patterns "Find all *.config.ts" Glob

Why Semantic Search is Often More Efficient

Token Efficiency: Reading 5 files costs ~5000 tokens; claudemem search costs ~500 tokens with ranked results.

Context Discovery: Claudemem finds related code you didn't know to ask for.

Ranking: Results sorted by relevance and PageRank, so important code comes first.

Example: Semantic Query

User asks: "How does authentication work?"

Less effective approach:

grep -r "auth" src/
# Result: 500 lines of noise, hard to understand

More effective approach:

claudemem status  # Check if indexed
claudemem search "authentication login flow JWT"
# Result: Top 10 semantically relevant code chunks, ranked

Quick Decision Guide

Classify the Task

User Request Category Recommended Tool
"Find all X", "How does X work" Semantic claudemem search
"Audit X integration", "Map data flow" Semantic claudemem search
"Understand architecture", "Trace X" Semantic claudemem map
"Find exact string 'foo'" Exact Match Grep
"Count occurrences of X" Exact Match Grep
"Find symbol UserService" Exact Match Grep

Read the full file on GitHub · 303 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. 3mo ago First seen · 303 lines · 62 tokens per session scan A dfc851eae1ed

Subscribe to this mod's changes

code-search-selector is a skill published in the GitHub repository MadAppGang/claude-code (291 stars, last pushed 8mo ago), licensed MIT. It adds 62 tokens to every session and 2,438 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

code-search-selector compared with skills from other repositories

code-search-selector next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-search-selectorMadAppGang/claude-codeSkill2918mo agoMITA62Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill82kyesterdayMITA200Claude Code, Codex
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill102ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill396ktodayMITA36Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill15kyesterdayCC0-1.0A113Claude Code, Codex
systematic-debuggingobra/superpowersSkill332k6d agoMITA21Claude Code