smart-explore
Searches code intelligently and efficiently. It helps understand code structure, find functions, and explore projects without reading everything.
What it does
Helps find and understand specific parts of programming code without reading the entire file. It creates a 'map' of the code for you.
When to use it
- ✓When you want to find a specific function or part in large code.
- ✓When you need to understand the structure of a code file.
- ✓To quickly explore a programming project without reading everything.
Example of what to ask your AI
“Find all functions related to 'login' in the './src' directory”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It first analyzes the code's structure to create an index. Then, you can ask it to show specific parts or the structure of files, saving time and processing power.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add thedotmack/claude-mem --skill smart-exploreOr download just the file:
curl -L https://raw.githubusercontent.com/thedotmack/claude-mem/main/plugin/skills/smart-explore/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Smart Explore
Structural 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.
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.
Your Next Tool Call
This skill only loads instructions. You must call the MCP tools yourself. Your next action should be one of:
smart_search(query="<topic>", path="./src") -- discover files + symbols across a directory
smart_outline(file_path="<file>") -- structural skeleton of one file
smart_unfold(file_path="<file>", symbol_name="<name>") -- full source of one symbol
Do 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.
3-Layer Workflow
Step 1: Search -- Discover Files and Symbols
smart_search(query="shutdown", path="./src", max_results=15)
Returns: Ranked symbols with signatures, line numbers, match reasons, plus folded file views (~2-6k tokens)
-- Matching Symbols --
function performGracefulShutdown (services/infrastructure/GracefulShutdown.ts:56)
function httpShutdown (services/infrastructure/HealthMonitor.ts:92)
method WorkerService.shutdown (services/worker-service.ts:846)
-- Folded File Views --
services/infrastructure/GracefulShutdown.ts (7 symbols)
services/worker-service.ts (12 symbols)
This is your discovery tool. It finds relevant files AND shows their structure. No Glob/find pre-scan needed.
Parameters:
query(string, required) -- What to search for (function name, concept, class name)path(string) -- Root directory to search (defaults to cwd)max_results(number) -- Max matching symbols, default 20, max 50file_pattern(string, optional) -- Filter to specific files/paths
Step 2: Outline -- Get File Structure
smart_outline(file_path="services/worker-service.ts")
Returns: Complete structural skeleton -- all functions, classes, methods, properties, imports (~1-2k tokens per file)
Skip this step when Step 1's folded file views already provide enough structure. Most useful for files not covered by the search results.
Parameters:
file_path(string, required) -- Path to the file
Step 3: Unfold -- See Implementation
Review symbols from Steps 1-2. Pick the ones you need. Unfold only those:
smart_unfold(file_path="services/worker-service.ts", symbol_name="shutdown")
Returns: Full source code of the specified symbol including JSDoc, decorators, and complete implementation (~400-2,100 tokens depending on symbol size). AST node boundaries guarantee completeness regardless of symbol size — unlike Read + agent summarization, which may truncate long methods.
Parameters:
file_path(string, required) -- Path to the file (as returned by search/outline)symbol_name(string, required) -- Name of the function/class/method to expand
When to Use Standard Tools Instead
Use these only when smart_* tools are the wrong fit:
- Grep: Exact string/regex search ("find all TODO comments", "where is
ensureWorkerStarteddefined?") - Read: Small files under ~100 lines, non-code files (JSON, markdown, config)
- Glob: File path patterns ("find all test files")
- Explore agent: When you need synthesized understanding across 6+ files, architecture narratives, or answers to open-ended questions like "how does this entire system work end-to-end?" Smart-explore is a scalpel — it answers "where is this?" and "show me that." It doesn't synthesize cross-file data flows, design decisions, or edge cases across an entire feature.
For code files over ~100 lines, prefer smart_outline + smart_unfold over Read.
Workflow Examples
Discover how a feature works (cross-cutting):
1. smart_search(query="shutdown", path="./src")
-> 14 symbols across 7 files, full picture in one call
2. smart_unfold(file_path="services/infrastructure/GracefulShutdown.ts", symbol_name="performGracefulShutdown")
-> See the core implementation
Navigate a large file:
…
FAQ
What's the difference between 'smart_search', 'smart_outline', and 'smart_unfold'?
'smart_search' finds files and code parts across the entire project. 'smart_outline' shows the structure of a specific file. 'smart_unfold' shows the complete code of a specific part you found.
When should I use normal tools like 'Read' or 'Grep'?
Use normal tools for small files (under 100 lines), non-code files (like JSON or text), or when you need an exact text or pattern search.
Why use this instead of reading the whole file?
Reading entire large files consumes a lot of resources. These tools create an index and show only what you need, being much faster and more efficient for understanding code structure.
Details
Original description by the author
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.
repo: thedotmack/claude-mem
Popularity
- GitHub stars
- 101k
- Ranking position
- #819
- License
- Apache-2.0
- Updated
- 10/16/2026
Comments
- …
More skills from this repository
Agent Cost Report
Has your agent generate detailed cost reports for its activities. Shows how much was spent on tokens and services.
thedotmack/claude-mem
claude-mem-install
Helps your agent set up Claude-Mem in different environments. Allows choosing between local or remote workers and configuring observation.
thedotmack/claude-mem
mem-search
Lets your agent search past memories. Useful for recalling previous solutions or work from old sessions.
thedotmack/claude-mem
host-observer
Helps your agent respond to Claude-Mem observer tasks. It should only reply with 'skip_summary' or a full XML observation.
thedotmack/claude-mem
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC