libstorage

Abstract local, S3, and Supabase storage behind a unified interface.

1|1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/copilot-ld/copilot-ld --skill libstorage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: libstorage
Source: https://github.com/copilot-ld/copilot-ld/tree/main/packages/libstorage
Command: npx skills add https://github.com/copilot-ld/copilot-ld --skill libstorage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing storage across multiple backends (local filesystem, S3-compatible, and Supabase) from a single interface to simplify persistence code.

Core Features & Use Cases

  • Storage interface that abstracts read, write, list, and delete across backends.
  • Environment-driven backend selection with createStorage(prefix, type) for local, S3, or Supabase.
  • JSON/JSONL parsing support for convenient data handling across storages.
  • Use cases include building backend-agnostic apps, data pipelines, and services that switch storage providers without code changes.

Quick Start

Create a storage instance with createStorage(config) and perform a write/read cycle.

Frequently Asked Questions about libstorage

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

FAQPage Schema
How do I abstract local, S3, and Supabase storage behind a single backend interface?

To unify storage, use a factory-based createStorage(prefix, type) function that returns a unified StorageInterface for consistent read, write, list, and delete operations across local, S3, and Supabase backends.

What is the best way to switch storage providers in a backend service without changing code?

The best way to switch storage providers without code changes is using environment-driven backend selection, allowing your backend service or data pipeline to toggle between local, S3, and Supabase seamlessly.

How do I handle JSON and JSONL data parsing across different cloud storage backends?

To handle JSON and JSONL data parsing across backends, use a unified storage interface that provides built-in JSON and JSONL parsing support, ensuring consistent data handling regardless of the underlying storage provider.

Can I use Supabase and S3 interchangeably for data pipeline persistence?

Yes, you can use Supabase and S3 interchangeably for data pipeline persistence by implementing a backend-agnostic storage strategy that abstracts both providers behind a single unified interface.

Does unified storage work for local development and cloud deployment environments?

Unified storage works across local development and cloud environments by applying an environment-driven backend selection strategy, allowing seamless transitions between local filesystems and cloud providers like S3 and Supabase.

When should I use a factory-based storage abstraction instead of direct cloud SDK calls?

Use a factory-based storage abstraction instead of direct SDK calls when building backend-agnostic apps or data pipelines that require the flexibility to switch storage providers across environments without modifying persistence code.