code-navigate
Skill1 starsChanged 8 months agoMITView on GitHub
Navigate code structure using grep-based heuristics — find definitions, references, call hierarchy, and symbol overviews. Use when tracing function calls, finding all usages of a symbol, understanding type hierarchies, or navigating unfamiliar codebases. Triggers on "go to definition", "find references", "where is this used", "what calls this", "trace this function", "understand this code".
In this repository6 other files it gives its agents.
- code-searchSkill
- code-simplifySkill
- magic-docsSkill
- memory-extractSkill
- memory-organizerSkill
- session-summarySkill
The file
Files
Code Navigate — Grep-Based Code Intelligence
Navigate code structure using ripgrep patterns. No LSP server required.
Find Definition
# Function/class/type definition
rg -n "(?:export\s+)?(?:function|class|const|let|var|type|interface|enum)\s+SYMBOL" <dir> --type ts
# Trace an import to its source
rg -n "import.*SYMBOL.*from\s+['\"](.+)['\"]" <dir> --type tsFind References
# All usages (exclude type definitions)
rg -n "\bSYMBOL\b" <dir> --type ts -g "!*.d.ts" -g "!node_modules"
# Function call sites only
rg -n "\bSYMBOL\s*\(" <dir> --type ts -g "!*.test.*"Call Hierarchy
# Incoming: who calls this function
rg -n "\bFUNC_NAME\s*\(" <dir> --type ts -g "!*.test.*" -g "!*.spec.*"
# Outgoing: find the function body, then read it to see what it calls
rg -n "function\s+FUNC_NAME" <dir> --type tsSymbol Overview
# All exports in a file
rg -n "export\s+(function|class|const|type|interface|enum|default)" <file>
# All functions in a directory
rg -n "(?:export\s+)?(?:async\s+)?function\s+\w+" <dir> --type ts | head -50Type Information
# Find type/interface definition
rg -n "(?:type|interface)\s+TYPE_NAME" <dir> --type ts
# Where a type is used
rg -n ":\s*TYPE_NAME\b" <dir> --type tsWorkflow: "Understand This Code"
- Entry:
rg -n "export.*SYMBOL" <dir> --type ts - Read the file, note imports
- Callers:
rg -l "\bSYMBOL\b" <dir> --type ts -g "!*.test.*" | head -10 - Types:
rg -n "(?:type|interface)\s+\w+" <dir>/types --type ts - Tests:
find <dir> -name "*.test.ts" -o -name "*.spec.ts" | xargs rg -l "SYMBOL" 2>/dev/null
Language Variants
| Language | Definition pattern | Import pattern |
| TypeScript | (?:export\s+)?(?:function|class|const) | import.*from |
| Python | (?:def|class)\s+NAME | (?:from|import).*NAME |
| Go | func\s+(?:\(.*\)\s+)?NAME | import.*NAME |
| Rust | (?:pub\s+)?(?:fn|struct|enum|trait)\s+NAME | use.*NAME |
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
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.

