ast-introspection
Installation
SKILL.md
AST Introspection
When to Use
- Need a structure-aware view (functions, methods, types, receivers) or a safe, mechanical refactor proposal that relies on code shape rather than string matches.
What This Skill Does
- Enumerates package-level declarations (funcs, methods, types, const/var) with
path:linecitations. - Extracts function/method signatures, receivers, and doc comments.
- Lists imports and flags suspicious patterns (duplicates, likely unused groups).
- Proposes minimal, mechanically-safe refactors (rename, extract, signature change) with verification steps.
Rules
- Prefer read-only inspection (glob, grep, targeted read) before any edit.
- Always include
path:linecitations for code claims. - Never perform large automated rewrites without an explicit preview, tests, and verification commands.