File Decomposition & Refactoring
Analyzes and splits large source files into modular, maintainable components with automated import updates and test verification.
The decompose-file skill helps developers manage technical debt by breaking down monolithic source files that exceed 'agent-friendly' size thresholds. It intelligently parses file structures across multiple languages including TypeScript, Python, Go, Rust, and Java to map internal dependencies and prevent circular imports. Beyond just planning, the skill can automate the entire refactoring process—creating new files, updating cross-project imports, maintaining backward compatibility via re-exports, and running tests to ensure system integrity. This is particularly useful for optimizing codebases for AI-augmented development, where smaller, focused files lead to better agent performance and fewer errors.