SKILL18.0K installs898

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.

Type
Skill
Author
ast-grep
Category
Code Review
GitHub stars
898
Installs
18.0K
Last updated
September 13, 2026

Install

npx skills add https://github.com/ast-grep/agent-skill --skill ast-grep

Use cases


Frequently Asked Questions

How is ast-grep different from plain text search?

It matches code by its abstract syntax tree, so queries can go beyond simple text patterns.

What can I do with the rules this skill helps write?

Structural code search and analysis, such as finding specific language constructs or code with particular structural characteristics.

Who is it for?

Anyone doing codebase-wide analysis, refactors, or lint rule authoring.


About this skill

A guide to writing ast-grep rules for structural code search, letting you match code by its abstract syntax tree rather than by text. Use it when you need to find specific language constructs or patterns that plain grep cannot express. Aimed at anyone doing codebase-wide analysis, refactors, or lint rule authoring.

Summary written with AI assistance from the project's public description.


Categories


More from ast-grep


Similar Skills