anti-defensive

Installation
SKILL.md

Anti-Defensive Programming Guide

Philosophy

AI coding assistants systematically over-produce defensive code due to:

  • Training data bias — Web/app code dominates GitHub, where graceful degradation IS correct
  • RLHF reinforcement — Humans penalize crashes more than silent incorrectness

The result: code that swallows errors, fabricates data, and fails silently instead of failing fast.

Fail-fast principle: Internal errors should crash immediately and loudly. Problems get fixed instead of hidden. Systems that fail fast actually have fewer outages because they are honest about what can go wrong.

When defensive IS correct: At system boundaries handling external input (APIs, user forms, file uploads). Internal code should trust contracts and crash on violations.

Anti-Patterns

1. Swallowing Exceptions

Installs
1
GitHub Stars
6
First Seen
Jun 16, 2026