Automated Code Decomposer

•
102
•

Refactors oversized source files into modular components with automated dependency mapping and import updates.

The Decompose File skill solves the 'large file' problem in AI-augmented development by intelligently breaking down monolithic source files into manageable, agent-friendly modules. It analyzes the Abstract Syntax Tree (AST) to identify logical boundaries, maps internal dependencies to prevent circular references, and can automatically execute the refactoring—including updating all import statements across the codebase and running tests to ensure system integrity. This skill is essential for maintaining codebase health and optimizing context windows for AI coding assistants.

Key Features

01Integrated test verification to ensure zero-breakage refactoring
02Language-specific AST parsing for TypeScript, JavaScript, Python, Go, Rust, and Java
03102 GitHub stars
04Automated dependency mapping and circular reference detection
05Intelligent file naming and purpose-statement generation
06Full-codebase import rewiring and backward-compatible re-exports

Use Cases

01Modularizing monolithic scripts to improve AI agent context efficiency and readability
02Restructuring legacy codebases into modern, domain-driven directory structures
03Refactoring 'God Objects' or utility files that exceed 500 lines of code