Codebase search

From akillness/jeo-skills · View interactive version

Codebase search is an AI agent skill from the GitHub repository akillness/jeo-skills. Route repo-navigation requests to one search packet before editing: exact-text, symbol/indexed, structural, config/content, hosted search, or graph/path trace. Use when the user asks where something is defined or referenced, which files own config/content surfaces, or what must be inspected before a

How to use this skill

Skill file

Codebase Search

When to use this skill

Do not use this skill as the main workflow when:

Core idea

codebase-search should act like a packet router, not a giant search tutorial.

  1. Normalize the request into one primary packet.
  2. Narrow scope before dumping matches.
  3. Read only the winning files.
  4. Return a compact evidence map.
  5. Route out as soon as search is no longer the bottleneck.

Read these support docs before choosing the packet:

Instructions

Step 1: Normalize the request

Convert the prompt into this intake shape first:

codebase_search_packet:
  primary_packet: exact-text | symbol-indexed | structural | config-content | hosted-search | graph-path
  repo_shape: app | infra | content | game | mixed | unknown
  search_goal: locate | references | ownership | impact | archaeology | unknown
  scope_hint: path | package | file-type | subsystem | repo-wide | unknown
  route_after: stay-here | debugging | log-analysis | code-refactoring | code-review | graphify

Choose one primary packet for the run. If two seem plausible, pick the cheaper one that reduces uncertainty fastest.

Step 2: Choose the packet

| Packet | Use when | Best fits | Common tools / shapes |

|---|---|---|---|

| exact-text | The user knows a string, env var, route, flag, class name spelling, error text, or file fragment | literal lookups, config keys, route paths, import names | rg, git grep, editor search |

| symbol-indexed | The user needs definitions, references, or call sites | function/class/interface ownership, API tracing, monorepo navigation | LSP/workspace symbol, ctags, indexed repo search |

| structural | Syntax shape matters more than literal text | missing cleanup, unsafe pattern inventories, migration prep | ast-grep, Semgrep, Comby, tree-sitter-style search |

| config-content | The repo surface is config, content, templates, front matter, shortcodes, scenes, assets, or build scripts | Terraform/Kubernetes, Markdown/MDX sites, Hugo/Next content, game packaging/config | file discovery + exact-text + targeted scripts |

| hosted-search | The repo is remote/browser-first or cross-repo lookup matters | PR archaeology, repo you do not have locally, shareable links | GitHub/GitLab hosted search |

| graph-path | The request is really about dependency tracing or persistent structure | call graph, path tracing, architecture map, graph report | graphify, code graph/code map tools |

Packet rules:

For an explicit Jevgrep request over scoped source documents, follow

jevgrep for its separate remote-content/cost gate and bounded

discovery. Exact-text, LSP/indexed, structural, and existing zvec routes remain

default and authoritative; this optional route does not replace graph queries.

Step 3: Narrow scope before reading everything

Apply at least one narrowing move before reading files:

Useful heuristics by repo shape:

Step 4: Read winners, not the whole match list

After the search packet returns matches:

  1. pick the most likely definition / ownership file
  2. pick 1–3 important consumers or references
  3. pick 1 config/test/example/build file when setup matters
  4. summarize the flow instead of pasting raw terminal output

Step 5: Return an evidence map

Default response shape:

## Search brief
- Goal: [what I was locating]
- Packet: exact-text | symbol-indexed | structural | config-content | hosted-search | graph-path
- Scope: [paths/file types/packages]

## Best entry points
- `path/to/file`: why it matters
- `path/to/other-file`: why it matters

## Key evidence
- `path:line` — what it shows
- `path:line` — how it connects

## Likely flow / ownership
- entry → consumer → config/test/content surface

## Next route-out
- stay in `codebase-search` or route to the next skill

Step 6: Use packet-specific heuristics

For bug-location requests
For impact analysis
For config/content ownership
For structural search
For archaeology requests

Step 7: Route out aggressively

Switch when the next job is no longer search:

Examples

Example 1: Pre-change discovery

Prompt:

Find where auth is implemented and what files I should inspect before changing it.

Good response shape:

Example 2: Config/content ownership

Prompt:

Which MDX pages still use the old pricing CTA shortcode, and where is the shared partial defined?

Good response shape:

Example 3: Structural query

Prompt:

Find all React effects missing cleanup. I do not want plain grep.

Good response shape:

Example 4: Game/infrastructure archaeology

Prompt:

Search this repo for where matchmaking region config is defined and what scenes or services consume it.

Good response shape:

Best practices

  1. Choose the smallest packet that can answer the question.
  2. Narrow scope before reading large match sets.
  3. Return an evidence map, not a terminal transcript.
  4. Cover config/content/game surfaces honestly; repo navigation is not only source-code lookup.
  5. Separate search from diagnosis, refactoring, review, and persistent graphing.
  6. Label confidence when structural intent is approximated with plain text search.
  7. For monorepos, group findings by package or subsystem.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.