Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Applies NASA Power of 10 rules for safety-critical verifiable code. Use when auditing financial, medical, or high-reliability system code.
.claude/skills/athola-safety-critical-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | 58% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 189% | 0% |
| case-09 | ✓→✓ | = Same ✓ | 27% | 0% |
Guidelines adapted from NASA's Power of 10 rules for safety-critical software.
Full rigor: Safety-critical systems, financial transactions, data integrity code Selective application: Business logic, API handlers, core algorithms Light touch: Scripts, prototypes, non-critical utilities
> "Match rigor to consequence" - The real engineering principle
bloat that prefer-invariants-over-fallbacks targets (use conserve:code-quality-principles)
Avoid goto, setjmp/longjmp, and limit recursion.
Why: Ensures acyclic call graphs that tools can verify. Adaptation: Recursion acceptable with provable termination (tail recursion, bounded depth).
All loops should have verifiable upper bounds.
python# Good - bound is clear for i in range(min(len(items), MAX_ITEMS)): process(item) # Risky - unbounded while not_done: # When does this end? process_next()
Adaptation: Document expected bounds; add safety limits on potentially unbounded loops.
Avoid heap allocation in critical paths after startup.
Why: Prevents allocation failures at runtime. Adaptation: Pre-allocate pools; use object reuse patterns in hot paths.
Functions should fit on one screen/page.
Why: Cognitive limits on comprehension remain valid. Adaptation: Flexible for declarative code; strict for complex logic.
Include defensive assertions documenting expectations.
pythondef transfer_funds(from_acct, to_acct, amount): assert from_acct != to_acct, "Cannot transfer to same account" assert amount > 0, "Transfer amount must be positive" assert from_acct.balance >= amount, "Insufficient funds" # ... implementation
Adaptation: Focus on boundary conditions and invariants, not arbitrary quotas.
Declare variables at narrowest possible scope.
python# Good - scoped tightly for item in items: total = calculate(item) # Only exists in loop results.append(total) # Avoid - unnecessarily broad total = 0 # Why is this outside? for item in items: total = calculate(item) results.append(total)
Validate inputs; never ignore return values.
python# Good result = parse_config(path) if result is None: raise ConfigError(f"Failed to parse {path}") # Bad parse_config(path) # Ignored return
Restrict macros, decorators, and code generation.
Why: Makes static analysis possible. Adaptation: Document metaprogramming thoroughly; prefer explicit over magic.
Limit indirection levels; be explicit about ownership.
Adaptation: Use type hints, avoid deep nesting of optionals, prefer immutable data.
Compile/lint with strictest settings from day one.
bash# Python ruff check --select=ALL mypy --strict # TypeScript tsc --strict --noImplicitAny
| Rule | When to Relax | |------|---------------| | No recursion | Tree traversal, parser combinators with bounded depth | | No dynamic memory | GC languages, short-lived processes | | 60-line functions | Declarative configs, state machines | | No function pointers | Callbacks, event handlers, strategies |
Reference this skill from:
pensive:code-refinement - Clean code and quality dimensionsanctum:pr-review - Code quality phase/harden - composed in the hardening pipeline/full-review safety-critical - focused entry point, and anauto-detection row when assertion density is low, loops are unbounded, or recursion lacks a termination proof
For each rule violation, report:
Rule N: <rule name>
Location: file.py:42
Anchor: `<verbatim source text at line 42>`
Issue: <what violates the rule>
Fix: <concrete remediation>safety-critical:findings-verified)Every finding must cite a real location and a verbatim anchor. Write findings to .review/findings.json and confirm each citation resolves:
bashpython plugins/imbue/scripts/citation_verifier.py \ --findings .review/findings.json --repo-root .
Drop or label UNVERIFIED any finding the verifier fails (exit 1); only verified findings enter the report. See Skill(imbue:review-core) Step 5 and Skill(imbue:structured-output) for the schema.
(applies / violated / not applicable), not a silent skip
file:line and therule number it breaks
allocation in this module") rather than being omitted
provable upper bound; unbounded loops are reported
termination argument
safety-critical use, or which rules block that judgment
Location + verbatim Anchorconfirmed by citation_verifier.py (exit 0), or unverified violations were dropped or labeled UNVERIFIED.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-10 | fail→pass | 12,329 | 9,880 | -20% | 1 | 1 | 0% | 1,951 | 3,073 | +58% | 0 | 0 | — |
case-09 | pass→pass | 15,180 | 10,593 | -30% | 1 | 1 | 0% | 2,591 | 3,296 | +27% | 0 | 0 | — |
case-07 | pass→pass | 25,139 | 9,140 | -64% | 1 | 1 | 0% | 2,238 | 2,929 | +31% | 0 | 0 | — |
case-08 | pass→pass | 16,438 | 8,051 | -51% | 1 | 1 | 0% | 2,618 | 2,705 | +3% | 0 | 0 | — |
case-01 | fail→fail | 12,650 | 3,467 | -73% | 1 | 1 | 0% | 1,643 | 1,677 | +2% | 0 | 0 | — |
case-02 | fail→fail | 25,534 | 12,206 | -52% | 1 | 1 | 0% | 2,379 | 1,699 | -29% | 0 | 0 | — |
case-03 | pass→pass | 12,024 | 9,639 | -20% | 1 | 1 | 0% | 2,045 | 2,932 | +43% | 0 | 0 | — |
case-04 | pass→pass | 13,504 | 5,824 | -57% | 1 | 1 | 0% | 2,054 | 2,329 | +13% | 0 | 0 | — |
case-05 | fail→pass | 13,785 | 9,462 | -31% | 1 | 1 | 0% | 2,072 | 2,653 | +28% | 0 | 0 | — |
case-06 | pass→pass | 15,392 | 8,890 | -42% | 1 | 1 | 0% | 2,500 | 2,761 | +10% | 0 | 0 | — |
case-11 | pass→pass | 8,242 | 12,673 | +54% | 1 | 1 | 0% | 1,213 | 2,376 | +96% | 0 | 0 | — |
case-12 | pass→pass | 14,688 | 11,231 | -24% | 1 | 1 | 0% | 2,173 | 3,136 | +44% | 0 | 0 | — |
case-13 | fail→pass | 22,592 | 19,071 | -16% | 1 | 1 | 0% | 4,081 | 4,954 | +21% | 0 | 0 | — |
case-14 | fail→fail | 15,164 | 2,277 | -85% | 1 | 1 | 0% | 2,606 | 1,815 | -30% | 0 | 0 | — |
case-15 | pass→pass | 10,682 | 3,497 | -67% | 1 | 1 | 0% | 1,655 | 2,058 | +24% | 0 | 0 | — |
case-21 | pass→pass | 11,116 | 4,915 | -56% | 1 | 1 | 0% | 1,639 | 2,244 | +37% | 0 | 0 | — |
case-16 | fail→pass | 14,550 | 7,307 | -50% | 1 | 1 | 0% | 775 | 2,239 | +189% | 0 | 0 | — |
case-17 | pass→pass | 16,960 | 10,748 | -37% | 1 | 1 | 0% | 2,666 | 3,142 | +18% | 0 | 0 | — |
case-18 | pass→pass | 14,637 | 9,973 | -32% | 1 | 1 | 0% | 2,141 | 3,052 | +43% | 0 | 0 | — |
case-19 | pass→pass | 11,641 | 5,948 | -49% | 1 | 1 | 0% | 1,854 | 2,312 | +25% | 0 | 0 | — |
case-20 | pass→pass | 10,313 | 6,000 | -42% | 1 | 1 | 0% | 1,627 | 2,355 | +45% | 0 | 0 | — |
case-22 | pass→pass | 12,063 | 6,527 | -46% | 1 | 1 | 0% | 1,937 | 2,359 | +22% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +18 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.