·ast-grep
</>

ast-grep

knoopx/pi

Searches code by AST patterns and performs structural refactoring across files. Use when finding function calls, replacing code patterns, or refactoring syntax that regex cannot reliably match.

10Installs·1Trend·@knoopx

Installation

$npx skills add https://github.com/knoopx/pi --skill ast-grep

SKILL.md

| $VAR | Match a single AST node and capture it as VAR | | $$$VAR | Match zero or more AST nodes (spread) and capture as VAR | | $ | Anonymous placeholder (matches any single node, no capture) | | $$$ | Anonymous spread placeholder (matches any number of nodes) |

Shell quoting: Escape $ as \$VAR or wrap in single quotes.

javascript, typescript, tsx, html, css, python, go, rust, java, c, cpp, csharp, ruby, php, yaml

Searches code by AST patterns and performs structural refactoring across files. Use when finding function calls, replacing code patterns, or refactoring syntax that regex cannot reliably match. Source: knoopx/pi.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/knoopx/pi --skill ast-grep
Source
knoopx/pi
Category
</>Dev Tools
Verified
First Seen
2026-02-15
Updated
2026-02-18

Quick answers

What is ast-grep?

Searches code by AST patterns and performs structural refactoring across files. Use when finding function calls, replacing code patterns, or refactoring syntax that regex cannot reliably match. Source: knoopx/pi.

How do I install ast-grep?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/knoopx/pi --skill ast-grep Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/knoopx/pi

Details

Category
</>Dev Tools
Source
skills.sh
First Seen
2026-02-15