Flatten Fake Layers

Find and flatten "fake layer" indirection in a TypeScript codebase — functions with exactly one caller that only forward, reshape, or inject dependencies and add no fact. Runs a deterministic AST detector that flags candidates, then uses agent judgment to inline the real slop while keeping functions that do real work (type narrowing, throwing, validation, lifecycle). Use when asked to reduce over-abstraction, "un-slop" or simplify code, flatten dependency-injection ceremony, delete single-use wrappers, or clean up AI-generated indirection. Pairs with a goal/loop prompt to run iteratively across a codebase until clean.

miguelspizza Updated

File contents

miguelspizza/skills/tree/main/skills/flatten-fake-layers commit 5d3ae5be98

Frequently asked questions

npx skillmds@latest add miguelspizza/flatten-fake-layers