tilth Code Reading CLI
jahala/tilth
Replaces grep, cat, find and ls with the tilth CLI, which returns AST-aware outlines, definitions, usages and callers across many languages in one call.
Explores code structure with tree-sitter AST search tools, getting a ranked symbol map and file outlines before reading full source, to save tokens.
$ npx skills add thedotmack/claude-mem --skill smart-explore -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install thedotmack/claude-mem smart-explore --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/smart-explore .claude/skills/smart-explore && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "smart-explore" agent skill from https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-explore into .claude/skills/smart-explore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-explore", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-exploreType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add thedotmack/claude-mem --skill smart-explore -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install thedotmack/claude-mem smart-explore --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugin/skills/smart-explore .agents/skills/smart-explore && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "smart-explore" agent skill from https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-explore into .agents/skills/smart-explore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-explore", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add thedotmack/claude-mem --skill smart-explore -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install thedotmack/claude-mem smart-explore --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugin/skills/smart-explore .cursor/skills/smart-explore && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "smart-explore" agent skill from https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-explore into .cursor/skills/smart-explore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-explore", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/thedotmack/claude-mem.git --path plugin/skills/smart-explore--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add thedotmack/claude-mem --skill smart-explore -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install thedotmack/claude-mem smart-explore --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugin/skills/smart-explore .gemini/skills/smart-explore && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "smart-explore" agent skill from https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-explore into .gemini/skills/smart-explore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-explore", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install thedotmack/claude-mem smart-exploreInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add thedotmack/claude-mem --skill smart-explore -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugin/skills/smart-explore .github/skills/smart-explore && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "smart-explore" agent skill from https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-explore into .github/skills/smart-explore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-explore", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add thedotmack/claude-mem --skill smart-explore -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install thedotmack/claude-mem smart-explore --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/thedotmack/claude-mem.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugin/skills/smart-explore .opencode/skills/smart-explore && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "smart-explore" agent skill from https://github.com/thedotmack/claude-mem/tree/main/plugin/skills/smart-explore into .opencode/skills/smart-explore/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "smart-explore", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
smart-exploreExplores code structure with tree-sitter AST search tools, getting a ranked symbol map and file outlines before reading full source, to save tokens.
While active, this skill overrides default exploration: the agent uses the smart_search, smart_outline and smart_unfold MCP tools as its primary route instead of Read, Grep and Glob. The core idea is to index first and fetch on demand, getting a structural map before loading any implementation details.
It is a three-layer workflow. smart_search walks a directory, parses the code files and returns ranked matching symbols with signatures, line numbers and match reasons plus folded file views, replacing the glob, grep and read discovery cycle. smart_outline returns the skeleton of one file, with functions, classes, methods, properties and imports. smart_unfold returns the full source of one named symbol.
smart_search takes a query, an optional path, a max_results value that defaults to 20 and caps at 50, and an optional file pattern, and the skill gives rough token costs for each layer, such as a few thousand for a search and one to two thousand per outline. The skill only loads instructions, so the MCP tools must be available for the agent to call.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 71ddd11. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Smart Explore Code Search loads about 2.3k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 908 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from thedotmack/claude-mem at commit 71ddd11, republished under its Apache-2.0 licence (© thedotmack). 908 words, ~2,305 tokens.
.claude/skills/smart-explore/SKILL.md (or your agent's skills folder).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.
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 symbolDo 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.
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/pathssmart_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 fileReview 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 expandUse these only when smart_* tools are the wrong fit:
ensureWorkerStarted defined?")For code files over ~100 lines, prefer smart_outline + smart_unfold over Read.
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 implementationNavigate a large file:
1. smart_outline(file_path="services/worker-service.ts")
-> 1,466 tokens: 12 functions, WorkerService class with 24 members
2. smart_unfold(file_path="services/worker-service.ts", symbol_name="startSessionProcessor")
-> 1,610 tokens: the specific method you need
Total: ~3,076 tokens vs ~12,000 to Read the full fileWrite documentation about code (hybrid workflow):
1. smart_search(query="feature name", path="./src") -- discover all relevant files and symbols
2. smart_outline on key files -- understand structure
3. smart_unfold on important functions -- get implementation details
4. Read on small config/markdown/plan files -- get non-code contextUse smart_* tools for code exploration, Read for non-code files. Mix freely.
Exploration then precision:
1. smart_search(query="session", path="./src", max_results=10)
-> 10 ranked symbols: SessionMetadata, SessionQueueProcessor, SessionSummary...
2. Pick the relevant one, unfold it| Approach | Tokens | Use Case |
|---|---|---|
| smart_outline | ~1,000-2,000 | "What's in this file?" |
| smart_unfold | ~400-2,100 | "Show me this function" |
| smart_search | ~2,000-6,000 | "Find all X across the codebase" |
| search + unfold | ~3,000-8,000 | End-to-end: find and read (the primary workflow) |
| Read (full file) | ~12,000+ | When you truly need everything |
| Explore agent | ~39,000-59,000 | Cross-file synthesis with narrative |
4-8x savings on file understanding (outline + unfold vs Read). 11-18x savings on codebase exploration vs Explore agent. The narrower the query, the wider the gap — a 27-line function costs 55x less to read via unfold than via an Explore agent, because the agent still reads the entire file.
Smart-explore uses tree-sitter AST parsing for structural analysis. Unsupported file types fall back to text-based search.
| Language | Extensions |
|---|---|
| JavaScript | .js, .mjs, .cjs |
| TypeScript | .ts |
| TSX / JSX | .tsx, .jsx |
| Python | .py, .pyw |
| Go | .go |
| Rust | .rs |
| Ruby | .rb |
| Java | .java |
| C | .c, .h |
| C++ | .cpp, .cc, .cxx, .hpp, .hh |
Files with unrecognized extensions are parsed as plain text — smart_search still works (grep-style), but smart_outline and smart_unfold will not extract structured symbols.
.claude-mem.json)You can register additional tree-sitter grammars for file types not in the bundled list. Create or update .claude-mem.json in your project root:
{
"grammars": {
"solidity": {
"package": "tree-sitter-solidity",
"extensions": [".sol"],
"query": "solidity-query.scm"
}
}
}Each key is a language name. package is the npm package of the tree-sitter grammar and extensions lists the file extensions it covers; the package must be installed in the project's node_modules (npm install tree-sitter-solidity). query (optional) is a path, relative to the config file, to a tree-sitter query whose captures (@func, @cls, @method, @iface, @enm, @struct_def, @imp) extract symbols. Without query, a minimal generic pattern is used — it only matches grammars that define function_declaration/class_declaration node types, and query compilation fails silently (0 symbols) for grammars that lack them, so a custom query is effectively required for most languages. Once registered, smart_outline and smart_unfold parse those extensions structurally instead of falling back to plain text.
Markdown files (.md, .mdx) receive special handling beyond the generic plain-text fallback:
smart_outline — extracts headings (#, ##, ###) as the symbol tree. Use it to navigate long documents without reading the full file.smart_search — searches within code fences as well as prose, so queries for function names inside ```ts ``` blocks work as expected.smart_unfold — expands heading sections rather than function bodies; each section up to the next same-level heading is returned as a chunk.--- delimiters) is included in smart_outline output under a synthetic frontmatter symbol so metadata like title: and description: is visible without reading the whole file.© thedotmack, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugin/skills/smart-explore of thedotmack/claude-mem.
Open the folder on GitHubat commit 71ddd11
Smart Explore Code Search next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Smart Explore Code Search this skillthedotmack/claude-mem | 97k | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| tilth Code Reading CLIjahala/tilth | 352 | — | ~1.1k | Automated safety check: Pass | MIT | |
| trace-mcp Code Navigationnikolai-vysotskyi/trace-mcp | 185 | — | ~1.6k | Automated safety check: Notes | MIT | |
| Basemind Code ContextGoldziher/basemind | 106 | — | ~2.6k | Automated safety check: Pass | MIT | |
| Codebase SearchHelweg/open-codebase-index | 216 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Codegraph Detection Partneritechmeat/open-second-brain | 430 | — | ~1.6k | Automated safety check: Pass | MIT |
jahala/tilth
Replaces grep, cat, find and ls with the tilth CLI, which returns AST-aware outlines, definitions, usages and callers across many languages in one call.
nikolai-vysotskyi/trace-mcp
Routes code exploration through trace-mcp's indexed dependency graph, using symbol search, outlines, call graphs and change-impact tools instead of Read, Grep and Glob.
Goldziher/basemind
Answers structural questions about a repository, such as where a symbol is defined, what calls it and what changed recently, through the basemind MCP server.
Helweg/open-codebase-index
Chooses the right retrieval tool for code questions: compact context for unfamiliar repos, direct lookup for known symbols, call graphs for relationships and grep for exhaustive matches.
itechmeat/open-second-brain
Teaches the agent to detect whether the codegraph symbol graph is available and use it for callers, callees and impact questions, without installing or writing anything for it.
Helweg/open-codebase-index
Directs an agent to use a local codebase index for repository orientation, definition lookups, call graphs and semantic search before turning to web lookups.
thedotmack/claude-mem
Walks you through creating, installing and verifying a custom claude-mem mode, including note types, tags and optional Telegram alerts for chosen memories.
thedotmack/claude-mem
Writes a narrative Journey Into report on a project's whole development history, built from the timeline that claude-mem has recorded.
thedotmack/claude-mem
Keeps watching a pull request, fixing real review and CI problems and resolving stale threads, until it is clean and ready to merge.
thedotmack/claude-mem
Use this when setting up claude-mem on Grok Bot: local worker plus CMEM Pro observer (default), optional host-login observer, or remote cmem.ai. No Cursor…
thedotmack/claude-mem
Checks claude-mem cloud sync status and guides you through connecting a cmem.ai Pro account without the sync token ever passing through the chat.
thedotmack/claude-mem
Audits a design against Dieter Rams' ten principles of good design, scores each with evidence, and hands off a make-plan prompt for a new, refined or redesigned outcome.
Works with
Categories
Explores code structure with tree-sitter AST search tools, getting a ranked symbol map and file outlines before reading full source, to save tokens. While active, this skill overrides default exploration: the agent uses the smart_search, smart_outline and smart_unfold MCP tools as its primary route instead of Read, Grep and Glob. The core idea is to index first and fetch on demand, getting a structural map before loading any implementation details.
Smart Explore Code Search fits situations like: finding where a function or concept lives without reading whole files; getting a structural outline of a large file before opening it; reading one symbol's full source on demand.
Run `npx skills add thedotmack/claude-mem --skill smart-explore -a claude-code`. Or copy the skill folder (plugin/skills/smart-explore in thedotmack/claude-mem) into .claude/skills/smart-explore in your project. Claude Code loads it when a task matches its description.
Run `npx skills add thedotmack/claude-mem --skill smart-explore -a codex`. Or copy the skill folder (plugin/skills/smart-explore in thedotmack/claude-mem) into .agents/skills/smart-explore in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thedotmack/claude-mem --skill smart-explore -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-explore, .gemini/skills/smart-explore, .github/skills/smart-explore and .opencode/skills/smart-explore in your project.
Going by SKILL.md and its folder, Smart Explore Code Search needs the command-line tools its instructions call (npm). Our summary lists: The smart_search, smart_outline and smart_unfold MCP tools.
SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Smart Explore Code Search is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Smart Explore Code Search: tilth Code Reading CLI (jahala/tilth, 352 stars), trace-mcp Code Navigation (nikolai-vysotskyi/trace-mcp, 185 stars), Basemind Code Context (Goldziher/basemind, 106 stars) and Codebase Search (Helweg/open-codebase-index, 216 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
thedotmack (a GitHub user) maintains it in thedotmack/claude-mem, which has 97,250 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 7, 2026.
Source: thedotmack/claude-mem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.