smart-explore

Search code symbols and retrieve implementations using tree-sitter AST parsing.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/ollieb89/claw_imperium --skill smart-explore-ollieb89
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: smart-explore
Source: https://github.com/ollieb89/claw_imperium/tree/main/extensions/claude-mem/plugin/skills/smart-explore
Command: npx skills add https://github.com/ollieb89/claw_imperium --skill smart-explore-ollieb89

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a highly efficient and token-optimized method for understanding code structure, locating specific functions, and exploring codebases without needing to read entire files.

Core Features & Use Cases

  • Token-Optimized Search: Uses tree-sitter AST parsing to find files and symbols across a directory.
  • Structural Code Exploration: Generates a structural outline of a given file.
  • Precise Implementation Retrieval: Extracts the full source code of a specific symbol (function, class, method).
  • Use Case: Quickly find all occurrences of a function related to 'shutdown' within your project's ./src directory, then unfold the implementation of the most relevant one.

Quick Start

Use smart_search to find all symbols related to 'shutdown' within the './src' directory.

Frequently Asked Questions about smart-explore

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

FAQPage Schema
How do I find specific functions and classes in a codebase without reading entire files?

To find specific functions and classes without reading entire files, use AST parsing to perform token-optimized structural code search. This approach identifies and extracts precise symbol implementations across your directory, bypassing the need to load full documents into context.

What is the best way to navigate code structure using tree-sitter AST parsing?

Navigating code structure with tree-sitter AST parsing involves querying the abstract syntax tree to locate files, functions, and methods. This token-optimized method generates structural outlines and retrieves precise implementations, replacing traditional text-based discovery workflows.

How do I extract a specific method's implementation from a source directory?

To extract a specific method's implementation from a source directory, utilize structural code exploration to search for the symbol name. This AST parsing technique pinpoints the exact function and unfolds its full source code directly from the syntax tree.

Does AST-based symbol search work better than Grep for codebase navigation?

AST-based symbol search offers more precise codebase navigation than Grep by targeting structural syntax rather than raw text matches. This token-optimized approach avoids false positives and retrieves exact implementations without loading irrelevant file contents into context.

Can I generate a structural outline of a file using AST parsing?

Yes, you can generate a structural outline of a file using AST parsing. This functionality maps the abstract syntax tree to identify all included functions, classes, and methods, providing a token-optimized overview of the file's architectural layout.

When should I use structural code search instead of Glob for file discovery?

You should use structural code search instead of Glob for file discovery when you need to locate exact symbols, functions, or classes within a codebase. AST parsing provides precise implementation retrieval and token-optimized exploration that generic file pattern matching cannot achieve.