Skip to content
Back to skills

Fail Loud

ASecurity

Use when writing error handling — try/catch blocks, fallback values, default parameters, retries, or any code path that handles failure

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 6, 2026
ai-agentsgit

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add yuchi-chang/no-cape --skill fail-loud --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fail Loud?

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

Security grade badge for Fail Loud
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/yuchi-chang-fail-loud/badge)](https://www.skillsdirectory.com/skills/yuchi-chang-fail-loud)

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: fail-loud
description: Use when writing error handling — try/catch blocks, fallback values, default parameters, retries, or any code path that handles failure
---

# Fail Loud

A swallowed error is a bug with a delay timer. Code that hides failure looks robust in review and detonates in production months later, far from the cause.

## Forbidden reflexes

- Empty catch blocks, or catch-log-continue when the caller can't proceed correctly anyway.
- `|| defaultValue` / `?? fallback` that masks a *failed* operation instead of handling a *legitimately absent* value.
- Catching broad exception types just to keep things running.
- Retries without a limit, or whose eventual failure is silent.
- Returning null / empty collections on internal error so downstream code limps along with wrong data.

## The rule

Every fallback is a product decision, not a defensive reflex. Before writing one, answer: **"Is the system actually correct when this branch executes?"**

- **Yes** (missing config has a documented default; an optional feature degrades) → fine. Name the decision: `DEFAULT_TIMEOUT_S = 30`, not an inline `|| 30`.
- **No** (data is now wrong, state may be corrupt, the user sees stale results) → don't catch it here. Let it propagate to a layer that can genuinely handle it, and fail with a message naming what broke and which input caused it.

## Loud vs graceful

- **Loud:** internal invariants, programmer errors, impossible states, dev/test environments. Crash early, close to the cause — that's what makes the bug findable.
- **Graceful:** validated user input, external services you don't control, network edges. Handle explicitly, log with context, and surface the degradation to the caller — don't pretend it succeeded.

## Smell test

If deleting the try/catch would make the bug *easier* to find, the try/catch is the bug.

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.

Comments

Loading comments…

Newsletter

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