agentleFS
jmylchreestjmylchreest/aide/skills/code-search/SKILL.md

code-search

Skill19 starsChanged 3 months agoMITView on GitHub

Locate definitions, investigate callers and change impact, explore file structure, and read selected source

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 6 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these to investigate callers and change impact, then verify current source.

    line 48
  2. Distinctive:

    Use this for the file's API surface.

    line 61
  3. Distinctive:

    Use an outline to navigate an unfamiliar large file when its structure will help select what to read.

    line 74
  4. Very specific:

    Read known line ranges directly.

    line 75
  5. Very specific:

    When several symbol names are known, code_read_symbol supports a symbols batch (up to 10).

    line 76
  6. Very specific:

    Read current bodies for known function, method, class, or type names.

    line 89
  7. Distinctive:

    Use a bounded Read for imports or surrounding context outside the selected symbols.

    line 99
  8. Distinctive:

    Read directly when the file is small or most of its contents are needed.

    line 100
  9. Distinctive:

    Search static analysis findings (complexity hotspots, secrets, code clones, coupling issues).

    line 118
  10. Very specific:

    Inspect current source: follow returned code_read_symbol selectors for missing source, retaining their checkout selector.

    line 135
  11. Very specific:

    Investigate indexing only when needed: if results suggest indexing is missing or stale, inspect code_stats or run ./.aide/bin/aide code …

    line 146
  12. Very specific:

    Use code_search with query "auth" or "authenticate"

    line 158
  13. Very specific:

    Use code_references with symbol "authenticateUser"

    line 165
  14. Very specific:

    Call sites for a specific symbol name (via code_references)

    line 176

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Search

Recommended model tier: balanced (sonnet) - this skill performs straightforward operations

Locate definitions and caller candidates during debugging, review, and refactoring, then inspect the current source needed for the task. Choose tools by the evidence needed; there is no mandatory navigation step before reading a small file or a known relevant range.

Available Tools

1. Search Symbols (mcp__plugin_aide_aide__code_search)

Find functions, classes, methods, interfaces, and types by name or signature.

Example usage:

Search for: "getUserById"
→ Uses code_search tool
→ Returns: function signatures, file locations, line numbers

2. Find References (mcp__plugin_aide_aide__code_references)

Find indexed candidates where a symbol is called or used, including type references. Use these to investigate callers and change impact, then verify current source.

Example usage:

Who calls "getUserById"?
→ Uses code_references tool
→ Returns: indexed candidate call sites with file:line and context

3. List File Symbols (mcp__plugin_aide_aide__code_symbols)

List parsed definitions in a specific file, with signatures and locations. Use this for the file's API surface; coverage depends on grammar support.

Example usage:

What functions are in src/auth.ts?
→ Uses code_symbols tool
→ Returns: supported function, class, and type definitions in that file

4. File Outline (mcp__plugin_aide_aide__code_outline)

Get a collapsed structural outline of a file — signatures preserved, bodies replaced with { ... }. Use an outline to navigate an unfamiliar large file when its structure will help select what to read. Read known line ranges directly; read the full file when it is small or most of its contents are needed. When several symbol names are known, code_read_symbol supports a symbols batch (up to 10). Smaller returned text does not guarantee fewer whole-task tokens: an extra navigation round has overhead.

Example usage:

Outline src/auth.ts
→ Uses code_outline tool
→ Returns: collapsed view with signatures, line ranges, bodies collapsed

5. Read Symbol Source (mcp__plugin_aide_aide__code_read_symbol)

Read current bodies for known function, method, class, or type names. Batch up to 10 names in symbols when several bodies are needed, rather than issuing a call per name. Set file to choose an exact file, including one not yet indexed. If a name occurs multiple times in that file, also set start_line to the current definition line. Ambiguous names return candidates instead of choosing one.

{ "symbols": ["authenticateUser", "validateToken"], "file": "src/auth.ts" }

Use a bounded Read for imports or surrounding context outside the selected symbols. Read directly when the file is small or most of its contents are needed.

6. Check Index Status (mcp__plugin_aide_aide__code_stats)

Inspect index counts when diagnosing missing results or unavailable indexing. This is not a required preflight before each query or source read, and counts do not establish freshness or complete coverage.

Example usage:

Is the code indexed?
→ Uses code_stats tool
→ Returns: file count, symbol count, reference count

7. Search Findings (mcp__plugin_aide_aide__findings_search)

Search static analysis findings (complexity hotspots, secrets, code clones, coupling issues).

Example usage:

Any complexity issues in src/auth?
→ Uses findings_search tool with query "auth" or file filter
→ Returns: findings with file, line, severity, description

Workflow

  1. Choose the needed evidence: code_search for definition candidates; code_references for caller/type-use candidates; code_symbols or code_outline for structure in a known file. Filter by kind, language, or file when that narrows the question. Keep Grep for literals, imports, and patterns inside function bodies.
  2. Inspect current source: follow returned code_read_symbol selectors for missing source, retaining their checkout selector. Do not repeat search or outline discovery for a location already identified. Selectors are indexed candidates; if a definition moved, retry its file/name without start_line. Reuse bodies already available in the current context; reread for changes or missing context. Batch known names with code_read_symbol, using file to disambiguate. Read known ranges or small/full-relevant files directly.
  3. Verify conclusions: indexed search/reference results are best-effort candidates, not a complete semantic graph. Same-name symbols, dynamic calls, unsupported syntax, stale files, and limits can affect results. Verify relevant definitions and callers in current source; empty results do not prove absence.
  4. Investigate indexing only when needed: if results suggest indexing is missing or stale, inspect code_stats or run ./.aide/bin/aide code index. Continue with current-source reads or Grep when the index cannot answer.

Binary location: The aide binary is at .aide/bin/aide. If it's on your $PATH, you can use aide directly.

Example Session

User: "Where is the authentication function?"

Assistant action:

  1. Use code_search with query "auth" or "authenticate"
  2. Show matching functions with file locations

User: "Who calls authenticateUser?"

Assistant action:

  1. Use code_references with symbol "authenticateUser"
  2. Inspect relevant candidate callers in current source and group the findings by file

What These Tools Cover

code_search and code_references work from the tree-sitter symbol index. Depending on grammar support and index state, their results include:

  • Function, method, class, interface, type definitions by name
  • Symbol signatures (parameter types, return types)
  • Doc comments attached to definitions
  • Call sites for a specific symbol name (via code_references)

For anything else — patterns inside function bodies, method call chains, string literals, SQL queries, imports, variable declarations — use Grep, which searches code content directly.

Notes

  • Indexed searches need an index; exact-file code_read_symbol and on-demand file structure tools can inspect source without one
  • Indexing is incremental - only changed files are re-parsed
  • Supports: TypeScript, JavaScript, Go, Python, Rust, and more
  • File watching is on by default; disable with AIDE_CODE_WATCH=0 or code.watch: false in .aide/config/aide.json

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.