rocksdb

Configure and operate RocksDB embedded key-value stores in Rust and Node.js applications.

2|Updated May 16, 2026
One-click install
npx skills add https://github.com/avbel/ai-skills --skill rocksdb-avbel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rocksdb
Source: https://github.com/avbel/ai-skills/tree/main/skills/rocksdb
Command: npx skills add https://github.com/avbel/ai-skills --skill rocksdb-avbel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Embedding RocksDB correctly requires understanding LSM-tree behavior, compaction tradeoffs, and binding-specific APIs; this Skill encodes those conventions so you avoid common production mistakes like default options, unbounded scans, and leaked iterators. ## Core Features & Use Cases - Architecture guidance: Explains the write path (WAL, memtable, SST flush, compaction) and LSM tradeoffs so tuning decisions are grounded in how the engine actually works. - Feature coverage: Column families, WriteBatch atomicity, transactions, snapshots, merge operators, prefix iterators with bloom filters, BlobDB key-value separation, and bulk ingest via SstFileWriter. - Binding specifics: Conventions for the Rust rocksdb and rust-rocksdb crates plus Node.js classic-level and @harperfast/rocksdb-js, including build requirements like clang/LLVM. - Use Case: When building a local state store for a Rust service, apply the key-modeling patterns (sorted prefixed keys), batch index updates in one WriteBatch, enable bloom filters for point lookups, and use Checkpoint for backups. ## Quick Start Ask the agent to design a RocksDB schema and open a database with tuned options for your workload, for example a write-heavy queue with universal compaction and a shared block cache.

Frequently Asked Questions about rocksdb

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

FAQPage Schema
How do I use RocksDB in Rust with the rocksdb crate?▼

Open a database with DB::open and an Options struct with create_if_missing enabled, then use WriteBatch for atomic multi-writes and db.get for point reads. Building requires clang/LLVM since the crate statically links a pinned RocksDB version.

What is the difference between the rocksdb and rust-rocksdb crates?▼

The rocksdb crate is the widely used wrapper over librocksdb-sys, while rust-rocksdb is an actively maintained fork tracking newer upstream RocksDB releases. The fork's library name is rust_rocksdb, so imports differ between the two.

Which Node.js library should I use for RocksDB?▼

Use @harperfast/rocksdb-js for a modern TypeScript API with full transaction support and prebuilt binaries. The classic-level package exposes the abstract-level API but is backed by LevelDB rather than RocksDB.

How do I handle large values in RocksDB without write amplification?▼

Enable BlobDB with enable_blob_files and tune min_blob_size so large values are stored in separate blob files. This keeps the LSM tree small and reduces compaction cost for big values.

Why does RocksDB performance degrade with default options in production?▼

Default options are conservative and wrong for most workloads, causing excessive compaction or slow reads. Tune write_buffer_size, max_background_jobs, bloom filters, block cache, and pick a compaction style matching your read/write ratio.

Can multiple processes share one RocksDB database?▼

No, only one process can open a RocksDB database read-write because a lock file enforces single ownership. Use a secondary instance or checkpoints for read-only sharing, or put a service in front for concurrent access.