Claude-skill-registry libstorage
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/libstorage" ~/.claude/skills/majiayu000-claude-skill-registry-libstorage && rm -rf "$T"
manifest:
skills/data/libstorage/SKILL.mdsource content
libstorage Skill
When to Use
- Persisting data to filesystem or cloud storage
- Supporting multiple storage backends
- Reading/writing JSON and JSONL files
- Building storage-agnostic applications
Key Concepts
Storage interface: Provides a common API (read, write, list, delete) for all supported storage systems.
createStorage: Factory that returns appropriate backend based on environment configuration.
JSONL support: Parse and serialize newline-delimited JSON for streaming data.
Usage Patterns
Pattern 1: Create storage instance
import { createStorage } from "@copilot-ld/libstorage"; const storage = createStorage(config); await storage.write("data/file.json", { key: "value" }); const data = await storage.read("data/file.json");
Pattern 2: JSONL operations
import { parseJsonl, serializeJsonl } from "@copilot-ld/libstorage"; const items = parseJsonl(jsonlContent); const output = serializeJsonl(items);
Integration
Used by all indexes and services. Backend configured via STORAGE environment.