One-click install
npx skills add https://github.com/Mekann2904/mekann --skill code-transform
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-transform
Source: https://github.com/Mekann2904/mekann/tree/main/.pi/lib/skills/code-transform
Command: npx skills add https://github.com/Mekann2904/mekann --skill code-transform

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates complex code transformations and refactoring tasks across large codebases, ensuring safety and consistency that manual methods or simple text replacements cannot achieve.

Core Features & Use Cases

  • AST-based transformations: Safely modify code structure, rename variables, update imports, and alter function signatures using Abstract Syntax Trees.
  • Multi-language support: Includes examples and tools for JavaScript/TypeScript (jscodeshift, ts-morph) and Python (libcst, Bowler).
  • Use Case: Automatically migrate a deprecated API across thousands of files in your project by renaming functions, updating import paths, and restructuring arguments, all while maintaining code integrity.

Quick Start

Use the code-transform skill to rename all occurrences of 'oldFunction' to 'newFunction' within the 'src/' directory.

Frequently Asked Questions about code-transform

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

FAQPage Schema
How do I safely rename functions and update imports across a large codebase?

You can use AST-based code transformation to automate API migrations across thousands of files by leveraging tools like jscodeshift and ts-morph to rename functions, update import paths, and restructure arguments deterministically while maintaining code integrity.

Can I use codemods for both JavaScript and Python refactoring?

AST-based refactoring prevents unintended modifications by parsing code into structural syntax trees and applying deterministic rules, avoiding the formatting and contextual errors common in regex-based text replacements.

What is the best way to migrate a deprecated API across thousands of files?

The best way to migrate a deprecated API involves deploying AST-based codemods to deterministically rename functions, update import paths, and restructure arguments across thousands of files while maintaining code integrity.

Does AST-based code transformation work for bulk renaming and pattern replacements?

Yes, AST-based code transformation works for bulk renaming and pattern replacements by leveraging Abstract Syntax Trees to execute deterministic code manipulations across multiple programming languages safely.