Skip to content
Back to skills

Turso

ASecurity

> SQLite for the edge — libSQL database with embedded replicas and global distribution.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 26, 2026
databasestypescriptshellbashsqldatabase

Works with

  • cli

Security analysis

A100/100

Scanned October 26, 2026

npx -y skills add nhan03bit/ultrathink --skill turso --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Turso?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Turso
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nhan03bit-turso/badge)](https://www.skillsdirectory.com/skills/nhan03bit-turso)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Turso

> SQLite for the edge — libSQL database with embedded replicas and global distribution.

## When to Use
- Edge-first databases (Cloudflare Workers, Vercel Edge, Fly.io)
- Embedded replicas for zero-latency reads
- SQLite compatibility with server-side sync
- Multi-tenant databases (database-per-tenant pattern)

## Core Patterns

### Client Setup
```typescript
import { createClient } from "@libsql/client";

const turso = createClient({
  url: process.env.TURSO_DATABASE_URL!,
  authToken: process.env.TURSO_AUTH_TOKEN!,
});

// With embedded replica (reads from local SQLite file, writes to remote)
const turso = createClient({
  url: process.env.TURSO_DATABASE_URL!,
  authToken: process.env.TURSO_AUTH_TOKEN!,
  syncUrl: process.env.TURSO_DATABASE_URL!,  // remote for sync
  syncInterval: 60,  // sync every 60 seconds
});
```

### Queries
```typescript
// Read
const result = await turso.execute("SELECT * FROM users WHERE id = ?", [userId]);
const user = result.rows[0];

// Write
await turso.execute("INSERT INTO users (name, email) VALUES (?, ?)", [name, email]);

// Batch (atomic transaction)
await turso.batch([
  { sql: "INSERT INTO orders (user_id, total) VALUES (?, ?)", args: [userId, total] },
  { sql: "UPDATE users SET order_count = order_count + 1 WHERE id = ?", args: [userId] },
], "write");

// Interactive transaction
const tx = await turso.transaction("write");
try {
  await tx.execute("UPDATE accounts SET balance = balance - ? WHERE id = ?", [amount, from]);
  await tx.execute("UPDATE accounts SET balance = balance + ? WHERE id = ?", [amount, to]);
  await tx.commit();
} catch { await tx.rollback(); }
```

### Key Features
- **Embedded replicas**: Local SQLite file synced from remote — sub-ms reads
- **Database branching**: `turso db create --from-db production` for staging
- **Multi-database**: `turso db create tenant-123` for per-tenant isolation
- **Drizzle integration**: `drizzle(turso)` with full ORM support
- **Extensions**: JSON, FTS5 (full-text search), vector search via `libsql-vector`

### CLI
```bash
turso db create mydb          # Create database
turso db shell mydb           # Interactive SQL shell
turso db tokens create mydb   # Generate auth token
turso db replicate mydb lhr   # Add replica in London
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.