ast-grep-transforms

Community

Rewrite code with ast-grep transforms and fixes.

Authorhafley66
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill automates rewriting and transforming code with ast-grep rules, reducing manual refactors and enabling precise metavariable-driven edits.

Core Features & Use Cases

  • Automate code rewriting with patterns and metavariable substitution to produce deterministic fixes.
  • Apply transform operations (replace, substring, convert, rewrite) to manipulate captured text before substitution.
  • Chain rewriters for recursive or selective transformations and reuse FixConfig for advanced behavior (expandStart, expandEnd).
  • Use codemods to perform large-scale refactors across languages supported by ast-grep.

Quick Start

Create a simple rule to rename a JavaScript variable from var to let using metavariables and a fix.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: ast-grep-transforms
Download link: https://github.com/hafley66/claude-research/archive/main.zip#ast-grep-transforms

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 471,000+ vetted skills library on demand.