Use radar for multi-framework smart contract AST generation and security analysis. Supports Rust (Anchor, native, Stylus) and Solidity (standard, Foundry). Triggers include generating AST, finding vulnerabilities, debugging via AST output, writing security templates, contributing detection rules, or working with radar's template DSL. Use when users mention radar, AST generation for Rust/Solidity/Anchor/Stylus/Foundry, smart contract parsing, vulnerability detection, template development, or security scanning.
40:T1378,
Radar is a multi-framework AST generator and security analysis tool for smart contracts. Use this skill for AST generation across Rust and Solidity ecosystems, smart contract vulnerability scanning, and radar template development to repeat detection patterns to be reused against multiple contracts.
All use Rust's syn parser for consistent, high-quality AST output.
radar -p <contract-path> --ast -o output.json
Output includes both security findings and complete AST structure.
Generate AST without security scanning:
radar -p <contract-path> --ast --ignore low,medium,high,uncertain -o ast.json
# Anchor project
radar -p ./my-anchor-project --ast -o anchor_ast.json
# Native Rust (Solana)
radar -p ./native-solana --ast -o rust_ast.json
# Stylus (Arbitrum)
radar -p ./stylus-contract --ast -o stylus_ast.json
# Solidity
radar -p ./solidity-contract --ast -o solidity_ast.json
# Foundry project
radar -p ./foundry-project --ast -o foundry_ast.json
See ast-generation.md for complete AST guide including structure, node types, and integration patterns.
radar -p <contract-path>
Essential for template development and debugging:
radar --dev -p <contract-path> --ast -o output.json
radar -p <contract-path> -t <templates-directory>
See usage.md for complete command reference and integration options.
Templates are YAML files that detect vulnerable patterns using a Python DSL.