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
SKILL.md
code-structure
When the question is "list the X in Y", do not Read the whole file. Get an outline first; Read selectively after.
Trigger discrimination
"list / show / all the methods/classes/exports in ..." -- outline (this skill)
"where is X defined" / "find calls to X" -- search (rg or ast-grep)
"how does X work" / "what does X do" -- Read
Tiered approach
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).
File outline: ast-grep outline -l go file.go (digest: signatures + member names)
Cheapest survey: ast-grep outline -l go file.go --view names
Drill one symbol's members: ast-grep outline -l go file.go --match Visitor --view expanded
Directory's exported surface: ast-grep outline -l go ./pkg
Filter by kind: --type struct,function; by name: --match REGEX; public members only: --pub-members
Dependency check: ast-grep outline -l go file.go --items imports