litestream

litestream is a skill for Codex from benbjohnson/litestream-skills. It costs 59 tokens per session (1,393 once invoked), scanned B, original, Apache-2.0.

A skill for protecting SQLite databases by continuously copying their changes to cloud or remote storage. SQLite is a database stored in a single file, and Litestream is the tool used for this copying and recovery.

In plain words
What is it for?
Use it to configure Litestream, replicate SQLite changes to S3, Google Cloud Storage, Azure, SFTP, NATS, or files, troubleshoot replication, and restore earlier database states.
Why use it?
It reduces the risk of losing database data and supports recovery when the original file is damaged or unavailable.

Skill for Codex

Written for Codex: installed under .codex/.

Good fit Use it to configure Litestream, replicate SQLite changes to S3, Google Cloud Storage, Azure, SFTP, NATS, or files, troubleshoot replication, and restore earlier database states.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/benbjohnson/litestream-skills/litestream
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add benbjohnson/litestream-skills --skill litestream
Clone the repo
git clone --depth 1 https://github.com/benbjohnson/litestream-skills

Made for: Codex.

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 litestream

README.md
[![agentmods](https://agentmods.dev/badge/skills/benbjohnson/litestream-skills/litestream/github.svg)](https://agentmods.dev/skills/benbjohnson/litestream-skills/litestream)
Your own site
<a href="https://agentmods.dev/skills/benbjohnson/litestream-skills/litestream"><img src="https://agentmods.dev/badge/skills/benbjohnson/litestream-skills/litestream/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for litestream

Your own site · 80×15
<a href="https://agentmods.dev/skills/benbjohnson/litestream-skills/litestream"><img src="https://agentmods.dev/badge/skills/benbjohnson/litestream-skills/litestream.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,393 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00059 $0.01393
Opus 5 $0.00030 $0.00696
Sonnet 5 $0.00012 $0.00279
Haiku 4.5 $0.00006 $0.00139

Measured 9d ago against content hash 4d67db56147b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

litestream scanned grade B with 2 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 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/check-replication.sh, scripts/diagnose-issues.sh, scripts/validate-config.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo dpkg -i litestream-v0.5.5-linux-amd64.deb

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

wget https://github.com/benbjohnson/litestream/releases/download/v0.5.5/litestream-v0.5.5-linux-amd64.deb
.codex/skills/litestream/SKILL.md · 155 lines

How it starts

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

Litestream

Litestream is a disaster recovery tool for SQLite that runs as a background process, continuously replicating database changes to cloud storage. It monitors the SQLite Write-Ahead Log (WAL), converts changes to immutable LTX files, and uploads them to your chosen storage backend.

Key Concepts

  • WAL Monitoring: Watches SQLite Write-Ahead Log for changes at configurable intervals (default 1s)
  • LTX Files: Immutable files containing database page changes, never modified after creation
  • Level-Based Compaction: Multi-level system (L0-L9) that merges LTX files to reduce storage overhead
  • Point-in-Time Recovery: Restore to any transaction using TXID or timestamp
  • VFS Support: Read replicas directly from cloud storage without local database copy
  • MCP Server: AI tool integration for automated database management

Quick Start

Installation

# macOS
brew install litestream

# Linux (Debian/Ubuntu)
wget https://github.com/benbjohnson/litestream/releases/download/v0.5.5/litestream-v0.5.5-linux-amd64.deb
sudo dpkg -i litestream-v0.5.5-linux-amd64.deb

# Docker
docker pull litestream/litestream:0.5

Basic Replication

# Command line (single database)
litestream replicate /path/to/db.sqlite s3://bucket/db

# With config file
litestream replicate -config /etc/litestream.yml

Restore Database

# Restore latest backup
litestream restore -o /path/to/restored.db s3://bucket/db

# Point-in-time recovery
litestream restore -timestamp 2024-01-15T10:30:00Z -o /tmp/db s3://bucket/db

# Restore to specific transaction
litestream restore -txid 1000 -o /tmp/db s3://bucket/db

Check Status

# View all databases and their replication status
litestream status

# List available LTX files
litestream ltx /path/to/db.sqlite

Critical Rules

These rules are essential for correct Litestream operation:

  1. Lock Page at 1GB: SQLite reserves the page at offset 0x40000000 (1GB). This page must always be skipped during replication and compaction. The page number varies by page size:
    • 4KB pages: page 262145
    • 8KB pages: page 131073
    • 16KB pages: page 65537

Read the full file on GitHub · 155 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. 9d ago First seen · 155 lines · 59 tokens per session scan B 4d67db56147b

Subscribe to this mod's changes

litestream is a skill published in the GitHub repository benbjohnson/litestream-skills (5 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 59 tokens to every session and 1,393 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

google-cloud-storage-fuse

Mounts Cloud Storage buckets as a POSIX file system with Cloud Storage FUSE (gcsfuse). Use when interacting with gcsfuse: decide whether FUSE, native gs:// reads, or Filestore/Managed Lustre fits a workload, deploy tuned mounts on GKE, Compute Engine, or Cloud Run, enable and size file, stat, and list caches, tune…

google/skills · 214 tokens

cloud-databases-onboarding

Guides users through discovering their database requirements, recommends a Google Cloud database based on a recommendation matrix, and assists in database creation. Use when a user asks 'What database service should I use?', 'Help me pick a database', or when a user wants to create a new database on Google Cloud.…

google/skills · 83 tokens

cloud-sql-basics

This file generates or explains Cloud SQL resources. Use this file when the user asks to create a Cloud SQL instance or database for MySQL, PostgreSQL, or SQL Server. Cloud SQL manages third-party MySQL, PostgreSQL, and SQL Server instances as resources in Cloud SQL. For example, when Cloud SQL creates an open-source…

google/skills · 108 tokens

azure-resource-manager-mysql-dotnet

Azure MySQL Flexible Server SDK for .NET. Database management for MySQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "MySQL", "MySqlFlexibleServer", "MySQL Flexible Server", "Azure Database for MySQL", "MySQL database…

microsoft/skills · 87 tokens

azure-mgmt-mongodbatlas-dotnet

Manage MongoDB Atlas Organizations as Azure ARM resources using Azure.ResourceManager.MongoDBAtlas SDK. Use when creating, updating, listing, or deleting MongoDB Atlas organizations through Azure Marketplace integration. This SDK manages the Azure-side organization resource, not Atlas clusters/databases directly.

microsoft/skills · 64 tokens

azure-resource-manager-redis-dotnet

Azure Resource Manager SDK for Redis in .NET. Use for MANAGEMENT PLANE operations: creating/managing Azure Cache for Redis instances, firewall rules, access keys, patch schedules, linked servers (geo-replication), and private endpoints via Azure Resource Manager. NOT for data plane operations (get/set keys, pub/sub) …

microsoft/skills · 114 tokens