moai-tool-ast-grep

Automate structural code search and refactoring across languages using AST patterns with sg CLI.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/gkswls5006-web/last-todo --skill moai-tool-ast-grep-gkswls5006-web
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-tool-ast-grep
Source: https://github.com/gkswls5006-web/last-todo/tree/main/.claude/skills/moai-tool-ast-grep
Command: npx skills add https://github.com/gkswls5006-web/last-todo --skill moai-tool-ast-grep-gkswls5006-web

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Structural code search, linting, and codemods across multiple languages using AST patterns to accelerate refactoring, security checks, and API migrations.

Core Features & Use Cases

  • Precision across 40+ languages: structural search, code transformation, and automated refactoring using sg CLI.
  • Security scanning and API migration: pattern-based checks and safe code transformations to enforce standards.
  • Real-world use: quickly locate and rewrite code patterns across large repos to standardize APIs and improve security posture.

Quick Start

Run a structural pattern search and apply a codemod across a codebase with sg.

Frequently Asked Questions about moai-tool-ast-grep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run structural code search and codemods across multiple programming languages?

Structural code search and codemods across 40+ languages are automated using AST pattern matching with the sg CLI, enabling precise structural search and safe code transformation in large repositories.

What is AST-based pattern matching for security scanning and API migration?

AST-based pattern matching uses abstract syntax trees to locate and rewrite code patterns, accelerating security checks and API migrations by applying language-agnostic structural rules to your codebase.

How do I automate large-scale code refactoring without breaking existing syntax?

Large-scale refactoring is automated using AST-based codemods that apply transformation rules to match and rewrite code structures safely, preserving syntax while standardizing APIs across large repos.

Can I use ast-grep for language-agnostic linting and code search in large codebases?

Yes, ast-grep supports language-agnostic linting and code search across 40+ languages, applying structural pattern matching to enforce security standards and locate code patterns in large codebases.

What's the best way to standardize APIs and improve security posture across a large codebase?

Standardizing APIs and improving security posture is best achieved by applying structural pattern-based checks and codemods to quickly locate and rewrite code patterns across large repositories.

Does ast-grep work as a plug-in tool for code transformation pipelines?

Ast-grep integrates as a plug-in tool through MoAI-ADK integration, supporting CLI tooling for structural pattern matching and transformation rules within automated code transformation pipelines.