Skip to main content

Monster Method Decomposition

Decompose a very large method (100+ lines, deeply nested) safely using automated refactoring and Feathers' Bulleted/Snarled classification. Use whenever a developer faces 'a huge method', 'I have a 500-line function', 'deeply nested conditionals', 'monster method', 'god method', 'need to break up this giant method', 'can't test this method it's too big', 'where do I even start with this method'. Activates for 'method extraction', 'IDE refactoring', 'automated extract method', 'introduce sensing variable', 'find sequences', 'skeletonize', 'coupling count', 'bulleted method', 'snarled method', 'break out method object'.

Install

1. Add marketplace
/plugin marketplace add bookforge-ai/bookforge-skills
2. Install plugin
/plugin install working-effectively-with-legacy-code@bookforge-skills
3. Use the skill
/monster-method-decomposition
CC-BY-SA · Open sourceGitHub

What You'll Need

ReadEditBashGrep (optional)

Source Book

Working Effectively with Legacy Code cover

Working Effectively with Legacy Code

Michael C. Feathers