smart-explore

Explores code structure using tree-sitter AST parsing to search, outline, and unfold symbols.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/LGJ-Jonathan/Jonathan_Global_Claude_Skills --skill smart-explore-lgj-jonathan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-explore
Source: https://github.com/LGJ-Jonathan/Jonathan_Global_Claude_Skills/tree/main/claude-mem/plugin/skills/smart-explore
Command: npx skills add https://github.com/LGJ-Jonathan/Jonathan_Global_Claude_Skills --skill smart-explore-lgj-jonathan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reading entire source files to understand code structure wastes context tokens and slows down exploration. This Skill replaces full-file reads with AST-based structural search, letting you find functions, classes, and methods across a codebase while loading only the symbols you actually need. ## Core Features & Use Cases - Structural Code Search: Run smart_search to discover ranked symbols with signatures and line numbers across a directory in a single call, replacing the Glob-Grep-Read cycle. - File Outlining: Use smart_outline to get a complete structural skeleton of any file, including functions, classes, methods, and imports, at a fraction of the token cost of a full read. - Symbol Unfolding: Use smart_unfold to retrieve the complete source of one specific function or method, with AST boundaries guaranteeing no truncation. - Use Case: When investigating how a shutdown feature works across a large codebase, run smart_search for "shutdown" to see all relevant symbols across files, then unfold only the core implementation, using roughly 3,000 tokens instead of 12,000 or more. ## Quick Start Ask the AI to use smart_search to find all symbols related to a specific feature in your source directory, then unfold the most relevant function to see its implementation.

Frequently Asked Questions about smart-explore

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search code structure without reading entire files?

Use smart_search with a query and directory path to get ranked symbols with signatures and line numbers in one call. It walks directories, parses all code files via tree-sitter, and returns matching functions, classes, and methods without any Glob or Grep pre-scan.

What is the difference between smart_outline and smart_unfold?

smart_outline returns a file's complete structural skeleton including all functions, classes, and imports at roughly 1,000-2,000 tokens. smart_unfold returns the full source code of one named symbol, including JSDoc and decorators, at roughly 400-2,100 tokens.

When should I use Grep or Read instead of AST-based code search?

Use Grep for exact string or regex matches like finding TODO comments, and Read for files under 100 lines or non-code files like JSON and markdown. For code files over 100 lines, smart_outline plus smart_unfold is more token-efficient.

Can structural code search replace an exploration agent for understanding a system?

No. Smart-explore answers where something is and shows specific implementations, but it does not synthesize cross-file data flows or architecture narratives. For open-ended questions spanning six or more files, an Explore agent is the better fit.

How many tokens does AST-based code exploration save compared to reading files?

Outlining plus unfolding a symbol costs roughly 3,000 tokens versus 12,000 or more for a full file read, a 4-8x saving. Compared to an Explore agent at 39,000-59,000 tokens, targeted search and unfold can save 11-18x.