From pow10
NASA Power of 10 Rule 5 — Average ≥2 runtime assertions per function. Severity: high.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pow10:pow10-rule-05-assertion-densityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Severity:** high
Severity: high
Use a minimum of two runtime assertions per function on average across a translation unit. Assertions must have no side effects and must trigger a defined recovery path (not be stripped) in release builds.
Assertions catch what static analysis cannot: violated preconditions, impossible states, broken invariants. Forcing the author to write ~2 per function makes them think through boundaries explicitly.
assert(x++ > 0))NDEBUG, -O for Python)Error handling for expected failures (network down, file missing) — that's normal control flow, not an assertion.
At function entry: validate every parameter against domain constraints. Before mutation: check state invariants. After mutation: check postconditions. Each assertion is a single boolean expression with a meaningful failure message.
npx claudepluginhub trevoredris/power-of-10-rulesCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.