agentleFS
HelwegHelweg/open-codebase-index/skills/codebase-search/SKILL.md

codebase-search

Skill230 starsChanged 5 months agoMITView on GitHub

Task-specific local codebase-understanding workflow for OpenCode, MCP, Pi, omp, and Codex. Use compact context for unfamiliar repository orientation, direct definition and graph tools for known targets.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. tmcfarlane/team-avatar★ 112same name
    2. FilenCloudDienste/filen-rs★ 104same name
    3. derheissenberg/applicaiton★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when you need local repository knowledge before web lookup.

    line 8
  2. Very specific:

    Run index_status when index readiness or freshness is unknown.

    line 12
  3. Very specific:

    When repository orientation is needed (layout, relevant symbols, or cross-file intent), use one compact codebase_context(query, …

    line 13
  4. Very specific:

    Use codebase_peek(query, ...) when only semantic locations are needed, and codebase_search(query, ...) when matching source content is …

    line 16
  5. Very specific:

    Read known paths directly and use grep for exact identifiers or exhaustive literal matches.

    line 17
  6. Very specific:

    Avoid repeating broad reads or retrieval when existing evidence already answers the question.

    line 19
  7. Very specific:

    Use grep for exact identifiers and tiny, deterministic lookups.

    line 45
  8. Very specific:

    Use websearch only when local tools return no results and docs are likely missing.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 3 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

Codebase Search Skill

Use this skill when you need local repository knowledge before web lookup.

Core workflow

  1. Run index_status when index readiness or freshness is unknown.
  2. When repository orientation is needed (layout, relevant symbols, or cross-file intent), use one compact codebase_context(query, tokenBudget: 600, limit: 5) first pass and inspect returned evidence before broad reads or searches. Do not call it mechanically before every task or tool.
  3. For a known definition, use implementation_lookup(query) directly. For callers or callees, use call_graph(name, direction) directly; for relationships between identified endpoints, use call_graph_path(from, to) directly.
  4. For a change with a known or suspected target symbol, optionally use codebase_edit_context for bounded target source plus direct callers and callees.
  5. Use codebase_peek(query, ...) when only semantic locations are needed, and codebase_search(query, ...) when matching source content is needed. Neither requires another context call when the task is already scoped.
  6. Read known paths directly and use grep for exact identifiers or exhaustive literal matches. Use find_similar(code) for analogous implementations and duplicates.

Avoid repeating broad reads or retrieval when existing evidence already answers the question. If results are weak, check readiness, compatibility, and scope with index_status; run index_codebase only when the index is missing, stale, or incompatible.

Tool Priority

  • codebase_context for compact, unfamiliar-repository orientation; explicit symbol and from + to routing remains supported.
  • implementation_lookup for known definitions.
  • call_graph and call_graph_path for relationships once symbols or endpoints are identified.
  • codebase_edit_context as an optional bounded pre-edit step.
  • codebase_peek for metadata-only semantic locations.
  • codebase_search for matching implementation content.
  • find_similar for pattern matching and duplication.
  • index_codebase (force/estimate/dryRun/verbose) for first-time or stale indexes.
  • index_status, index_health_check, index_metrics, index_logs for operational checks.

Suggested Commands

  • Unfamiliar subsystem: codebase_context("payment processing flow", tokenBudget: 600, limit: 5).
  • Known definition: implementation_lookup("validate").
  • Callers or callees: call_graph("chargeCard", "callees").
  • Known endpoints: call_graph_path("submitPayment", "chargeCard").
  • Change target: codebase_edit_context(query: "reject expired tokens", symbol: "validateToken").
  • Matching source after scope is known: codebase_search("payment retry guards").
  • Analogous code: find_similar("function validate(data)").

Additional Notes

  • Use grep for exact identifiers and tiny, deterministic lookups.
  • Use websearch only when local tools return no results and docs are likely missing.
  • Choose the next tool from the evidence needed, not a mandatory context → peek → search chain.

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.