refactoring-patterns

Installation
SKILL.md

Extract Method

When: A code block does one logical thing within a function that does more.

BEFORE:

function processOrder(order: Order) {
  // Validate order
  if (!order.items || order.items.length === 0) {
    throw new Error('Order must have items');
  }
  if (order.total <= 0) {
    throw new Error('Order total must be positive');
  }
Installs
1
GitHub Stars
1
First Seen
Jun 26, 2026
refactoring-patterns — medy-gribkov/arcana