Extract file structure (functions, classes, exports) efficiently without reading entire files, using ast-grep, go doc, ctags, or other language-specific tools to get outlines and signatures
Extracts code outlines (functions, classes, exports) using ast-grep, ctags, or language tools without reading entire files. Use when asked for "all methods in," "list functions," or "module API" to efficiently explore large codebases.
/plugin marketplace add xdg/xdg-claude/plugin install context-efficient-tools@xdg-claudeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/code-structure-guide.mdThese keywords mean use structure tools, NOT grep/search:
These keywords mean use search (Grep tool or ast-grep):
Ask yourself:
Get outline/index when:
Just use Read when:
DON'T use grep/rg/Grep tool for:
These are STRUCTURE queries, not SEARCH queries.
Tiered approach (try in order):
ast-grep with known patterns - Fast, targeted
Toolchain-specific approaches - When available
go doc -all <package> for all methods/functions with signatures
go doc -all ./internal/pkggo doc -all ./internal/pkgRead file - Last resort for exploration
Use structure tools to decide what to read, then read selectively.
Don't read 1000-line files blind. Get an outline first, then read the 50 lines you actually need.
For language-specific extraction patterns, ast-grep examples, ctags usage, and integration strategies, load code structure guide.