# Thinking Margin Of Safety

When provisioning, setting a limit, or committing an estimate under uncertainty, size a...

- Repository: https://github.com/tjboudreaux/cc-thinking-skills (1690 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-08-07
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add tjboudreaux/cc-thinking-skills --skill thinking-margin-of-safety -g -a claude-code -y`
Codex: `npx skills add tjboudreaux/cc-thinking-skills --skill thinking-margin-of-safety -g -a codex -y`
Cursor: `npx skills add tjboudreaux/cc-thinking-skills --skill thinking-margin-of-safety -g -a cursor -y`
Gemini CLI: `npx skills add tjboudreaux/cc-thinking-skills --skill thinking-margin-of-safety -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add tjboudreaux/cc-thinking-skills`

## Description

When provisioning, setting a limit, or committing an estimate under uncertainty, size a buffer to residual error and the cost of breach, not to the optimistic edge.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Margin of Safety

Core rule: commit a buffered number when residual uncertainty plus breach cost can cause ruin or costly failure. Margin covers estimation error; it is not free slack for laziness.

## When to Use

- Capacity, timeouts, pool sizes, queue depths, storage, or SLA numbers under load uncertainty
- Timeline or budget commitments where underestimation is costly
- Architecture headroom when scaling or recovery is slow
- Any public or production commitment where being wrong has asymmetric downside

## When NOT to Use

- Breach is detected immediately and fixed near-zero cost (fast auto-scale, live-tunable limit), static fat buffers waste resources
- `cost(buffer) > P(breach) × cost(breach)`, right-size or measure instead of maxing out
- Uncertainty is eliminable by measurement or lookup, get the real number first
- Stopping-criterion / search budget problems, use bounded rationality, not padding
- Fully known parameters and low stakes where edge optimization is the goal

## Procedure

The rest: https://github.com/tjboudreaux/cc-thinking-skills/blob/HEAD/skills/thinking-margin-of-safety/SKILL.md
