thinking-margin-of-safety

thinking-margin-of-safety is a skill for Claude Code from tjboudreaux/cc-thinking-skills. It costs 37 tokens per session (746 once invoked), scanned A, original, MIT.

A rule for adding a safety buffer when setting limits, capacity, budgets, or estimates under uncertainty. The buffer accounts for the chance and cost of being too low.

In plain words
What is it for?
Use it when choosing timeouts, storage, queue sizes, pool capacity, service targets, timelines, budgets, or scaling headroom.
Why use it?
It helps avoid failures caused by optimistic estimates while preventing unnecessary padding when measurement or automatic adjustment can remove the uncertainty.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Part of the cc-thinking-skills plugin — 28 skills shipped together

Good fit Use it when choosing timeouts, storage, queue sizes, pool capacity, service targets, timelines, budgets, or scaling headroom.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety
About the project

Claude Code Thinking Skills is a catalogue of 28 portable skills that give coding agents structured procedures for reasoning about decisions, diagnosis, risk, strategy, and related problems. It is intended for Claude Code, GitHub Copilot, Codex, Cursor, and other tools that support Agent Skills.

tjboudreaux/cc-thinking-skills · 1,733 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-margin-of-safety
Clone the repo
git clone --depth 1 https://github.com/tjboudreaux/cc-thinking-skills

Made for: Claude Code.

Or install cc-thinking-skills, the plugin that ships this one along with the rest of its 28 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for thinking-margin-of-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety/github.svg)](https://agentmods.dev/skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety)
Your own site
<a href="https://agentmods.dev/skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety"><img src="https://agentmods.dev/badge/skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for thinking-margin-of-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety"><img src="https://agentmods.dev/badge/skills/tjboudreaux/cc-thinking-skills/thinking-margin-of-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 746 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 15 Sept 2026
  • Snyk pass 15 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.00746
Opus 5.5 $0.00015 $0.00298
Sonnet 5.5 $0.00007 $0.00149
Haiku 4.5 $0.00004 $0.00075

Measured 2mo ago against content hash f71486975e31, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

thinking-margin-of-safety scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/thinking-margin-of-safety/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Point estimate without padding. State the base requirement in explicit units (RPS, weeks, GB, ms) and confidence (high / medium / low).
  2. Uncertainty and breach cost. List drivers (spike, growth, unknowns, dependency variance). State what fails if undershot: outage, missed launch, data loss, reputation—and whether failure is recoverable or ruinous.
  3. Size the buffer. Multiply or add margin to residual uncertainty and stakes—not to vanity. Typical bands (adjust with evidence):
    • Well-known, low consequence: ~1.2–1.5×
    • Familiar with unknowns / reversible: ~1.5–2×
    • New domain, external deps, SLA, irreversible: ~2–3× Cap or cut when buffer cost exceeds expected breach cost.
  4. Ruin constraint. If a breach can cause irreversible harm, size so the worst plausible miss still stays above the failure threshold; if that buffer is unaffordable, change the design (shed load, degrade, stage) rather than pretend precision.
  5. Strongest countercase. Challenge both under-buffering ("we will scale later") and over-buffering (idle cost, complexity). Prefer measure-then-trim when history exists.
  6. Commit and monitor. Publish the buffered commitment, the failure threshold, and the metric that would prove margin excessive or thin. Stop when the number is set and monitorable.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 57 lines · 37 tokens per session scan A f71486975e31

Subscribe to this mod's changes

thinking-margin-of-safety is a skill published in the GitHub repository tjboudreaux/cc-thinking-skills (1,733 stars, last pushed 3mo ago), licensed MIT. It adds 37 tokens to every session and 746 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

thinking-margin-of-safety compared with skills from other repositories

thinking-margin-of-safety next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
thinking-margin-of-safetytjboudreaux/cc-thinking-skillsSkill1.7k3mo agoMITA37Claude Code
forensic-read3243dwon/clear-eyeSkill15mo agoMITA170Claude Code, Codex
pre-mortem3243dwon/clear-eyeSkill15mo agoMITA162Claude Code, Codex
second-order3243dwon/clear-eyeSkill15mo agoMITA157Claude Code, Codex
huedominikmartn/hueSkill9073d agoMITA84Claude Code, Codex
example-feature-generatorqf-studio/navigatorSkill3563d agoMITA33Claude Code
authentication-patternstravisjneuman/.claudeSkill1112d agoMITA28Claude Code