Ast grep structural code search rewrite

From agentskillexchange/skills · View interactive version

Ast grep structural code search rewrite is an AI agent skill from the GitHub repository agentskillexchange/skills. Use ast-grep (sg) to search, lint, and rewrite code across large codebases using AST pattern matching. A blazing-fast alternative to regex-based code transformations that understands syntax structure.

How to use this skill

Skill file

ast-grep Structural Code Search and Rewrite

Use ast-grep (sg) to search, lint, and rewrite code across large codebases using AST pattern matching. A blazing-fast alternative to regex-based code transformations that understands syntax structure.

Installation

Use the upstream install or setup path that matches your environment:

Requirements and caveats from upstream:

Basic usage or getting-started notes:

Source

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.