← Back to list

ts-ast-query
by tylermorganme
⭐ 0🍴 0📅 Jan 20, 2026
SKILL.md
name: ts-ast-query description: TypeScript AST tools for querying structure and renaming symbols. Use instead of Grep when: (1) needing to understand interface/type fields before modifying code, (2) checking function signatures, (3) finding callers of a function, (4) renaming a symbol across the codebase (MUCH safer than find/replace - avoids false positives from substrings and comments).
TypeScript AST Query
Query TypeScript code structure and perform safe renames via AST parsing.
Query Usage
# Find interface/type and show fields
node scripts/ast-query.js "Plan"
# Find function signature
node scripts/ast-query.js "validatePlan"
# Find what calls a function
node scripts/ast-query.js "validatePlan" --callers
Rename Usage
Rename a symbol across the entire codebase safely:
# Preview rename (dry run)
node scripts/ast-query.js "Bed" --rename "GrowingBed" --dry-run
# Execute rename
node scripts/ast-query.js "Bed" --rename "GrowingBed"
The rename finds all actual references to the symbol via TypeScript's language service - no false positives from substring matches (BedGroup, bedFeet) or comments.
Output
Compact, greppable:
interface: Plan (src/lib/entities/plan.ts:45)
id: string
plantings: Planting[]
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon