agents/skills/radar/SKILL.md
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.
npx skillsauth add auditware/radar radarInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
version: 0.1.0
author: your-name
accent: anchor
name: Template Name
description: Vulnerability description
severity: Low|Medium|High
certainty: Low|Medium|High
vulnerable_example: URL
rule: |
for source, nodes in ast:
try:
pattern = nodes.find_by_names("VulnType").exit_on_none()
nodes.find_by_names("Safeguard").exit_on_value()
print(pattern.first().to_result())
except:
continue
--ast to inspect contract structureapi/tests/test_templates.pymake testexit_on_none() when pattern must existexit_on_value() to verify safeguard absenceSee template-writing.md for complete guide.
Template rules use methods from RustASTNode:
find_by_names(*idents) - Find by identifierfind_functions_by_names(*names) - Find function declarationsfind_method_calls(caller, method) - Find method invocationsfind_chained_calls(*idents) - Find chained callsfind_comparison_involving(ident) - Find comparisonsfind_macro_attribute_by_names(*idents) - Find macro attributesexit_on_none() - Stop if not found (pattern required)exit_on_value() - Stop if found (safeguard exists)first() - Get first nodeto_result() - Convert to finding formatto_raw_ast_debug() - Inspect AST structure (add to template, don't call print)See dsl-functions.md for complete API reference.
Every template requires:
api/tests/mocks/<template_name>/bad/src/lib.rs - Vulnerable codeapi/tests/mocks/<template_name>/good/src/lib.rs - Safe codeapi/tests/test_templates.pyTest command:
radar --dev -p api/tests/mocks/<template_name>/bad --ast -o outputs/out.json
--dev for detailed logsnodes.to_raw_ast_debug() in template to inspect ASTReview template logic - templates must have 0% false positive rate.
Use --ast flag to understand contract structure:
radar --dev -p <contract> --ast -o debug.json
Examine the ast field in output to see node structure.
Templates are the primary contribution method. Each template must:
See template-writing.md for complete contribution guide.
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.