redis-expert

Optimize Redis application performance with Bun.redis caching patterns and Lua scripting.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lammesen/skills --skill redis-expert-lammesen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-expert
Source: https://github.com/lammesen/skills/tree/main/.claude/skills/redis-expert
Command: npx skills add https://github.com/lammesen/skills --skill redis-expert-lammesen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bun.

What problem does it solve?

This Skill provides deep knowledge of Redis data structures, caching strategies, Pub/Sub, Streams, and Lua scripting to build high-performance data apps with Bun's native Redis client.

Core Features & Use Cases

  • Data Structures & Operations: Strings, Hashes, Pub/Sub, Streams, JSON, etc.
  • Caching Strategies: Cache-aside, write-through, write-behind, and cache invalidation patterns.
  • Scripting & Administration: Lua scripting, script management, and admin tasks with Bun.redis.

Quick Start

Create a Redis client with Bun.redis and perform basic operations like set/get, pub/sub, and Lua scripting examples.

Frequently Asked Questions about redis-expert

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

FAQPage Schema
How do I implement caching strategies with Redis?

Redis caching strategies—cache-aside, write-through, and write-behind—optimize application performance by controlling when data flows between your app and Redis. Cache-aside loads on miss, write-through updates both layers synchronously, and write-behind buffers writes to Redis first. Choose based on consistency and latency needs.

What Redis data structures should I use for real-time messaging?

Redis Pub/Sub enables real-time message broadcasting to multiple subscribers, while Streams provide persistent, ordered message queues with consumer groups. Pub/Sub suits fire-and-forget notifications; Streams handle durable messaging, replay, and consumer tracking for reliable real-time data processing.

Can I write custom Redis logic with Lua scripting?

Lua scripting executes multi-command sequences atomically on the Redis server, eliminating race conditions in complex operations. Bun.redis supports script management, letting you define and reuse Lua scripts for atomic transactions, conditional updates, and server-side logic without round trips.

How do I handle connection and pipeline management with Bun's Redis client?

Bun.redis provides native connection pooling and pipelining to batch commands and reduce latency. Robust connection management includes error handling, reconnection strategies, and resource cleanup—essential for production apps handling high throughput and temporary network disruptions.

What's the difference between Redis Strings, Hashes, and Sets?

Strings store binary-safe values; Hashes organize field-value pairs efficiently for objects; Sets store unique, unordered values for membership checks. Choose based on data shape: Strings for scalars, Hashes for structured objects, Sets for deduplication and fast lookups.

Does Redis Stack support JSON and vector search?

Redis Stack extends core Redis with JSON data type for native document storage and RediSearch for full-text indexing. Vector Search enables semantic queries over embeddings. Bun.redis integrates these modules for advanced search, real-time analytics, and AI-driven applications.