/context-efficient-tools:code-structurefrom context-efficient-tools
Outlines files and packages (functions, classes, methods, types, imports, exports) to orient before reading. Uses ast-grep outline by default, with compiler/parser and ctags fallbacks.
Ships in context-efficient-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When the question is "list the X in Y", do not Read the whole file. Get an outline first; Read selectively after.
ast-grep outline -- the default. One interface across languages, no build or import step, and every text view carries line numbers so you can Read just the range you need afterward. Pass -l to be safe (required for stdin; inferred from extension for paths).
ast-grep outline -l go file.go (digest: signatures + member names)ast-grep outline -l go file.go --view namesast-grep outline -l go file.go --match Visitor --view expandedast-grep outline -l go ./pkg--type struct,function; by name: --match REGEX; public members only: --pub-membersast-grep outline -l go file.go --items imports--json=compact (also pretty, stream)Compiler/parser-aware tool when you need true export semantics or docstrings, which outline does not carry:
go doc -all ./path/to/pkgpython -m pydoc some.module.path (requires the module to be importable -- deps installed, on PYTHONPATH)cat node_modules/<pkg>/dist/index.d.ts -- the declaration file is a pre-made API outlinejavap -p <Class> (requires compiled .class files)ctags fallback -- for languages outline's bundled rules don't cover; canonical for C/C++:
ctags -f - file | grep -v '^!' | cut -f1,4 # symbol + kind
Use the outline to decide what to Read, then Read just that section.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/ast-grepStructural code search and refactoring via ast-grep. Reach for this when Edit fails with "old_string not unique", when refactoring across formatting variations, or when matching code shape rather than text./jqExtract a known field from a JSON file by running jq instead of reading the whole file./ripgrepSearch code and text files via ripgrep (rg) in Bash. Prefer rg over the Grep tool: rg gives full unredacted output, supports pipe composition, and exposes flags Grep does not (-F, -w, -L, -v).npx claudepluginhub xdg/xdg-claude --plugin context-efficient-toolsOther plugins' skills for the same job