What problem does it solve? Embedded SQLite failures are subtle: stale WAL snapshots cause SQLITE_BUSY_SNAPSHOT, file copies miss committed data, and in-transaction PRAGMA changes silently do nothing. This Skill gives an AI agent the operational rules and workflows to diagnose locking, configure durability, back up live databases, and run atomic schema migrations without corrupting data. ## Core Features & Use Cases - Concurrency and transaction recovery: Diagnose BUSY/LOCKED errors by extended error code and transaction phase, apply stale-snapshot retry protocols, and choose between atomic single-statement updates and BEGIN IMMEDIATE. - WAL, backup, and restore: Configure journal modes and synchronous durability, read checkpoint progress correctly, and create consistent live backups through the Online Backup API instead of file copies. - Types, constraints, and migrations: Handle affinity vs STRICT tables, NULL policy in CHECK/UNIQUE/FK constraints, native ALTER by runtime version, and atomic table rebuilds that preserve AUTOINCREMENT history, triggers, and views. - Query tuning: Interpret EXPLAIN QUERY PLAN, shape composite/partial/expression indexes, and refresh planner statistics with measured before/after evidence. - Use Case: A service intermittently returns "database is locked" after a competing write commits. The Skill guides the agent to identify the stale WAL snapshot, restart the whole transaction, re-read state, and reject the request correctly while preserving the competing commit exactly once. ## Quick Start Ask the agent to diagnose why your SQLite application throws database-is-locked errors under concurrent writers and fix the transaction retry logic.