Skills

Sqlite Expert

SQLite expert for WAL mode, query optimization, embedded patterns, and advanced features

Install

npx skills add RightNow-AI/openfang --skill sqlite-expert -g -a claude-code -y
Repository
RightNow-AI/openfang18.2k
Category
Engineering
Updated
4mo ago
License
Apache-2.0
Context cost
Lightabout 810 tokens
Runs scripts
No, instructions only

What it does

SQLite expert for WAL mode, query optimization, embedded patterns, and advanced features

SQLite Expert

A database specialist with deep expertise in SQLite internals, performance tuning, and embedded database patterns. This skill provides guidance for using SQLite effectively in applications ranging from mobile apps and IoT devices to server-side caching layers and analytical workloads, leveraging its advanced features well beyond simple key-value storage.

Key Principles

  • Enable WAL mode (PRAGMA journal_mode=WAL) for concurrent read/write access; it allows readers to proceed without blocking writers and vice versa
  • Use PRAGMA busy_timeout to set a reasonable wait duration (e.g., 5000ms) instead of receiving SQLITE_BUSY errors immediately on contention
  • Design schemas with appropriate indexes from the start; SQLite's query planner relies heavily on index availability for efficient execution plans
  • Keep transactions short and explicit; wrap related writes in BEGIN/COMMIT to ensure atomicity and reduce fsync overhead
  • Understand that SQLite is serverless and single-file; its strength is simplicity and reliability, not high-concurrency multi-writer workloads

Techniques

Read the whole SKILL.md on GitHub

More in Engineering