← ClaudeAtlas

leaky-abstractionslisted

Apply the Law of Leaky Abstractions when someone is frustrated that a library, framework, or ORM isn't hiding complexity the way it promised, when debugging requires diving into implementation details that "shouldn't matter", or when deciding how much abstraction to build on top of something. Trigger on phrases like "the ORM is doing something weird", "I have to understand how X works even though I'm using library Y", "why do I need to know the underlying SQL?", "this abstraction is breaking down", or any situation where a layer of abstraction has forced someone to understand what it was supposed to hide.
The-Artificer-of-Ciphers-LLC/skills-from-the-artificer · ★ 2 · AI & Automation · score 73
Install: claude install-skill The-Artificer-of-Ciphers-LLC/skills-from-the-artificer
# Law of Leaky Abstractions > "All non-trivial abstractions, to some degree, are leaky." > — Joel Spolsky, 2002 ## The core idea An abstraction is a simplification: it hides complexity and lets you work at a higher level. TCP hides the complexity of packet routing. An ORM hides the complexity of SQL. A garbage collector hides the complexity of memory management. But all non-trivial abstractions eventually fail to hide everything. The underlying complexity leaks through — and when it does, you need to understand both the abstraction *and* the thing it was supposed to abstract. This is not a solvable problem. It is a fundamental property of abstraction. ## Classic examples **TCP over lossy networks:** TCP presents a "reliable pipe" abstraction. But if the network is slow or lossy, TCP's retry behavior becomes visible through degraded performance. To reason about the slowdown, you need to understand TCP internals. **ORMs:** SQL ORMs promise you don't need to write SQL. But an ORM that generates a SELECT N+1 query pattern will be slow, and diagnosing it requires understanding the SQL being generated — which the ORM was meant to hide. **Iterating over a large file in a high-level language:** The abstraction promises "just loop over lines." But if the file is huge and you run out of memory, you need to understand buffering, paging, and how the OS reads files. **Remote procedure calls (RPCs):** RPC frameworks promise "call a remote function like a local one." But network f