hai-ast-grep

Community

Build precise AST searches and safe codemods

Authorhylarucoder
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill solves inaccurate code searching and risky bulk refactoring by replacing text-based matching with syntax-aware AST analysis that finds, validates, and transforms code patterns reliably.

Core Features & Use Cases

  • Structural Code Matching: Create ast-grep patterns and YAML rules for finding code structures, linting violations, and reusable analysis workflows.
  • Safe Code Transformation: Design codemods and automated rewrites with positive and negative fixture validation before applying changes across a repository.
  • Use Case: When migrating an API across a large TypeScript codebase, use this Skill to locate every call pattern, avoid false matches in comments or strings, and generate a validated rewrite rule.

Quick Start

Use the hai-ast-grep skill to create an ast-grep rule that finds all deprecated API calls in my repository and validates the matches before rewriting them.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: hai-ast-grep
Download link: https://github.com/hylarucoder/hai-stack/archive/main.zip#hai-ast-grep

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 545,000+ vetted skills library on demand.