Index of every page on this site: llms.txt
All skills
av avatar

/turso-db

@8f70341
by Ivan Charapanauav/skills28 stars
2
Run it yourself

Install, configure, and work with Turso DB — an in-process SQLite-compatible relational database engine written in Rust. Use when the user needs to (1) install Turso DB, (2) create or query databases with the tursodb CLI shell, (3) use Turso from JavaScript/Node.js via @tursodatabase/database, (4) work with vector search or embeddings in Turso, (5) set up full-text search with FTS indexes, (6) configure transactions including MVCC concurrent transactions, (7) enable encryption at rest, or (8) use Change Data Capture (CDC) for audit logging.

Use this Skill: https://skilld.dev/gh/av/skills/turso-db

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈140 tokens for metadata: the name and description. ≈807 when used: this file. ≈3.5k more on demand in 6 files.

Description uses 7.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈557 characters, or 7.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Turso DB

Turso is an in-process relational database engine aiming for full SQLite compatibility. Unlike client-server databases, it runs in your application's memory space with sub-microsecond read/write latencies.

Installation

# Via installer script
curl --proto '=https' --tlsv1.2 -LsSf \
  https://github.com/tursodatabase/turso/releases/latest/download/turso_cli-installer.sh | sh

# Via Homebrew
brew install turso

Quick Start

$ tursodb                        # transient in-memory database
$ tursodb mydata.db              # persistent database file
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT);
INSERT INTO users VALUES (1, 'Alice', 'alice@example.com');
SELECT * FROM users;

Core SQL

Standard SQLite-compatible SQL. See references/sql-reference.md for full statement syntax (CREATE/ALTER/DROP TABLE, INSERT, SELECT, UPDATE, DELETE, transactions).

Key differences from SQLite:

  • No multi-process/multi-threading access
  • No savepoints, triggers, or vacuum
  • Views experimental (behind --experimental-views flag)
  • UTF-8 only

JavaScript API

Install and use from Node.js:

npm i @tursodatabase/database        # native
npm i @tursodatabase/database --cpu wasm32  # WASM
import { connect } from '@tursodatabase/database';
const db = await connect('turso.db');
const row = db.prepare('SELECT 1').get();

See references/javascript-api.md for details.

Vector Search

Store embeddings and perform similarity search using built-in vector functions.

CREATE TABLE docs (id INTEGER PRIMARY KEY, content TEXT, embedding BLOB);
INSERT INTO docs VALUES (1, 'ML basics', vector32('[0.2, 0.5, 0.1]'));

SELECT content, vector_distance_cos(embedding, vector32('[0.3, 0.4, 0.2]')) AS dist
FROM docs ORDER BY dist LIMIT 5;

Supports: vector32, vector64, vector32_sparse, vector8, vector1bit. Distance functions: vector_distance_cos, vector_distance_l2, vector_distance_dot, vector_distance_jaccard.

See references/vector-search.md for all vector types, functions, and examples.

Full-Text Search (Experimental)

Tantivy-powered FTS with BM25 scoring. Requires fts feature at compile time.

CREATE INDEX fts_idx ON articles USING fts (title, body)
WITH (weights = 'title=2.0,body=1.0');

SELECT title, fts_score(title, body, 'database') as score
FROM articles
WHERE fts_match(title, body, 'database')
ORDER BY score DESC LIMIT 10;

See references/full-text-search.md for tokenizers, query syntax, and highlighting.

Advanced Features

See references/advanced-features.md for:

  • Journal modes: WAL (default) and experimental MVCC (PRAGMA journal_mode = experimental_mvcc)
  • Encryption: AES-GCM / AEGIS cipher support with --experimental-encryption flag
  • CDC: Real-time change tracking via PRAGMA unstable_capture_data_changes_conn('full')
  • Index methods: Custom data access methods (experimental, --experimental-index-method)
  • C API: SQLite C API subset with Turso extensions

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo4 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The turso-db skill provides tools to install and manage Turso database instances. It includes a standard shell-based installation method from the official Turso GitHub repository and facilitates database operations via SQL and Node.js. The primary security considerations involve the execution of external installation scripts and the potential for untrusted data stored in the database to influence the agent's actions during search or retrieval tasks.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer9mo

    6/6 files flagged

Signed by skilld at 8f70341. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 9 months ago

README badge

README badge for av/skills/turso-db