codemod-executor

Execute automated AST-based code transformations for large-scale refactoring and migration

509 stars

Best use case

codemod-executor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Execute automated AST-based code transformations for large-scale refactoring and migration

Teams using codemod-executor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/codemod-executor/SKILL.md --create-dirs "https://raw.githubusercontent.com/a5c-ai/babysitter/main/library/specializations/code-migration-modernization/skills/codemod-executor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/codemod-executor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How codemod-executor Compares

Feature / Agentcodemod-executorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Execute automated AST-based code transformations for large-scale refactoring and migration

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Codemod Executor Skill

Executes automated code transformations using AST-based tools for large-scale refactoring, framework migrations, and language version upgrades.

## Purpose

Enable automated code transformations for:
- Framework migration (React, Angular, Vue)
- Language version upgrades
- API deprecation handling
- Pattern standardization
- Large-scale refactoring

## Capabilities

### 1. AST-Based Transformations
- Parse source code to AST
- Apply transformation rules
- Generate modified source
- Preserve code style

### 2. Pattern Matching and Replacement
- Define source patterns
- Specify target patterns
- Handle edge cases
- Support wildcards and captures

### 3. Multi-File Transformations
- Apply across entire codebase
- Handle import updates
- Coordinate cross-file changes
- Manage side effects

### 4. Dry-Run Preview
- Preview changes before applying
- Generate diff reports
- Estimate impact scope
- Identify risky transformations

### 5. Rollback Support
- Create transformation checkpoints
- Enable selective rollback
- Track applied codemods
- Maintain change history

### 6. Custom Codemod Creation
- Define new transformation rules
- Test codemods in isolation
- Document transformation logic
- Share across teams

## Tool Integrations

| Tool | Language | Integration Method |
|------|----------|-------------------|
| jscodeshift | JavaScript/TypeScript | CLI |
| ts-morph | TypeScript | Library |
| Rector | PHP | CLI |
| Scalafix | Scala | CLI |
| OpenRewrite | Java | CLI / Maven |
| Bowler | Python | CLI |
| ast-grep | Multi-language | CLI / MCP |
| gofmt -r | Go | CLI |

## Output Schema

```json
{
  "executionId": "string",
  "timestamp": "ISO8601",
  "codemod": {
    "name": "string",
    "version": "string",
    "description": "string"
  },
  "results": {
    "filesProcessed": "number",
    "filesModified": "number",
    "filesSkipped": "number",
    "transformations": "number"
  },
  "changes": [
    {
      "file": "string",
      "transformations": [
        {
          "type": "string",
          "line": "number",
          "before": "string",
          "after": "string"
        }
      ]
    }
  ],
  "errors": [],
  "warnings": []
}
```

## Integration with Migration Processes

- **code-refactoring**: Large-scale refactoring
- **framework-upgrade**: Framework migrations
- **language-version-migration**: Syntax upgrades
- **code-translation**: Language conversion assist

## Related Skills

- `refactoring-assistant`: Suggests transformations
- `static-code-analyzer`: Pre-transformation analysis

## Related Agents

- `code-transformation-executor`: Orchestrates codemods
- `framework-upgrade-specialist`: Framework-specific codemods

Related Skills

codemod-generator

509
from a5c-ai/babysitter

Generate automated code migration scripts (codemods)

pennylane-hybrid-executor

509
from a5c-ai/babysitter

PennyLane integration skill for hybrid quantum-classical machine learning and variational algorithms

braket-executor

509
from a5c-ai/babysitter

Amazon Braket integration skill for multi-vendor quantum hardware access and hybrid workflows

vasp-dft-executor

509
from a5c-ai/babysitter

VASP DFT calculation skill for electronic structure, geometry optimization, and property prediction of nanomaterials

quantum-espresso-executor

509
from a5c-ai/babysitter

Quantum ESPRESSO calculation skill for DFT simulations with pseudopotential management

lammps-md-executor

509
from a5c-ai/babysitter

LAMMPS molecular dynamics skill for nanoscale system simulation with force field management

gromacs-md-executor

509
from a5c-ai/babysitter

GROMACS molecular dynamics skill for nanoparticle-biomolecule interaction simulations

comsol-multiphysics-executor

509
from a5c-ai/babysitter

COMSOL Multiphysics skill for continuum-scale nanomaterial and device modeling

nextflow-pipeline-executor

509
from a5c-ai/babysitter

Nextflow workflow management skill for reproducible bioinformatics pipelines

kubeflow-pipeline-executor

509
from a5c-ai/babysitter

Kubeflow Pipelines skill for ML workflow orchestration, component management, and Kubernetes-native ML.

jupyter-notebook-executor

509
from a5c-ai/babysitter

Jupyter notebook execution skill for running notebooks programmatically and extracting outputs.

process-builder

509
from a5c-ai/babysitter

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

Workflow & Productivity