Skip to content
Back to skills

Reliability

ASecurity

Use when reviewing code for unbounded loops or missing assertions.

  • 23 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 3, 2026
developmentgo

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 9, 2026

npx -y skills add dean0x/devflow --skill reliability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Reliability?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Reliability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dean0x-reliability/badge)](https://www.skillsdirectory.com/skills/dean0x-reliability)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: reliability
description: Use when reviewing code for unbounded loops or missing assertions.
user-invocable: false
allowed-tools: Read, Grep, Glob
---

# Reliability Patterns

Detection patterns for runtime reliability and defensive bounds. Use with `devflow:review-methodology`.

## Iron Law

> **Every operation must terminate and every resource must be bounded.**
>
> Adapted from NASA/JPL's "Power of Ten" rules for safety-critical code: every loop must
> have a fixed upper bound, every resource must have a known lifetime, and every assumption
> must be checked by an assertion. Unbounded operations are latent outages.

## Reliability Categories

1. **Bounded iteration**: every loop, retry and pagination terminates after a known maximum. Violation: `while (true)` retry on a fetch. Fix: a fixed `MAX_RETRIES` with backoff and an explicit failure after the last attempt.
2. **Assertion density**: assert preconditions and invariants in production code, not just tests. Violation: a payment function that silently assumes non-empty items, a payment method and a positive total.
3. **Allocation discipline**: minimize allocation in hot paths; prefer pre-sized collections, pools or arenas. Violation: a buffer allocated on each loop iteration. Fix: allocate once outside the loop and pre-size the result.
4. **Indirection limits**: no pointer-to-pointer, `Box<Box<T>>` or triple-nested references. Flatten them.
5. **Metaprogramming restraint**: simple constructs only; no reflection-heavy magic, multi-level macros or recursive generics (`DeepPartial<DeepPartial<T>>`). Use bounded, explicit types.

## Extended References

| Reference | Content |
|-----------|---------|
| `references/sources.md` | Full bibliography |
| `references/patterns.md` | Correct patterns |
| `references/violations.md` | Violation examples |
| `references/detection.md` | Grep patterns for automated scanning |

## Severity Guidelines

| Level | Criteria | Examples |
|-------|----------|----------|
| **CRITICAL** | Unbounded operation on external I/O | Infinite retry on network call, allocation in tight loop processing unbounded input |
| **HIGH** | Implicit-only bounds, zero assertions in critical path | Retry with no max, validation function with no precondition checks |
| **MEDIUM** | Missing bound on bounded data, low assertion density | Pagination without page limit on known-finite dataset, sparse assertions |
| **LOW** | Style-level reliability improvement | Unnecessary indirection, overly complex generic type |

Files in this skill

  • SKILL.md4.5 KB
  • references/detection.md2.4 KB
  • references/patterns.md3.5 KB
  • references/sources.md1.9 KB
  • references/violations.md3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.