symdex-code-search
Original:🇺🇸 English
Translated
This skill should be used when finding, tracing, or understanding code in a repository with SymDex available. Trigger it for requests like "where is this defined?", "who calls this?", "what route handles this path?", "show me the file outline", "search this codebase by intent", or any task that would otherwise rely on broad Read/Grep/Glob exploration.
8installs
Sourcehusnainpk/symdex
Added on
NPX Install
npx skill4agent add husnainpk/symdex symdex-code-searchTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →SymDex Code Search
Use SymDex before broad file browsing.
Use it to save tokens by retrieving the exact code the agent needs instead of scanning whole files.
SymDex currently covers 16 language surfaces, including Python, Go, Kotlin, Dart, Swift, and Vue script blocks.
Start Here
- If the SymDex CLI reports a newer release, prefer upgrading before long sessions.
- Confirm the repo id.
- If the repo id is already known, pass on every scoped tool call.
repo - If the repo id is unknown, call and match the current worktree.
list_repos - Check freshness with .
get_index_status(repo) - If the current worktree is not indexed, call .
index_folder(path=".") - If the workspace already has , treat it as the intended local SymDex state and reuse it.
.symdex - Reuse the returned id for the rest of the task.
repo
If SymDex is unavailable or indexing fails, say so clearly and fall back to normal file reads only as needed.
Core Rules
- Search first.
- Pass whenever you know it.
repo - Prefer or
get_symbolover full-file reads.get_file_outline - Use call graph and route tools before manual tracing.
- Re-check after major edits or worktree switches.
get_index_status - Read full files only when editing, reviewing unsupported or generated content, or when SymDex cannot answer.
- Optimize for lower-token retrieval, not broad context loading.
- If a search tool returns or
roi, mention the approximate token savings briefly in your response.roi_summary - If the repo uses workspace-local SymDex state (), stay inside that workspace so the same index is auto-discovered.
./.symdex
Tool Selection
| Need | Tool |
|---|---|
| Index the current worktree | |
| Register and index a repo explicitly | |
| Find a function, class, or method by name | |
| Find code by intent or behavior | |
| Find literal text or regex matches | |
| Read exact source for one symbol | |
| Get a file outline before reading | |
| Get a repo map or summary | |
| Trace who calls a symbol | |
| Trace what a symbol calls | |
| Find HTTP routes | |
| Check repo freshness | |
| Get code metrics and language mix | |
| List indexes | |
| Clean deleted-worktree indexes | |
Typical Flow
- Confirm the repo id and freshness.
- Index with if needed.
index_folder - Start with ,
search_symbols, orsemantic_search.search_text - Narrow to or
get_symbol.get_file_outline - Use ,
get_callers,get_callees, orsearch_routesfor deeper analysis.get_repo_stats - Fall back to direct file reads only when SymDex cannot answer precisely enough.
Decision Guide
- "Where is X defined?" ->
search_symbols - "What does this do?" -> , then
semantic_searchget_symbol - "Who uses this?" ->
get_callers - "What does this call?" ->
get_callees - "Where is the endpoint?" ->
search_routes - "Show me the file structure first" ->
get_file_outline - "Give me a repo-level picture" -> or
get_repo_outlineget_repo_stats - "Is the index current?" ->
get_index_status
Good Trigger Phrases
- "Find the function that validates JWTs"
- "Who calls this route handler?"
- "Show me the outline of this file"
- "Search for the code that parses webhook payloads"
- "Find the HTTP route for "
/api/checkout - "Give me the repo summary before I edit anything"
Editing
When you need to edit code:
- Use SymDex to find the exact symbol or file location.
- Read only that file or symbol slice.
- Make the smallest change needed.
Use Normal Browsing Only When Needed
- SymDex is unavailable.
- The repo is not indexed and cannot be indexed in the current environment.
- The target file type is unsupported or generated.
- You need surrounding context that the symbol-level response does not provide.
Output Checklist
- Repo id confirmed or derived
- Index freshness checked
- SymDex tool chosen before broad file reads
- Exact symbol or file outline used before whole-file reads when possible
- Direct file reads used only when SymDex could not answer cleanly