smart-explore

Index codebases with tree-sitter to locate symbols via AST parsing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/4asaanAI/Claude-patches --skill smart-explore-4asaanai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-explore
Source: https://github.com/4asaanAI/Claude-patches/tree/main/framework-foundry/Claude%20Plugins/claude-mem-main/plugin/skills/smart-explore
Command: npx skills add https://github.com/4asaanAI/Claude-patches --skill smart-explore-4asaanai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill minimizes unnecessary file reads and token usage by providing structural, AST-based discovery and targeted reads so developers can find symbols and inspect implementations without loading full files.

Core Features & Use Cases

  • Token-optimized discovery: smart_search walks the codebase with tree-sitter parsing and returns ranked symbols with folded file views to surface relevant locations quickly.
  • File structure outlines: smart_outline presents complete AST-based skeletons for large files so you can understand structure without reading implementations.
  • Targeted unfolding: smart_unfold returns the full source of a single symbol with AST node boundaries to guarantee completeness while avoiding full-file reads.
  • Use Case: Locate a gracefull shutdown routine across many services, inspect its signature and surrounding symbols, then unfold the exact implementation you need.

Quick Start

Use the smart_search tool to find shutdown in ./src and use the returned folded views to pick symbols to smart_unfold for implementation details.

Frequently Asked Questions about smart-explore

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

FAQPage Schema
How do I search a large codebase for a specific function without reading entire files?

AST-based code exploration parses the codebase with tree-sitter to locate symbols and returns folded file views, minimizing unnecessary file reads and token usage. You can use the smart_search tool to find functions, classes, and methods across varying codebase sizes.

How does AST parsing help with token optimization during code exploration?

AST parsing enables token optimization by indexing code structurally to return ranked symbols and folded file views. This mechanism limits reads to requested symbols and outlines file structures, avoiding the token overhead of loading full file implementations.

What is the best way to extract a single method's implementation from a large source file?

The best way to extract a single method is using targeted unfolding, which returns the full source of a specific symbol based on AST node boundaries. This guarantees implementation completeness while avoiding full-file reads and saving tokens.

Can I use path and file pattern parameters to filter structural code searches?

Yes, structural code search supports path, file_pattern, and max_results parameters to narrow down discovery. This allows you to precisely target specific directories and file types when locating symbols within large codebases.

Does tree-sitter code search work for understanding file structure without loading implementations?

Yes, tree-sitter code search provides complete AST-based skeletons for large files to outline their structure. This presents the file's organization so you can understand its layout without reading the underlying implementations.

When should I avoid full-file reads during code navigation?

You should avoid full-file reads when inspecting specific implementations across many services, such as locating a shutdown routine. AST-based discovery and targeted unfolding limit reads to exact symbol boundaries, preventing excessive token consumption.