moai-tool-ast-grep

Installation
SKILL.md

AST-Grep Integration

Structural code search, lint, and transformation tool using Abstract Syntax Tree analysis.

Quick Reference

What is AST-Grep

AST-Grep (sg) is a fast, polyglot tool for structural code search and transformation. Unlike regex-based search, it understands code syntax and matches patterns based on AST structure.

When to Use

  • Searching for code patterns that regex cannot capture such as nested function calls
  • Refactoring code across multiple files with semantic awareness
  • Security scanning for vulnerability patterns including SQL injection and XSS
  • API migration and deprecation handling
  • Enforcing code style rules at the syntax level

Core Commands

Related skills
Installs
8
GitHub Stars
61
First Seen
Jan 24, 2026