
Sqlite Expert
- 293 installs
- 18.1k repo stars
- Updated July 2, 2026
- rightnow-ai/openfang
sqlite-expert is a Claude Code skill that designs SQLite schemas, tunes queries and indexes, configures WAL modes, and debugs locking or corruption issues for developers building embedded, edge, and local-first applicati
About
sqlite-expert is an agent skill from rightnow-ai/openfang providing deep guidance on SQLite internals, performance tuning, and embedded database patterns beyond simple key-value usage. The skill recommends enabling WAL mode via PRAGMA journal_mode=WAL for concurrent read/write access where readers do not block writers, setting PRAGMA busy_timeout for lock contention, and applying index and query optimization for mobile apps, IoT devices, server-side caches, and analytical workloads on SQLite. Developers reach for sqlite-expert when choosing journal modes, diagnosing database locked errors, planning migrations for local-first sync, or tuning EXPLAIN QUERY PLAN output—situations where generic SQL advice misses SQLite-specific pragmas and single-file operational constraints.
- Schema normalization and constraint design
- Query plans, indexes, and PRAGMA tuning
- WAL, locking, and concurrency guidance
- Migration and backup strategies for SQLite
- Debugging corruption and performance regressions
Sqlite Expert by the numbers
- 293 all-time installs (skills.sh)
- +10 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #181 of 911 Databases skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/rightnow-ai/openfang --skill sqlite-expertAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 293 |
|---|---|
| repo stars | ★ 18.1k |
| Last updated | July 2, 2026 |
| Repository | rightnow-ai/openfang ↗ |
How do you enable WAL mode in SQLite?
Design SQLite schemas, tune queries and indexes, choose WAL modes, and debug locking or corruption issues for embedded, edge, and local-first applications.
Who is it for?
Developers shipping embedded, mobile, IoT, or local-first apps where SQLite is the primary datastore and WAL or lock tuning matters.
Skip if: Teams running PostgreSQL or MySQL at scale who need server-grade replication—not single-file embedded SQLite workloads.
When should I use this skill?
A task involves SQLite WAL mode, query optimization, index design, busy_timeout, locking errors, or corruption recovery.
What you get
Optimized schemas, WAL configurations, index plans, and resolved locking or corruption diagnostics for SQLite databases.
- Schema designs
- WAL and pragma configurations
- Optimized query and index plans
Files
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
- Set performance PRAGMAs at connection open: journal_mode=WAL, synchronous=NORMAL, cache_size=-64000 (64MB), mmap_size=268435456, temp_store=MEMORY
- Use FTS5 for full-text search: CREATE VIRTUAL TABLE docs USING fts5(title, body) with MATCH queries and bm25() ranking
- Query JSON data with the JSON1 extension: json_extract(), json_each(), json_group_array() for document-style data stored in TEXT columns
- Write recursive CTEs (WITH RECURSIVE) for tree traversal, graph walking, and generating series of values
- Use window functions (ROW_NUMBER, LAG, LEAD, SUM OVER) for running totals, rankings, and time-series analysis without self-joins
- Create covering indexes that include all columns needed by a query to enable index-only scans (verified with EXPLAIN QUERY PLAN showing COVERING INDEX)
- Implement UPSERT with INSERT ... ON CONFLICT (column) DO UPDATE SET for atomic insert-or-update operations
Common Patterns
- Multi-database Access: Use ATTACH DATABASE to query across multiple SQLite files in a single connection, joining tables from different databases
- Application-defined Functions: Register custom scalar or aggregate functions in your host language for domain-specific computations inside SQL queries
- Incremental Vacuum: Use PRAGMA auto_vacuum=INCREMENTAL with periodic PRAGMA incremental_vacuum to reclaim space without a full VACUUM lock
- Schema Migration: Use PRAGMA user_version to track schema version and apply migration scripts sequentially on application startup
Pitfalls to Avoid
- Do not open multiple connections with different PRAGMA settings; WAL mode and other PRAGMAs should be set consistently on every connection
- Do not use SQLite for high-concurrency write workloads with dozens of simultaneous writers; consider PostgreSQL or another client-server database instead
- Do not store large BLOBs (over 1MB) inline; SQLite performs better when large objects are stored as external files with paths referenced in the database
- Do not skip EXPLAIN QUERY PLAN during development; without it, slow full-table scans go unnoticed until production load reveals them
Related skills
How it compares
Pick sqlite-expert over generic SQL skills when SQLite-specific pragmas, single-file locking, or embedded deployment constraints apply.
FAQ
What WAL guidance does sqlite-expert provide?
sqlite-expert recommends PRAGMA journal_mode=WAL so readers proceed without blocking writers during concurrent access. The skill also covers busy_timeout and lock contention patterns for embedded apps.
Which workloads does sqlite-expert target?
sqlite-expert targets mobile apps, IoT devices, server-side caching layers, and analytical SQLite workloads. The skill goes beyond key-value usage with schema, index, and corruption debugging guidance.