searching-codebases

searching-codebases is a skill for Claude Code from oaustegard/claude-skills. It costs 133 tokens per session (2,077 once invoked), scanned A, original, MIT.

A Python code search tool that understands which names refer to which definitions. It can find real callers, definitions, inferred types, and diagnostics across a project.

In plain words
What is it for?
Use it to trace Python symbols, inspect their types, find references, and locate definitions or type problems.
Why use it?
It avoids false matches that simple text search can produce when different parts of a program use the same name.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the code-intelligence plugin — 5 skills shipped together

Good fit Use it to trace Python symbols, inspect their types, find references, and locate definitions or type problems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/oaustegard/claude-skills/searching-codebases
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 oaustegard/claude-skills --skill searching-codebases
Clone the repo
git clone --depth 1 https://github.com/oaustegard/claude-skills

Made for: Claude Code.

Or install code-intelligence, the plugin that ships this one along with the rest of its 5 skills.

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 searching-codebases

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/oaustegard/claude-skills/searching-codebases"><img src="https://agentmods.dev/badge/skills/oaustegard/claude-skills/searching-codebases.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 133 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,077 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.00133 $0.02077
Opus 5 $0.00067 $0.01038
Sonnet 5 $0.00027 $0.00415
Haiku 4.5 $0.00013 $0.00208

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

Security

Grade A, and why

searching-codebases 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 6d ago.

The scan reads SKILL.md. This mod also ships 12 executable files (scripts/code_rag.py, scripts/context.py, scripts/lsp_refs.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-intelligence/skills/searching-codebases/SKILL.md · 197 lines

How it starts

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

Searching Codebases

Find code in any codebase by pattern or concept. One entry point, two search strategies, automatic routing.

When NOT to use this skill

Python callers and definitions only. Every other code question is cheaper elsewhere, and the measurement below is why this skill is edge-case-only.

Situation Use
What symbols does this file contain? tree-sitting
Where is X defined, so I can read it? tree-sitting
Any structure question, any language tree-sitting
A literal string or regex plain ripgrep
Which files are most about a concept? bm25
First look at an unfamiliar repo exploring-codebases

Non-Python code has no pyright binding resolution to offer, so there is no version of this skill that applies to it.

Prerequisites

uv tool install ripgrep

tree-sitting installs automatically when needed — for --expand context expansion and for the binding-resolved --refs/--def/--hover tier, which uses it to resolve symbol positions. Only the bare tree-sitter package is fetched; the language grammars ship bundled.

Primary Command

SKILL_DIR=/mnt/skills/user/searching-codebases

python3 $SKILL_DIR/scripts/search.py SOURCE "query1" ["query2" ...] [OPTIONS]

SOURCE is any of:

  • Local directory path
  • GitHub URL (downloads tarball automatically)
  • uploads (uses /mnt/user-data/uploads/)
  • project (uses /mnt/project/)
  • Path to a .zip or .tar.gz archive

Search Modes

Regex mode (patterns, identifiers, literal text):

python3 $SKILL_DIR/scripts/search.py ./repo "def handle_error"
python3 $SKILL_DIR/scripts/search.py ./repo "class.*Exception" --regex
python3 $SKILL_DIR/scripts/search.py ./repo "TODO|FIXME|HACK"

Semantic mode (concepts, natural language):

python3 $SKILL_DIR/scripts/search.py ./repo "retry logic with backoff" --semantic
python3 $SKILL_DIR/scripts/search.py ./repo "authentication flow"
python3 $SKILL_DIR/scripts/search.py ./repo "error handling strategy"

Read the full file on GitHub · 197 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. 6d ago First seen · 197 lines · 133 tokens per session scan A 3658c49c7833

Subscribe to this mod's changes

searching-codebases is a skill published in the GitHub repository oaustegard/claude-skills (147 stars, last pushed today), licensed MIT. It adds 133 tokens to every session and 2,077 once invoked, about $0.0007 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-09-03.

Related

Other skills, from other repositories

python-performance-optimization

Profile and optimize Python code using cProfile, memory profilers, and performance best practices.

Jartan-LLC/grimoire · 23 tokens

lintr

R lintr package for static code analysis. Use for checking R code style and finding potential issues.

LeoLin990405/r-analytics-skill · 23 tokens

python-error-handling

Python error handling patterns including input validation, exception hierarchies, and partial failure handling.

Jartan-LLC/grimoire · 23 tokens

fix-unicode-decode

Diagnose and fix UnicodeDecodeError, UnicodeEncodeError, mojibake, and corrupted Chinese text in Codex coding tasks. Use when Python or another tool cannot decode a file or subprocess stream; Chinese text displays as replacement characters or strings such as "中文" or "涓枃"; file, terminal, CSV, JSON, HTTP, Git, or…

hachiwar/codex-skills · 104 tokens

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

K-Dense-AI/scientific-agent-skills · 56 tokens

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use…

K-Dense-AI/scientific-agent-skills · 73 tokens