litestream — community litestream, litestream-skills, community, ide skills, Claude Code, Cursor, Windsurf

v0.5.5
GitHub

About this Skill

Ideal for Database Agents requiring automated disaster recovery and cloud replication for SQLite databases. Agent skills for AI assistants

benbjohnson benbjohnson
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The litestream skill by benbjohnson is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for Database Agents requiring automated disaster recovery and cloud replication for SQLite databases.

Core Value

Empowers agents to continuously replicate SQLite database changes to cloud storage using WAL monitoring and immutable LTX files, ensuring data durability and integrity through protocols like cloud storage backends.

Capabilities Granted for litestream

Replicating SQLite databases to cloud storage
Monitoring SQLite Write-Ahead Logs for real-time changes
Converting database page changes to immutable LTX files

! Prerequisites & Limits

  • Requires SQLite database
  • Cloud storage backend needed
  • WAL monitoring interval configuration required
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

litestream

Install litestream, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

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

bash
1# macOS 2brew install litestream 3 4# Linux (Debian/Ubuntu) 5wget https://github.com/benbjohnson/litestream/releases/download/v0.5.5/litestream-v0.5.5-linux-amd64.deb 6sudo dpkg -i litestream-v0.5.5-linux-amd64.deb 7 8# Docker 9docker pull litestream/litestream:0.5

Basic Replication

bash
1# Command line (single database) 2litestream replicate /path/to/db.sqlite s3://bucket/db 3 4# With config file 5litestream replicate -config /etc/litestream.yml

Restore Database

bash
1# Restore latest backup 2litestream restore -o /path/to/restored.db s3://bucket/db 3 4# Point-in-time recovery 5litestream restore -timestamp 2024-01-15T10:30:00Z -o /tmp/db s3://bucket/db 6 7# Restore to specific transaction 8litestream restore -txid 1000 -o /tmp/db s3://bucket/db

Check Status

bash
1# View all databases and their replication status 2litestream status 3 4# List available LTX files 5litestream 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
  2. LTX Files are Immutable: Once created, LTX files are never modified. New changes create new files.

  3. Single Replica per Database: Each database can only replicate to one destination. Use multiple Litestream instances for multiple destinations.

  4. WAL Mode Required: SQLite must be in WAL mode (PRAGMA journal_mode=WAL;)

  5. Use litestream ltx: The litestream wal command is deprecated.

Storage Backends

BackendURL SchemeExample
AWS S3s3://s3://bucket/path
S3-Compatible (R2, Tigris, MinIO)s3://s3://bucket/path?endpoint=host:port
Google Cloud Storagegs://gs://bucket/path
Azure Blob Storageabs://abs://container@account/path
SFTPsftp://sftp://user@host:22/path
NATS JetStreamnats://nats://host:4222/bucket
WebDAVwebdav://webdav://host/path
Alibaba OSSoss://oss://bucket/path
Local File(path)/var/backups/db

Configuration File Example

yaml
1dbs: 2 - path: /data/app.db 3 replica: 4 url: s3://my-bucket/app-backup 5 access-key-id: ${AWS_ACCESS_KEY_ID} 6 secret-access-key: ${AWS_SECRET_ACCESS_KEY} 7 region: us-east-1 8 sync-interval: 1s

When to Use This Skill

Use Litestream skill when:

  • Configuring SQLite database replication to cloud storage
  • Setting up disaster recovery for SQLite applications
  • Troubleshooting replication issues (WAL growth, sync failures)
  • Implementing point-in-time recovery procedures
  • Deploying Litestream with Docker, Fly.io, Kubernetes, or systemd
  • Understanding WAL-based replication concepts

Skill Contents

  • concepts/ - Architecture, replication mechanics, LTX format, SQLite WAL, VFS support, compaction
  • configuration/ - Storage backend configurations (S3, GCS, Azure, SFTP, NATS, OSS, WebDAV, File)
  • commands/ - CLI command reference (replicate, restore, status, ltx, databases)
  • operations/ - Monitoring, troubleshooting, recovery, and heartbeat monitoring
  • deployment/ - Docker, Fly.io, Kubernetes, and systemd deployment guides
  • integrations/ - MCP server integration for AI tools
  • scripts/ - Validation and diagnostic helper scripts

Common Issues

WAL Growing Too Large

  • Check sync interval (default 1s may be too slow for write-heavy workloads)
  • Verify storage backend connectivity
  • Check for checkpoint blocking (long-running transactions)

Replication Lag

  • Monitor with litestream status
  • Check network connectivity to storage backend
  • Review sync interval configuration

Restore Failures

  • Verify backup exists: litestream ltx /path/to/db
  • Check storage backend credentials
  • Ensure target directory is writable

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is litestream?

Ideal for Database Agents requiring automated disaster recovery and cloud replication for SQLite databases. Agent skills for AI assistants

How do I install litestream?

Run the command: npx killer-skills add benbjohnson/litestream-skills/litestream. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for litestream?

Key use cases include: Replicating SQLite databases to cloud storage, Monitoring SQLite Write-Ahead Logs for real-time changes, Converting database page changes to immutable LTX files.

Which IDEs are compatible with litestream?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for litestream?

Requires SQLite database. Cloud storage backend needed. WAL monitoring interval configuration required.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add benbjohnson/litestream-skills/litestream. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use litestream immediately in the current project.

Related Skills

Looking for an alternative to litestream or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI