ast-analyzer

Parse source code into Abstract Syntax Trees for symbol extraction and variable flow tracing.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/mscipio/bilt-transactions-export --skill ast-analyzer-mscipio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ast-analyzer
Source: https://github.com/mscipio/bilt-transactions-export/tree/main/.opencode/skills/ast-analyzer
Command: npx skills add https://github.com/mscipio/bilt-transactions-export --skill ast-analyzer-mscipio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides highly accurate code analysis by parsing source code into Abstract Syntax Trees (ASTs), eliminating the unreliability and potential hallucinations associated with regex-based parsing.

Core Features & Use Cases

  • Precise Symbol Extraction: Reliably extract functions, classes, variables, and more with their exact definitions and signatures.
  • Variable Flow Tracing: Track the definition, usage, and modification of variables throughout the codebase.
  • Code Structure Understanding: Analyze function call graphs, import dependencies, and module relationships.
  • Use Case: Ensure security by tracing user input through the codebase to confirm it's sanitized before reaching sensitive database queries.

Quick Start

Use the ast-analyzer skill to extract all exported symbols from the file '/src/utils/helpers.ts'.

Frequently Asked Questions about ast-analyzer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract symbols from TypeScript and Python code without regex?

To extract symbols from TypeScript and Python code without regex, parse the source files into Abstract Syntax Trees. This AST-based approach reliably identifies functions, classes, and variables with exact definitions, eliminating the hallucinations common in pattern matching.

What is the best way to trace variable flow for security analysis across multiple languages?

Tracing variable flow for security analysis is best done by generating structured Abstract Syntax Tree representations. This method accurately tracks user input definition, usage, and modification across TypeScript, Python, Go, Rust, Java, and C/C++ to confirm sanitization before sensitive queries.

Can I analyze code structure and import dependencies for Rust and Go files?

Yes, you can analyze code structure and import dependencies for Rust and Go files. The AST parsing process supports these languages to map module relationships, build context maps, and generate detailed structural analysis reports.

How do I build a function call graph for Java and C/C++ source code?

You build a function call graph for Java and C/C++ source code by parsing it into language-aware Abstract Syntax Trees. This structured tree representation understands code structure and extracts precise function call relationships across the codebase.

Why does regex-based code analysis fail to accurately extract exported symbols?

Regex-based code analysis fails to accurately extract exported symbols because it lacks structural understanding and is prone to unreliability and hallucinations. Parsing source code into Abstract Syntax Trees provides accurate symbol extraction and variable flow tracing.