·ast-grep
{}

ast-grep

ampcode/amp-contrib

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics.

29Installs·0Trend·@ampcode

Installation

$npx skills add https://github.com/ampcode/amp-contrib --skill ast-grep

SKILL.md

This skill helps translate natural language queries into ast-grep rules for structural code search. ast-grep uses Abstract Syntax Tree (AST) patterns to match code based on its structure rather than just text, enabling powerful and precise code search across large codebases.

Follow this process to help users write effective ast-grep rules:

Clearly understand what the user wants to find. Ask clarifying questions if needed:

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics. Source: ampcode/amp-contrib.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/ampcode/amp-contrib --skill ast-grep
Category
{}Data Analysis
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is ast-grep?

Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search. This skill should be used when users ask to search for code patterns, find specific language constructs, or locate code with particular structural characteristics. Source: ampcode/amp-contrib.

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/ampcode/amp-contrib --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/ampcode/amp-contrib

Details

Category
{}Data Analysis
Source
skills.sh
First Seen
2026-02-01