modularize

Converts existing Laravel, Next.js, and React codebases to modular architecture with validated file migrations.

1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/fusengine/kimi-code --skill modularize-fusengine
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modularize
Source: https://github.com/fusengine/kimi-code/tree/main/plugins/ai-pilot/skills/modularize
Command: npx skills add https://github.com/fusengine/kimi-code --skill modularize-fusengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Restructuring a monolithic codebase into a modular architecture is risky and error-prone: files get moved without a plan, namespaces break, and modules end up importing from each other directly. This Skill manages the entire migration process with framework detection, a file-by-file migration map, explicit user confirmation, and per-file validation. ## Core Features & Use Cases - Framework Detection: Automatically identifies Laravel + FuseCore, standard Laravel, Next.js with modules/, or plain React, and delegates to the matching framework expert. - Planned Migration: Explores the full codebase, builds a file-by-file migration plan, and waits for explicit user approval before touching any code. - Cross-Module Isolation Enforcement: Ensures all shared logic routes through a central core (FuseCore/Core/ or modules/cores/) and blocks direct module-to-module imports. - Use Case: You have a Laravel app with all services in app/Services/ and want to move to FuseCore modules. The Skill maps every file, creates module.json manifests, updates namespaces, and runs sniper validation after each move. ## Quick Start Ask the AI to modularize this codebase and convert it to a modular architecture with a migration plan before moving any files.

Frequently Asked Questions about modularize

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

FAQPage Schema
How do I convert a Laravel app to modular architecture?▼

Group related classes by business domain, create FuseCore/{Module}/App/ directories with a module.json manifest, move files, and update namespaces. Shared code used by two or more modules goes to FuseCore/Core/, and modules never import from each other directly.

How to migrate Next.js app directory code to modules?▼

Keep only Next.js convention files (page, layout, loading, error, route) in app/ and move all business logic components, hooks, and stores to modules/{feature}/src/. Shared code used across features goes to modules/cores/.

Does the modularize skill support React without Next.js?▼

Yes, it detects plain React projects via src/ plus package.json without a next.config file and delegates to the react-expert. The same modules/ structure with a cores/ hub applies.

Can modules import from each other in a modular architecture?▼

No, direct module-to-module imports are blocked. All shared logic must route through a central core: FuseCore/Core/ in Laravel or modules/cores/ in Next.js and React projects.

What happens before any files are moved during modularization?▼

The Skill explores the full codebase structure, builds a file-by-file migration plan, and presents it for explicit user confirmation. No files are moved or modified without approval, and sniper validation runs after every change.