turso
Turso edge-hosted SQLite platform built on libSQL (open-source SQLite fork). Covers @libsql/client SDK, embedded replicas with local sync, multi-database per-tenant architecture, platform API for database provisioning, schema migrations, vector search with F32_BLOB, batch operations, interactive transactions, and encryption at rest. Use when connecting to Turso databases, configuring embedded replicas, provisioning databases via the platform API, implementing per-tenant database isolation, performing vector similarity search, or integrating libSQL with Drizzle ORM.
What this skill does
# Turso
## Overview
Turso is an edge-hosted SQLite platform built on libSQL, an open-source fork of SQLite. It provides globally distributed databases with embedded replicas for local-first reads, a platform API for programmatic database management, and native vector search. Use Turso for edge-deployed applications needing low-latency reads, per-tenant database isolation, or offline-capable embedded replicas. Avoid when you need a traditional relational database with complex joins across tenants or require PostgreSQL-specific features.
## Quick Reference
| Pattern | API / Command | Key Points |
| ----------------------- | ------------------------------------------- | -------------------------------------------------- |
| Remote client | `createClient({ url, authToken })` | Connect to Turso cloud database |
| Local file client | `createClient({ url: 'file:local.db' })` | Pure local SQLite via libSQL |
| Embedded replica | `createClient({ url, syncUrl, authToken })` | Local reads, remote sync |
| Manual sync | `client.sync()` | Pull latest changes from remote |
| Periodic sync | `syncInterval: 60` in client config | Auto-sync interval in seconds |
| Execute query | `client.execute({ sql, args })` | Positional `?` or named `$param` args |
| Batch operations | `client.batch([...statements], mode)` | Atomic multi-statement execution |
| Interactive transaction | `client.transaction('write')` | Multi-step logic with commit/rollback |
| Encryption at rest | `encryptionKey` in client config | Encrypts local database file |
| Vector insert | `vector32('[0.1, 0.2, ...]')` | Store embeddings as F32_BLOB columns |
| Vector search | `vector_distance_cos(col, vector32(...))` | Cosine similarity, ORDER BY distance ASC |
| Vector index | `libsql_vector_idx(col, 'type=diskann')` | DiskANN index for efficient nearest-neighbor |
| Create database (CLI) | `turso db create <name>` | Provision new database |
| Create database (API) | `POST /v1/organizations/{org}/databases` | Programmatic provisioning for multi-tenant |
| Generate token (CLI) | `turso db tokens create <name>` | Auth tokens with optional read-only and expiration |
| Drizzle integration | `drizzle(createClient({ url, authToken }))` | Use `drizzle-orm/libsql` driver |
| In-memory database | `createClient({ url: ':memory:' })` | Ephemeral database for testing |
## Common Mistakes
| Mistake | Correct Pattern |
| --------------------------------------------------- | ------------------------------------------------------------------------- |
| Using `syncUrl` without `authToken` | Embedded replicas require both `syncUrl` and `authToken` |
| Forgetting `client.sync()` before reads | Call `sync()` or set `syncInterval` to keep replica current |
| Using `vector_distance_cos` without a vector index | Create a `libsql_vector_idx` index for efficient similarity search |
| Hardcoding auth tokens in source code | Use environment variables for `TURSO_DATABASE_URL` and `TURSO_AUTH_TOKEN` |
| Using interactive transactions for simple batches | Use `client.batch()` for atomic multi-statement operations |
| Not closing transactions on error | Always call `transaction.close()` in a `finally` block |
| Creating one database for all tenants | Use multi-database per-tenant isolation for SaaS workloads |
| Passing raw arrays as vector values | Wrap vectors with `vector32()` SQL function or pass as `Float32Array` |
| Using `ORDER BY distance DESC` for nearest neighbor | Cosine distance: smaller is closer, use `ORDER BY distance ASC` |
## Delegation
> If the `drizzle-orm` skill is available, delegate ORM schema definition, query building, relations, and migration patterns to it.
> Otherwise, recommend: `pnpm dlx skills add oakoss/agent-skills -s drizzle-orm -a claude-code -y`
>
> If the `local-first` skill is available, delegate architecture decisions, sync engine comparisons, and conflict resolution strategies to it.
> Otherwise, recommend: `pnpm dlx skills add oakoss/agent-skills -s local-first -a claude-code -y`
>
> If the `pglite` skill is available, delegate PGlite-specific patterns for comparison with Turso embedded replicas.
- **Database provisioning**: Use `Task` agent for multi-tenant setup automation
- **Vector search tuning**: Use `Explore` agent to research embedding models and dimensions
- **Code review**: Delegate to `code-reviewer` agent
## References
- [Client SDK setup, connection modes, and configuration](references/client-sdk.md)
- [Embedded replicas, sync strategies, and offline mode](references/embedded-replicas.md)
- [Batch operations and interactive transactions](references/transactions.md)
- [Vector search, embeddings, and similarity queries](references/vector-search.md)
- [Multi-database per-tenant architecture and platform API](references/multi-tenant.md)
- [CLI commands and database management](references/cli-management.md)
- [Drizzle ORM integration with libSQL driver](references/drizzle-integration.md)
- [Schema migrations and database operations](references/schema-migrations.md)
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.