ast-grep-tool
extension
Structural code search and rewrite using ast-grep as a native LLM tool
astcode-searchrefactoring
Open Settings → Add-Ons and pick ast-grep-tool
Source: addons/ast-grep-tool

Structural code search and rewrite with the ast-grep binary. Requires Piclaw >=1.8.0.

Install

Open Settings → Add-Ons and install ast-grep-tool. The add-on needs an ast-grep executable in its local node_modules/.bin directory or on PATH:

bash
bun add @ast-grep/cli

Tools

Both tools accept a language and optional workspace-relative path. Output is capped at 30,000 characters.

Supported languages: TypeScript, JavaScript, TSX, JSX, Python, Rust, Go, Java, C, C++, C#, Ruby, Swift, Kotlin, Lua, HTML, CSS, JSON, and YAML.

Skill

The bundled ast-grep skill contains search patterns, a safe rewrite workflow, and troubleshooting advice.