unstorage

Provides a universal key-value storage API for multiple runtimes and drivers.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/BetaHuhn/skills --skill unstorage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unstorage
Source: https://github.com/BetaHuhn/skills/tree/main/unstorage
Command: npx skills add https://github.com/BetaHuhn/skills --skill unstorage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Unstorage provides a single, consistent key-value API across runtimes and backends so developers can persist, cache, and namespace data without coupling application logic to a specific storage engine.

Core Features & Use Cases

  • Runtime-agnostic API: Works on Node, Bun, Deno, and edge Workers with async methods and automatic JSON serialization.
  • Pluggable drivers & mounting: Swap or mount memory, filesystem, Redis, Cloudflare KV, MongoDB, HTTP, and many other drivers at namespace prefixes.
  • Utilities & tooling: Supports snapshots and restore, prefixStorage for scoped namespaces, watch events, HTTP server access, and simple custom driver creation for specialized backends.
  • Typical use cases: caching with TTL, session stores, file-backed assets, layered overlays, backups/seeding for tests, and remote access via the HTTP driver.

Quick Start

Create a storage instance, mount the desired driver, and use storage.setItem and storage.getItem to persist and retrieve values.

Frequently Asked Questions about unstorage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use a universal key-value storage API across Node, Bun, Deno, and edge Workers?

A universal key-value storage API provides a single consistent interface for runtime-agnostic data operations. You can use async methods with automatic JSON serialization to cache or persist data across Node, Bun, Deno, and edge Workers without coupling logic to a specific backend.

What's the best way to mount multiple storage drivers like Redis and filesystem at different namespaces?

Mounting multiple storage drivers at namespace prefixes allows you to combine Redis, filesystem, and Cloudflare KV backends under scoped paths. This enables layered overlays and multi-backend mounting so application logic can interact with different storage engines through a unified key-value API.

How do I create a custom driver for a specialized key-value storage backend?

Creating a custom driver involves defining lifecycle hooks for a specialized backend. The universal key-value storage API allows you to implement custom driver logic so your application can interact with proprietary or unsupported storage systems using the same async methods.

Can I cache data with TTL and manage sessions using an in-memory and persistent key-value store?

Caching data with TTL and managing sessions is supported through driver-specific options. You can configure in-memory or persistent key-value storage backends with TTL settings, base paths, and watch events to handle session stores and cache invalidation efficiently.

How do I snapshot and restore key-value storage data for backups and test seeding?

Snapshot and restore capabilities allow you to capture and reinstate key-value storage data. This is useful for creating backups, seeding test databases, or migrating state, ensuring you can easily save and load the entire contents of your storage instance across different drivers.

Does pluggable key-value storage support remote access via HTTP server?

Pluggable key-value storage supports remote access via an HTTP driver and server access. This enables remote data operations and watch events over HTTP, allowing separate applications or edge Workers to interact with the same persistent storage instance.