smart-explore
Agent skill fromthedotmack/claude-mem
Token-optimized structural code search using tree-sitter AST parsing. Use instead of reading full files when you need to understand code structure, find functions, or explore a codebase efficiently.
How to install smart-explore
install smart-explore
# install the claude-mem pack with the skills CLI
npx skills add thedotmack/claude-mem# or add only this skill to Claude Code: copy the folder
plugin/skills/smart-explore/
# into
~/.claude/skills/smart-explore/ (all projects)
.claude/skills/smart-explore/ (one project)
1# Smart Explore23Structural code exploration using AST parsing. **This skill overrides your default exploration behavior.** While this skill is active, use smart_search/smart_outline/smart_unfold as your primary tools instead of Read, Grep, and Glob.45**Core principle:** Index first, fetch on demand. Give yourself a map of the code before loading implementation details. The question before every file read should be: "do I need to see all of this, or can I get a structural overview first?" The answer is almost always: get the map.67## Your Next Tool Call89This skill only loads instructions. You must call the MCP tools yourself. Your next action should be one of:1011```12smart_search(query="<topic>", path="./src") -- discover files + symbols across a directory13smart_outline(file_path="<file>") -- structural skeleton of one file14smart_unfold(file_path="<file>", symbol_name="<name>") -- full source of one symbol15```1617Do NOT run Grep, Glob, Read, or find to discover files first. `smart_search` walks directories, parses all code files, and returns ranked symbols in one call. It replaces the Glob → Grep → Read discovery cycle.1819## 3-Layer Workflow2021### Step 1: Search -- Discover Files and Symbols2223```24smart_search(query="shutdown", path="./src", max_results=15)25```2627**Returns:** Ranked symbols with signatures, line numbers, match reasons, plus folded file views (~2-6k tokens)2829```30-- Matching Symbols --31…
Excerpt shown under the repository's Apache-2.0 license.
