
Bun Sqlite
This gives Claude direct access to Bun's built-in SQLite driver through bun:sqlite. You get prepared statements, transactions, named and positional parameters, and all the standard query methods (get, all, iterate, values). It covers the full API including WAL mode setup, serialization for backups, type mappings between SQLite and JavaScript, and transaction modes (deferred, immediate, exclusive). The repository pattern example is solid if you're building something beyond quick scripts. Honestly, if you're using Bun and need SQLite, this is just the official API documented cleanly. No ORM overhead, just fast native bindings with proper transaction support.
- skills.sh installs
- 442
- GitHub stars
- 248
- last updated
- Aug 21, 2026
Install
$ npx -y skills add secondsky/claude-skills --skill bun-sqlite --agent claude-codeInstalls into .claude/skills of the current project.
Files
Bun SQLite
Bun has a built-in, high-performance SQLite driver via bun:sqlite.
Quick Start
import { Database } from "bun:sqlite";
// Create/open database
const db = new Database("mydb.sqlite");
// Create table
db.run(`
CREATE TABLE IF NOT EXISTS users (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT UNIQUE
)
`);
// Insert data
db.run("INSERT INTO users (name, email) VALUES (?, ?)", ["Alice", "alice@example.com"]);
// Query data
const users = db.query("SELECT * FROM users").all();
console.log(users);
// Close
db.close();
Opening Databases
import { Database } from "bun:sqlite";
// File-based database
const db = new Database("data.sqlite");
// In-memory database
const memDb = new Database(":memory:");
// Read-only mode
const readDb = new Database("data.sqlite", { readonly: true });
// Create if not exists (default)
const createDb = new Database("new.sqlite", { create: true });
// Strict mode (recommended)
const strictDb = new Database("strict.sqlite", { strict: true });
Running Queries
Direct Execution
Sponsors
Details
- Repository
- github.com/secondsky/claude-skills
- Category
- Databases
- First seen
- Jun 3, 2026
More from secondsky/claude-skills
All 146- Websocket Implementation440
- Mobile App Debugging439
- Root Cause Tracing438
- App Store Deployment437
- Database Schema Design437
- Recommendation Engine437
- Seo Keyword Cluster Builder437
- Bun Sveltekit436
- Push Notification Setup436
- Drizzle Orm D1435
- Api Response Optimization434
- Api Pagination433
- Api Filtering Sorting432
- Defense In Depth Validation430
- Session Management427
- Ultracite426
- Nuxt Production425
- Api Gateway Configuration422
- Oauth Implementation422
- Nuxt Ui V4421
- Health Check Endpoints420
- Cloudflare D1416
- Api Changelog Versioning415
- Dependency Upgrade415