file-search

file-search is a skill for Claude Code from 0xDarkMatter/claude-mods. It costs 47 tokens per session (683 once invoked), scanned A, original, MIT.

A file and text search skill built around fd, ripgrep, and fzf. These tools find files, search their contents, and let you choose results interactively.

In plain words
What is it for?
Finding files by name or type, searching code for patterns, filtering results, viewing nearby lines, and opening selected files.
Why use it?
It helps you locate code and files quickly without manually browsing a large project.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the claude-mods plugin — 103 skills, 3 commands, 3 agents, 4 hooks shipped together

Good fit Finding files by name or type, searching code for patterns, filtering results, viewing nearby lines, and opening selected files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/0xdarkmatter/claude-mods/file-search
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 0xDarkMatter/claude-mods --skill file-search
Clone the repo
git clone --depth 1 https://github.com/0xDarkMatter/claude-mods

Made for: Claude Code.

Or install claude-mods, the plugin that ships this one along with the rest of its 103 skills, 3 commands, 3 agents, 4 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 file-search

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/0xdarkmatter/claude-mods/file-search"><img src="https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/file-search.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 683 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00047 $0.00683
Opus 5 $0.00023 $0.00342
Sonnet 5 $0.00009 $0.00137
Haiku 4.5 $0.00005 $0.00068

Measured 10d ago against content hash 43cddbf3b4a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

file-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 10d 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/file-search/SKILL.md · 102 lines

How it starts

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

Modern file and content search.

fd - Find Files

# Find by name
fd config                    # Files containing "config"
fd -e py                     # Python files

# By type
fd -t f config               # Files only
fd -t d src                  # Directories only

# Exclude
fd -E node_modules           # Exclude directory
fd -E "*.min.js"             # Exclude pattern

# Execute command
fd -e py -x wc -l            # Line count per file

rg - Search Content

# Simple search
rg "TODO"                    # Find TODO
rg -i "error"                # Case-insensitive

# By file type
rg -t py "import"            # Python files only
rg -t js -t ts "async"       # JS and TS

# Context
rg -C 3 "function"           # 3 lines before/after

# Output modes
rg -l "TODO"                 # File names only
rg -c "TODO"                 # Count per file

fzf - Interactive Selection

# Find and select
fd | fzf

# With preview
fd | fzf --preview 'bat --color=always {}'

# Multi-select
fd -e ts | fzf -m | xargs code

Combined Patterns

# Find files, search content
fd -e py -x rg "async def" {}

# Search, select, open
rg -l "pattern" | fzf --preview 'rg -C 3 "pattern" {}' | xargs vim

Quick Reference

Task Command
Find TS files fd -e ts
Find in src fd -e ts src/
Search pattern rg "pattern"
Search in type rg -t py "import"
Files with match rg -l "pattern"
Count matches rg -c "pattern"
Interactive fd | fzf
With preview fd | fzf --preview 'bat {}'

Performance Tips

Tip Why
Both respect .gitignore Auto-skip node_modules, dist
Use -t over -g Type flags are faster
Narrow the path rg pattern src/ faster
Use -F for literals Avoids regex overhead

Additional Resources

For detailed patterns, load:

  • ./references/advanced-workflows.md - Git integration, shell functions, power workflows

Read the full file on GitHub · 102 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. 10d ago First seen · 102 lines · 47 tokens per session scan A 43cddbf3b4a5

Subscribe to this mod's changes

file-search is a skill published in the GitHub repository 0xDarkMatter/claude-mods (34 stars, last pushed 17d ago), licensed MIT. It adds 47 tokens to every session and 683 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

thinking-theory-of-constraints

When throughput or latency is pipeline-limited, identify the single binding constraint and exploit, subordinate, elevate, then recheck—ignore non-constraints.

tjboudreaux/cc-thinking-skills · 37 tokens

Vizra ADK Memory System

Implement persistent memory, session context, and vector memory (RAG) for AI agents.

vizra-ai/vizra-adk · 24 tokens

foundation-models

On-device LLM integration using Apple's Foundation Models framework. Use when implementing AI text generation, structured output, or tool calling.

rshankras/claude-code-apple-skills · 29 tokens

analytics-interpretation

Interpret app metrics and make data-driven decisions. Covers DAU/MAU, retention, LTV, ARPU, App Store Connect analytics, AARRR funnel analysis, cohort analysis, and diagnostic decision trees. Use when user wants to understand their metrics, diagnose problems, or build a data-driven growth plan.

rshankras/claude-code-apple-skills · 68 tokens

app-namer

Turn an app idea into validated, App-Store-ready name candidates. Use when the user says "name my app", "what should I call it", "app name ideas", "help me name this app", "is this name available", or needs to pick a brandable, ownable name before reserving it in App Store Connect.

rshankras/claude-code-apple-skills · 73 tokens

in-app-events

Generates In-App Event metadata templates for App Store Connect — event names, descriptions, badge types, image specs, and deep link configuration. Use when creating events for App Store visibility, engagement campaigns, or seasonal promotions.

rshankras/claude-code-apple-skills · 48 tokens