logic-sandwich

Installation
SKILL.md

Logic Sandwich

Use this skill when a high-level module has too much mixed detail in one method and you want to preserve the module's role as an orchestrator.

Typical triggers:

  • a top-level class method is reading input, making detailed decisions, and mutating collaborators all in one block
  • you want to move detail out of a mediator/orchestrator without changing behavior
  • a method should read more like "gather state -> decide intent -> apply intent"
  • you are working in a deep-modules codebase where top-level files should stay simple and high-level

Goal

Refactor toward three layers:

  1. Top layer: gather state from the world
  2. Middle layer: compute a pure intent or action
  3. Bottom layer: apply the intent with side effects
Related skills

More from danielbush/skills

Installs
1
First Seen
Apr 16, 2026