offensive-typesafety

Installation
SKILL.md

Offensive Typesafety

When to invoke this skill:

  • When setting up or evaluating a new tech stack.
  • When designing API, URL state, or database boundaries.
  • When refactoring untyped string-based logic into strict, compiler-checked contracts.

Offensive Typesafety is the practice of using strong, compiler-enforced types to accelerate development. Instead of using types defensively (just to catch bugs before production), use them offensively to establish strict boundaries that allow you—and AI code generators—to move blazingly fast without breaking things.

Core Philosophy: Compilers over Conventions

  • Constraints over "looks right": Code should not just look plausible; it should fail at the compiler level if it is structurally or conceptually wrong.
  • Explicit over Magic: Prefer explicit, traversable data structures over string-based assumptions or untyped framework magic.
  • Fail Early: The compiler is the first line of defense. The faster it fails, the faster you can iterate.
  • AI Viability: When AI writes code, types act as a contract, a feedback loop, and a way to self-correct. If an AI generates a typo in a string route, it fails silently at runtime. If it messes up a strongly typed route, the compiler catches it instantly.

Architecture Patterns for Moving Fast

Default to tools that enforce correctness at every layer.

Related skills
Installs
31
Repository
jonmumm/skills
GitHub Stars
2
First Seen
Mar 4, 2026