Use when provisioning capacity, setting a timeout/limit, or committing to an estimate under uncertainty. Size a buffer to the cost of being wrong instead of optimizing to the edge.
Installs just this skill. Get the whole plugin for auto-invocation.
โก How it fires
How this skill gets triggered: by you, by Claude, or both.
Fires itselfClaude auto-loads it when your prompt matches the work.
You can call itInvoke it directly when you want it.
Slash command/thinking-margin-of-safety
๐๏ธ Context preview
The summary Claude sees to decide when to auto-load this skill.
Use when provisioning capacity, setting a timeout/limit, or committing to an estimate under uncertainty. Size a buffer to the cost of being wrong instead of optimizing to the edge.
๐ Stats
Stars863
Forks126
LanguageJavaScript
LicenseMIT
๐ฆ Ships with thinking-skills
</> SKILL.md
thinking-margin-of-safety.SKILL.md
---name: thinking-margin-of-safety
description: Use when provisioning capacity, setting a timeout/limit, or committing to an estimate under uncertainty. Size a buffer to the cost of being wrong instead of optimizing to the edge.
---# Margin of Safety
## Overview
Margin of Safety, borrowed from Benjamin Graham's investment philosophy and structural engineering, is the practice of building in buffers to account for unknown unknowns. In a world of uncertainty, systems optimized to the edge are brittle. Robust systems have slack, reserves, and room for error.
**Core Principle:** Build in buffers. The world is uncertain. Systems without margin fail when stressed.
## When to Use
- Capacity planning
- Deadline and timeline estimation
- Architecture design
- Resource allocation
- Risk management
- SLA commitments
- Infrastructure provisioning
- Any commitment under uncertainty
Decision flow:
```
Provisioning, setting a limit, or committing an estimate?
โ Is there real uncertainty AND a cost to under-provisioning? โ yes โ SIZE A BUFFER TO THE FAILURE COST
โ Are you optimizing to the edge to save a little? โ yes โ ADD SLACK unless the breach is cheap
โ Estimate could be 2x off? โ factor that into the buffer
- **Cheap, instant, and reversible to adjust.** If under-provisioning is detected immediately and fixed at near-zero cost (auto-scaling that reacts in seconds, a limit you can bump live), a fat static buffer just wastes resources โ let the system absorb it.
- **The buffer's cost exceeds the expected breach cost.** Margin isn't free; when `cost(buffer) > probability(breach) ร cost(breach)`, the buffer is the wrong call. Right-size, don't max out.
- **You can eliminate the uncertainty instead of padding it.** If the real number is measurable or lookup-able, get it โ a measured value beats a padded guess. (Margin covers *residual* uncertainty, not laziness about checking.)
- **This is a stopping-criterion problem, not a buffer problem.** If the question is "how long do I keep searching/optimizing?", that's `thinking-bounded-rationality` (set a good-enough threshold), not margin. *Margin sizes the buffer on a number; bounded-rationality decides when to stop looking for the number.*
## Trigger Card
When provisioning capacity, setting a limit, or committing to an estimate under uncertainty:
1. **Estimate the base number** โ what's your best estimate without padding?
2. **Assess the cost of being wrong** โ if you undershoot, what breaks and how badly? The higher the cost, the larger the margin.
3. **Size the buffer to the uncertainty** โ add enough margin that the worst plausible miss doesn't cause a catastrophe. Commit with the buffered number.
If you can eliminate the uncertainty by measuring or looking up the real number, do that instead โ a measured value beats a padded guess. If the question is "when do I stop searching?", that's `thinking-bounded-rationality`, not margin.
## The Margin of Safety Framework
### Step 1: Identify Your Estimate
What's your best guess for the requirement?
```
Estimate: Need 100 requests/second capacity
Estimate: Project will take 6 weeks
Estimate: Need 500GB storage for year 1
```
### Step 2: Quantify Your Uncertainty
How confident are you, and what could you be missing?
```markdown
## Uncertainty Analysis
| Factor | Your Estimate | Uncertainty | Possible Range |
How will you know if margin is adequate/excessive?
- [Metric to track]
- [Threshold for concern]
- [Review cadence]
```
## Verification Checklist
- [ ] Identified base estimate
- [ ] Quantified uncertainty factors
- [ ] Selected appropriate margin for context
- [ ] Applied margin to commitment/design
- [ ] Considered cost of margin vs. cost of breach
- [ ] Have monitoring to validate margin adequacy
- [ ] Calibrating based on actual outcomes
## Key Questions
- "What happens if my estimate is wrong by 2x?"
- "How much margin does this uncertainty warrant?"
- "Am I building for best case or realistic case?"
- "What's the cost of being wrong vs. cost of margin?"
- "Have I accounted for unknown unknowns?"
- "Am I optimizing to the edge when I shouldn't be?"
## Graham's Wisdom
"The margin of safety is always dependent on the price paid."
In engineering: The margin needed depends on the cost of failure. Critical systems need more margin. Experiments can run leaner.
"Confronted with the challenge to distill the secret of sound investment into three words, we venture the motto, Margin of Safety."
In systems: When in doubt, build in margin. The cost of over-provisioning is usually much less than the cost of under-provisioning when things go wrong.
"The function of the margin of safety is, in essence, that of rendering unnecessary an accurate estimate of the future."
You don't need to predict perfectly if you have adequate margin. Margin is insurance against your own estimation errors.