refactor-structure

Installation
SKILL.md

Structure refactor workflow

  1. Inspect the current layout using the following commands to identify structural issues, such as oversized files, mixed responsibilities, misplaced modules, unclear names, and duplicated organization patterns.
    • find src -type f -not -path '*/__generated__/*' -print0 | xargs -0 wc -l 2>/dev/null | sort -rn | head -30
    • tree -h src
    • If the user specifies a directory, replace src with it.
  2. Reorganize the code by responsibility to improve cohesion and reduce coupling.
    • Split oversized files, group related modules, and create new directories only when they clarify ownership.
    • Update imports alongside your changes while maintaining existing behavior.
  3. Rename files and identifiers (such as variables and functions) to more accurately reflect their roles.
    • Ensure all references are updated accordingly.
  4. Run the quickest relevant verification tools, such as type checkers or linters, to detect broken imports or incorrect module wiring.
  5. Commit and push the changes, then execute either the open-pr or update-pr skill.
  6. Summarize the changes made and explain why the new structure is more maintainable.
Installs
5
GitHub Stars
1
First Seen
Apr 9, 2026
refactor-structure — willbooster/agent-skills