Explore and query a local SQLite database safely and efficiently. Use to inspect schema, list tables/columns/indexes, and run arbitrary SQL queries (SELECT/INSERT/UPDATE/DELETE/DDL) with clear, readable output.
SELECT, schema queries).sqlite-explorer.tsYou find a sqlite-explorer.ts script (which must be executed using Bun!) in ${SKILL_DIR}/scripts/sqlite-explorer.ts that implements this skill. It accepts command-line arguments to specify the database path, query, and mode (read-only vs write).
List tables:
bun ${SKILL_DIR}/scripts/sqlite-explorer.ts ./path/to/db.sqlite --tables
Show schema for a table:
bun ${SKILL_DIR}/scripts/sqlite-explorer.ts ./path/to/db.sqlite --schema users
Run any SQL query:
bun sqlite-explorer.ts ./path/to/db.sqlite --query "SELECT * FROM users LIMIT 10"
Run a write query (only when needed):
bun ${SKILL_DIR}/scripts/sqlite-explorer.ts ./path/to/db.sqlite --query "UPDATE users SET active=1 WHERE id=42"
Read-only mode (recommended for exploration):
bun ${SKILL_DIR}/scripts/sqlite-explorer.ts ./path/to/db.sqlite --readonly --query "SELECT COUNT(*) FROM users"
SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' ORDER BY 1;PRAGMA table_info('table_name');PRAGMA foreign_key_list('table_name');PRAGMA index_list('table_name'); + PRAGMA index_info('index_name');SELECT COUNT(*) AS count FROM table_name;