decompose-file

Decompose large source files into modular units with dependency mapping.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/robit-man/transcribe-cli --skill decompose-file
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: decompose-file
Source: https://github.com/robit-man/transcribe-cli/tree/main/.claude/skills/decompose-file
Command: npx skills add https://github.com/robit-man/transcribe-cli --skill decompose-file

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of overly large source code files that hinder maintainability, readability, and developer productivity by providing a structured approach to breaking them down.

Core Features & Use Cases

  • Automated Code Decomposition: Analyzes file structure, identifies logical sections, and proposes a plan to split them into smaller, more manageable files.
  • Dependency Mapping & Verification: Maps internal dependencies between proposed modules and verifies that no circular dependencies are introduced.
  • Automated Refactoring: Optionally executes the decomposition plan, creates new files, updates import statements across the codebase, and verifies the changes with tests.
  • Use Case: Refactor a monolithic service file into several smaller, focused modules to improve code organization and reduce cognitive load for the development team.

Quick Start

Decompose the file src/path/to/large-file.ts into smaller modules.

Frequently Asked Questions about decompose-file

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

FAQPage Schema
How do I split a large source code file into smaller modules?

To split large source code files into smaller modules, this process analyzes file structure, identifies logical sections, proposes a decomposition plan, and optionally executes refactoring with import updates and test verification.

What programming languages are supported for automated code decomposition?

Automated code decomposition supports TypeScript, Python, Go, Rust, and Java. For other languages, it applies fallback heuristics to parse and split your source code files into manageable units.

How does code decomposition handle internal dependencies and circular references?

During code decomposition, internal dependencies between proposed modules are mapped and verified to ensure that the refactored codebase does not introduce circular dependencies.

Can code decomposition automatically update imports across my codebase?

Yes, automated refactoring can execute the decomposition plan, create new files, update import statements across the codebase, and verify the changes by running tests.

What is the best way to refactor a monolithic service file to improve modularity?

The best way to refactor a monolithic service file for modularity is to use heuristic analysis to map internal dependencies, propose a split plan into focused modules, and execute it with automated import updates.

Are there limitations when decomposing files in unsupported programming languages?

For unsupported programming languages outside of TypeScript, Python, Go, Rust, and Java, the decomposition relies on fallback heuristics rather than language-specific parsing, which may limit split accuracy.