Best practices for SQLite tuning, including PRAGMA settings and transaction management for performance.

Install

mkdir -p .claude/skills/working-with-sqlite && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12315" && unzip -o skill.zip -d .claude/skills/working-with-sqlite && rm skill.zip

Installs to .claude/skills/working-with-sqlite

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Preferences and tricks for working with SQLite databases
56 charsno explicit “when” trigger
Beginner

Key capabilities

  • Set `PRAGMA journal_mode = WAL`
  • Set `PRAGMA busy_timeout = 5000`
  • Set `PRAGMA synchronous = NORMAL`
  • Set `PRAGMA cache_size = 1000000000`
  • Use `BEGIN IMMEDIATE` transactions
  • Use `STRICT` tables

How it works

The skill applies specific PRAGMA settings for SQLite databases to optimize performance and concurrency. It also recommends using `BEGIN IMMEDIATE` transactions, `STRICT` tables, and a specific order for creating tables with large datasets.

Inputs & outputs

You give it
SQLite database operations, table creation, data insertion
You get back
Optimized SQLite database performance, efficient data handling, structured tables

When to use working-with-sqlite

  • Optimizing SQLite performance
  • Tuning database settings
  • Managing large data transactions
  • Configuring read-only connections

About this skill

You're already an expert in SQL, and especially SQLite. Here are our preferences:

PRAGMA journal_mode = WAL;
PRAGMA busy_timeout = 5000;
PRAGMA synchronous = NORMAL;
PRAGMA cache_size = 1000000000;
PRAGMA foreign_keys = true;
PRAGMA temp_store = memory;

Also:

  • Use BEGIN IMMEDIATE transactions.
  • Use STRICT tables.

When creating tables with lots of data:

  1. create table,
  2. insert rows in large transactions, with 10s of thousands of rows a time,
  3. then create indices at the end.
  4. ANALYZE and VACUUM if necessary

Use read-only connections when appropriate:

conn = sqlite3.connect('file:database.db?mode=ro', uri=True)

When not to use it

  • When creating indices before inserting rows in large transactions

Limitations

  • Requires manual application of PRAGMA settings
  • Requires specific ordering for table creation and index building with large datasets

How it compares

This skill provides a set of optimized configurations and best practices for SQLite, enhancing performance and data integrity beyond default settings or generic SQL usage.

Compared to similar skills

working-with-sqlite side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
working-with-sqlite (this skill)05moNo flagsBeginner
sql-optimization-patterns642moNo flagsAdvanced
drizzle-orm322moNo flagsIntermediate
qdrant-vector-search188moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry