c-undefined-behavior
Installation
SKILL.md
C Undefined Behavior Taxonomy & Detection
When to use
- Writing new C code that must be correct across compilers and optimization levels.
- Reviewing C code for UB that a compiler "happens" to accept.
- Diagnosing code that works on
-O0but breaks on-O2, or on GCC but not Clang. - Interpreting an UBSan report or explaining why a check disappeared from asm.
When not to use
- Implementation-defined or unspecified behavior (those are NOT UB — different rules).
- C++ — use
cpp-object-lifecycle/cpp-move-semantics. - Rust — use
rust-unsafe-reasoning.