turso: Skill for Claude Code

.claude/skills/async-io-model/SKILL.md

async-io-model is a skill for Claude Code from tursodatabase/turso. It costs 48 tokens per session (1,395 once invoked), scanned A, original, MIT.

A guide to the asynchronous input/output patterns used in tursodb, a database project. It describes explicit states and completion objects for operations that may need to pause while waiting for input or output.

In plain words
What is it for?
Use it when adding or changing core input/output code, waiting for one or more operations, or handling completion errors.
Why use it?
It helps developers handle database operations that are not finished immediately without using the project’s unsupported patterns.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is tursodatabase/turso's own configuration. It tells Claude Code how to work on turso itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything turso configures →

not rated 24krepo +15 today A scan Socket: passSnyk: passSkillSpector: pass 48 tokens original MIT
About the project

Turso is an in-process SQL database written in Rust that is compatible with SQLite and also accepts PostgreSQL syntax through an experimental frontend. It is for applications and organizations that need an embeddable database engine with support for multiple languages, platforms, and database features. The catalogue entries are skills and instructions for working with Turso.

tursodatabase/turso · 24,201 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to tursodatabase/turso. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tursodatabase/turso/main/.claude/skills/async-io-model/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tursodatabase/turso

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for async-io-model

README.md
[![agentmods](https://agentmods.dev/badge/skills/tursodatabase/turso/async-io-model.svg)](https://agentmods.dev/skills/tursodatabase/turso/async-io-model)
Your own site
<a href="https://agentmods.dev/skills/tursodatabase/turso/async-io-model"><img src="https://agentmods.dev/badge/skills/tursodatabase/turso/async-io-model.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,395 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 15 Feb 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01395
Opus 5 $0.00024 $0.00698
Sonnet 5 $0.00010 $0.00279
Haiku 4.5 $0.00005 $0.00139

Measured 8d ago against content hash 13b6204799f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

async-io-model scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/async-io-model/SKILL.md · 211 lines

How it starts

The opening of the file, as written. The whole thing — 211 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Async I/O Model Guide

Turso uses cooperative yielding with explicit state machines instead of Rust async/await.

Core Types

pub enum IOCompletions {
    Single(Completion),
}

#[must_use]
pub enum IOResult<T> {
    Done(T),      // Operation complete, here's the result
    IO(IOCompletions),  // Need I/O, call me again after completions finish
}

Functions returning IOResult must be called repeatedly until Done.

Completion and CompletionGroup

A Completion tracks a single I/O operation:

pub struct Completion { /* ... */ }

impl Completion {
    pub fn finished(&self) -> bool;
    pub fn succeeded(&self) -> bool;
    pub fn get_error(&self) -> Option<CompletionError>;
}

To wait for multiple I/O operations, use CompletionGroup:

let mut group = CompletionGroup::new(|_| {});

// Add individual completions
group.add(&completion1);
group.add(&completion2);

// Build into single completion that finishes when all complete
let combined = group.build();
io_yield_one!(combined);

CompletionGroup features:

  • Aggregates multiple completions into one
  • Calls callback when all complete (or any errors)
  • Can nest groups (add a group's completion to another group)
  • Cancellable via group.cancel()

Helper Macros

return_if_io!

Unwraps IOResult, propagates IO variant up the call stack:

let result = return_if_io!(some_io_operation());
// Only reaches here if operation returned Done

io_yield_one!

Yields a single completion:

io_yield_one!(completion);  // Returns Ok(IOResult::IO(Single(completion)))

State Machine Pattern

Operations that may yield use explicit state enums:

enum MyOperationState {
    Start,
    WaitingForRead { page: PageRef },
    Processing { data: Vec<u8> },
    Done,
}

The function loops, matching on state and transitioning:

fn my_operation(&mut self) -> Result<IOResult<Output>> {
    loop {
        match &mut self.state {
            MyOperationState::Start => {
                let (page, completion) = start_read();
                self.state = MyOperationState::WaitingForRead { page };
                io_yield_one!(completion);
            }
            MyOperationState::WaitingForRead { page } => {
                let data = page.get_contents();
                self.state = MyOperationState::Processing { data: data.to_vec() };
                // No yield, continue loop
            }
            MyOperationState::Processing { data } => {
                let result = process(data);
                self.state = MyOperationState::Done;
                return Ok(IOResult::Done(result));
            }
            MyOperationState::Done => unreachable!(),
        }
    }
}

Read the full file on GitHub · 211 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 211 lines · 48 tokens per session scan A 13b6204799f6

Subscribe to this mod's changes

async-io-model is a skill published in the GitHub repository tursodatabase/turso (24,201 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,395 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

chdb-datastore

Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides chDB DataStore — same pandas API, ClickHouse engine underneath. Also handles reading from S3, MySQL, PostgreSQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake…

chdb-io/chdb · 168 tokens

chdb-sql

Use when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake) without setting up a server. Provides chDB — embedded ClickHouse SQL in Python with 1000+ functions, Session for…

chdb-io/chdb · 214 tokens

database-patterns

Database design and migration patterns for Alembic migrations, schema design (SQL/NoSQL), and database versioning. Use when creating migrations, designing schemas, normalizing data, managing database versions, or handling schema drift.

yonatangross/orchestkit · 49 tokens

sql-development

T-SQL, stored procedures, and MS SQL Server DBA practices. Use when writing SQL queries, designing schemas, tuning SQL Server performance, managing backups, configuring security, or using SQL Server 2025+ features.

PracticalSwan/agent-skills · 47 tokens

sql-query-optimization

Diagnoses and optimises slow SQL queries using EXPLAIN ANALYZE. Covers identifying bottlenecks (sequential scans, bad estimates, heap fetches), index strategy, query rewrites, and verification. Invoked when the user asks to optimize a query, fix a slow database query, or improve database performance.

soulcodex/agentic · 70 tokens

kg-modality-sql

Run SQL against the engine over real database wire protocols — Postgres (pgwire), MySQL, MSSQL/TDS, and the SQLite NDJSON endpoint — so psql/DBeaver/BI/ORMs connect to the engine as if it were their existing database (epistemic-graph owns the wire). Use for SELECT/joins/ aggregates/window/CTE and INSERT/UPDATE/DELETE…

Knuckles-Team/epistemic-graph · 111 tokens