# Codemod Construction Ast

> Automate large-scale codebase refactoring using AST transformations on React code.

- Skill: `majiayu000/codemod-construction-ast` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/codemod-construction-ast`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/codemod-construction-ast/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/codemod-construction-ast

---


# Codemod Construction with ASTs

## Summary
Automate large-scale codebase refactoring using AST transformations on React code.

## Key Capabilities
- Parse React syntax (JSX) into manipulate ASTs (jscodeshift).
- Write robust transforms for prop renaming and component restructuring.
- Update imports and dependencies programmatically.

## PhD-Level Challenges
- Handle diverse coding styles and formatting preservation.
- Implement complex logic for hook migration (Class to Function).
- Verify AST transform correctness across the entire repo.

## Acceptance Criteria
- Deliver a codemod script for a specific refactor task.
- Apply the codemod successfully to the codebase.
- Provide unit tests for the transformation logic.

