What problem does it solve? On Cloudflare D1, INSERT OR REPLACE silently deletes conflicting rows through every UNIQUE key, and because recursive_triggers is off, the BEFORE DELETE guard never fires — so a BEFORE INSERT guard whose WHEN clause omits even one unique key leaves a silent hole that can erase Merkle-chained ledger rows. ## Core Features & Use Cases - Guard completeness rule: Enumerates the mechanical requirement that a guard's WHEN EXISTS clause OR together the PRIMARY KEY, every UNIQUE column, and every UNIQUE INDEX (mirroring partial-index WHERE predicates). - Real defect walkthrough: Dissects the live events_guard_ins gap where hash and the device unique index were unguarded, and provides the corrected forward-only migration pattern. - Lint parity guidance: Covers rebuilding the FORBIDDEN_REPLACE source regex from the shared SCHEMA/Q/DELIM fragments so it matches the migration scanner, plus a six-step checklist for any new guarded table or unique key. - Use Case: When adding a UNIQUE index to the events table, use this Skill to extend the guard trigger, add the table to GUARDED_TABLES, and write per-key RAISE(ABORT) tests shipped as a new forward-only migration. ## Quick Start Ask the AI to review the WHEN clause of events_guard_ins against every unique constraint declared in 0001_ledger_core.sql and draft the corrective forward-only migration.