agentleFS
EasyJoy-TechnologiesEasyJoy-Technologies/openclaw-skills/skills/code-navigate/SKILL.md

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".

The file

Files
SKILL.md

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 ts

Find 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 ts

Symbol 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 -50

Type 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 ts

Workflow: "Understand This Code"

  1. Entry: rg -n "export.*SYMBOL" <dir> --type ts
  2. Read the file, note imports
  3. Callers: rg -l "\bSYMBOL\b" <dir> --type ts -g "!*.test.*" | head -10
  4. Types: rg -n "(?:type|interface)\s+\w+" <dir>/types --type ts
  5. Tests: find <dir> -name "*.test.ts" -o -name "*.spec.ts" | xargs rg -l "SYMBOL" 2>/dev/null

Language Variants

LanguageDefinition patternImport pattern
TypeScript(?:export\s+)?(?:function|class|const)import.*from
Python(?:def|class)\s+NAME(?:from|import).*NAME
Gofunc\s+(?:\(.*\)\s+)?NAMEimport.*NAME
Rust(?:pub\s+)?(?:fn|struct|enum|trait)\s+NAMEuse.*NAME

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.