module-based-refactor

Reorganize a flat repository into a 5-layer module architecture with git mv.

1|Updated Oct 6, 2025
One-click install
npx skills add https://github.com/AcidicSoil/DSPyTeach --skill module-based-refactor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: module-based-refactor
Source: https://github.com/AcidicSoil/DSPyTeach/tree/main/.agents/skills/module-based-refactor
Command: npx skills add https://github.com/AcidicSoil/DSPyTeach --skill module-based-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of disorganized, flat code repositories by systematically restructuring them into a clean, scalable, and maintainable 5-layer module-based architecture.

Core Features & Use Cases

  • Repository Reorganization: Migrates a flat project structure to a standardized module-based layout.
  • Import Path Migration: Updates all import statements to reflect the new module structure.
  • Git History Preservation: Ensures that all refactoring steps are performed using git mv to maintain commit history.
  • Artifact Cleanup: Removes obsolete files, temporary data, and duplicate directories.
  • Hidden Folder Consolidation: Merges scattered hidden configuration and data folders into a central location.
  • Use Case: You have a Python project with all its modules and tests scattered at the root. This Skill will organize it into src/package/modules/, tests/modules/, etc., ensuring all imports are correct and git history is preserved.

Quick Start

Use the module-based-refactor skill to reorganize the current repository into a 5-layer module structure.

Frequently Asked Questions about module-based-refactor

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

FAQPage Schema
How do I refactor a flat code repository into a modular architecture?▼

Refactoring a flat code repository into a modular architecture involves reorganizing the file structure into a standardized 5-layer module-based layout. This process automates directory consolidation and import path updates for better scalability.

How do I update import paths when restructuring a Python project directory?▼

Updating import paths during a Python project directory restructuring is handled automatically by migrating import statements to reflect the new module structure. This ensures all dependencies correctly point to the reorganized module paths.

Can I preserve git commit history when reorganizing code into modules?▼

You can preserve git commit history when reorganizing code into modules by performing all file movements using `git mv`. This ensures the version control system tracks the refactoring steps without losing previous commit logs.

What is the best way to consolidate scattered hidden configuration folders during a refactor?▼

The best way to consolidate scattered hidden configuration folders during a refactor is to merge them into a central location. This hidden folder consolidation is part of the structural improvement process for repository maintainability.

Does repository restructuring remove obsolete files and duplicate directories?▼

Repository restructuring does remove obsolete files and duplicate directories through an artifact cleanup process. This eliminates temporary data and redundant folders, resulting in a clean, standardized 5-layer module-based architecture.