engine-code-review

Split oversized Lua engine files using a register-pattern refactor.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/WayneWalterBerry/MMO --skill engine-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: engine-code-review
Source: https://github.com/WayneWalterBerry/MMO/tree/main/.squad/skills/engine-code-review
Command: npx skills add https://github.com/WayneWalterBerry/MMO --skill engine-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Senior engineer code review of engine Lua files to identify runaway monoliths, propose splits, surface test gaps, and drive a TDD-first refactor without regressing behavior.

Core Features & Use Cases

  • Size auditing of engine files (>500 lines) with counts and sorting to reveal candidate split points
  • Dependency and module-structure analysis to surface natural boundaries and improve LLM editability
  • Pre-refactor baseline test validation, risk assessment, and a safe post-refactor verification workflow

Quick Start

Review the engine codebase to identify runaway files, run a pre-refactor test baseline, and apply a register-pattern split that preserves behavior.

Frequently Asked Questions about engine-code-review

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

FAQPage Schema
How do I refactor a monolithic Lua engine file without breaking existing behavior?

To refactor monolithic Lua files without regressions, establish a baseline test suite first, then apply a register-pattern split using a thin loader and category modules to preserve behavior while improving editability.

When should I split oversized Lua engine files into smaller modules?

You should split oversized Lua engine files when a module exceeds roughly 500 lines, when multiple agents edit the same file concurrently, or before adding a major feature to improve testability and LLM editability.

How do I identify natural boundaries for splitting large Lua codebases?

Identify natural boundaries for splitting large Lua codebases by performing a size audit to find files over 500 lines, then analyzing dependency and module-structure relationships to surface logical category separations.

Does refactoring Lua engine modules with a register pattern affect testability?

Refactoring Lua engine modules with a register pattern improves testability by isolating functionality into category modules and shared helpers, enabling safer, more modular edits and easier verification against baseline tests.

What is the best way to prepare a Lua engine codebase for a major feature addition?

The best way to prepare a Lua engine codebase for a major feature addition is to run a pre-refactor baseline test validation, assess risks, and split monolithic files into modular components to ensure safer edits.

Why does editing a large Lua engine file cause issues with multiple agents?

Editing a large Lua engine file causes issues with multiple agents because monolithic modules over 500 lines create merge conflicts and edit collisions, making it difficult to apply changes safely without splitting the file.