SE

search-codebase

Maps codebase structure and traces concepts to ensure sweeping changes across all occurrences.

Install

mkdir -p .claude/skills/search-codebase && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18224" && unzip -o skill.zip -d .claude/skills/search-codebase && rm skill.zip

Installs to .claude/skills/search-codebase

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Use this skill whenever you need to know where something lives in a codebase or what else a change touches — before any code change, when you're new to a repo, when a request names one screen and parallel ones may exist, or when a visible label or error must be traced to code. It owns three jobs: ORIENT (build the mental map from the repo layout and its enforced tooling — the configs are the conventions), FIND (trace a concept from user-visible vocabulary to i18n keys to symbol names to usages — what a thing is called and what it calls), and SWEEP (after changing one site, enumerate every other occurrence of the concept and change or rule out each — the request names one site; the task is the concept). Load it at Gate A of implement-feature, make-improvement, fix-bug, or implement-ui. Never change one copy of a duplicated concept without sweeping the rest. For facts outside the repo use deep-research.
914 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Orient to a new codebase by reading layout and manifests
  • Trace concepts from user-visible vocabulary to code symbols
  • Search for localized UI elements using i18n keys
  • Sweep for all occurrences of a concept after a change
  • Identify blast radius of a change including importers, copies, and cross-cutting artifacts

How it works

The skill builds a mental map of the codebase, traces concepts from user-facing terms to code, and then enumerates all occurrences of a concept to ensure complete changes.

Inputs & outputs

You give it
A concept, visible label, or error to trace in the codebase
You get back
Concept's name and home, and a sweep list of all occurrences

When to use search-codebase

  • Find code location for a feature
  • Map codebase structure
  • Trace labels to source code

About this skill

search-codebase

The request names one site; the task is the concept. This skill is how you stop being a visitor in a codebase: orient once, find by concept, and sweep every occurrence — so a change lands everywhere it belongs, not just where it was reported. For facts outside the repo (docs, dependencies, the web) use deep-research.

When this applies

At Gate A of any work skill (implement-feature, make-improvement, fix-bug, implement-ui); in a repo you don't know yet; whenever a request is shaped like "change X on this page" and parallel pages may exist; whenever a visible label, error, or feature name must be traced to the code that owns it. No separate note: your outputs — the concept's name and home, the sweep list — are the Reuse and Blast radius answers in the active skill's note.

Orient — build the mental map

Do this once per repo, fast, before trusting any instinct about "where things go":

  • Read the root layout and the workspace manifest — the parts of the system and their kinds (apps, services, packages, tools).
  • Read the contributor and agent docs as pointers, not gospel — they tell you where to look; the code tells you what's true.
  • Read the enforced tooling — the configs are the conventions. The linter, formatter, and type configs, the commit rules, the CI pipeline, and the test setup are the house style that cannot drift. Discover conventions there and in neighbouring code, never from memory: the guards are the spec.
  • Sample two or three files of the kind you're about to write and mirror their structure, naming, and error handling.
  • Locate one known example of each kind you'll touch — a route, a schema, a shared component, a test. Its home is where yours belongs.

Find — trace the concept, both directions

Work the ladder in order; each rung narrows the next:

  1. Search the request's own vocabulary — the words on the screen or in the report: the button label, the heading, the error text.
  2. Localized UI? Find the i18n key. The visible string lives in a message catalog; grep the string to get its key, then grep the key — the key's call sites are the real code.
  3. Search symbol space — the component, function, route, and file names the vocabulary suggests.
  4. From a hit, walk both directions. What it imports tells you whether the behaviour lives upstream in something shared; who imports it tells you every usage.
  5. Search structural siblings — the same directory pattern, parallel routes, parallel schemas, parallel exports. Duplicated concepts hide as similarly shaped files, not shared symbols.
  6. Search what a thing is called and what it calls. Definition-side names and behaviour-side calls — one of the two survives any rename.

Use every tool you have: grep/ripgrep, the harness's search tools, "find references" where a language server exists, and git log -S when history explains a survivor.

Sweep — apply the change everywhere the concept occurs

The blast radius of a change is every other place the same concept occurs:

  • importers and callers of what you changed,
  • duplicated copies of the concept on parallel surfaces,
  • cross-cutting artifacts a change of this shape drags along — tests, docs, locales, fixtures, exports, migrations.

Enumerate the sweep set in the note before editing; after the change, tick each entry as changed or explicitly ruled out with a reason. A sweep ends when the enumeration is exhausted — not when you're tired. And first, decide which case you're in — that decision is the whole game:

Fix the source once (shared component). "The delete-confirmation dialog doesn't trap focus on the Invoices page." Grep the dialog's title → an i18n key → rendered by the one ConfirmDialog in the shared UI package, imported by forty screens. Fix focus in ConfirmDialog, not on Invoices; the sweep is verifying a sample of the other surfaces still behaves. Tell: the concept lives in one file everything imports.

Sweep every copy (duplicated concept). "Move the New Product button above the table." The Products page hand-rolls its own header row — and so do Customers and Orders: three copies of the same list-page shape, no shared import. The concept is "list page with a create action": enumerate every page built on the pattern (grep the table component's importers, walk the sibling route dirs) and apply the same move to each — or extract the header into one shared component (make-improvement) and fix the source once. Rule out pages where the placement is intentionally different, in the note. Tell: the same markup shape recurs across sibling files with no shared import.

A data shape ripples (parallel artifacts). "Split name into first and last name on the registration form." The changed thing is a field, not a form — sweep everywhere the shape flows: the profile form that edits the same record, the API schema and validators, the data model and its migration, seeds and fixtures, the CSV export, the email templates that render the name, and every locale's labels for the new inputs. Search the symbol and the storage key, not just the screen you were shown. Tell: you changed data, so the sweep set is every producer, consumer, and renderer of that data.

Before you call a sweep complete

  • The concept is named and its home identified — one shared source, or N copies.
  • The shared-vs-duplicated decision is stated: fix the source once, or sweep every copy.
  • The sweep set is enumerated in the note — importers, copies, cross-cutting artifacts.
  • Every entry is changed or ruled out with a reason. None is "probably fine".
  • The vocabulary you searched is recorded, so a reviewer can re-run it.

When not to use it

  • For facts outside the repository like documentation or web resources
  • When the user wants to change only one copy of a duplicated concept without sweeping the rest
  • When the user is already familiar with the codebase

Limitations

  • Does not search for facts outside the repository
  • Requires enumerating the sweep set before editing
  • A sweep ends only when the enumeration is exhausted

How it compares

This skill provides a structured methodology for understanding a codebase and ensuring changes are applied consistently across all relevant locations, unlike an unstructured search.

Compared to similar skills

search-codebase side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
search-codebase (this skill)018dNo flagsIntermediate
architect-review1093moNo flagsAdvanced
solid-principles579moNo flagsIntermediate
codex322moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

architect-review

sickn33

Master software architect specializing in modern architecture patterns, clean architecture, microservices, event-driven systems, and DDD. Reviews system designs and code changes for architectural integrity, scalability, and maintainability. Use PROACTIVELY for architectural decisions.

109320

solid-principles

SmidigStorm

Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.

57236

codex

Lucklyric

Invoke Codex CLI for complex coding tasks requiring high reasoning capabilities. This skill should be invoked when users explicitly mention "Codex", request complex implementation challenges, advanced reasoning, or need high-reasoning model assistance. Automatically triggers on codex-related requests and supports session continuation for iterative development.

32238

error-handling-patterns

wshobson

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

35170

deepwiki-rs

sopaco

AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.

25170

senior-fullstack

davila7

Comprehensive fullstack development skill for building complete web applications with React, Next.js, Node.js, GraphQL, and PostgreSQL. Includes project scaffolding, code quality analysis, architecture patterns, and complete tech stack guidance. Use when building new projects, analyzing code quality, implementing design patterns, or setting up development workflows.

35110

Search skills

Search the agent skills registry