home / skills / ehtbanton / claudeskillsrepo / redis-config-generator

redis-config-generator skill

/redis-config-generator

This skill generates Redis configuration files and TypeScript client setup for caching and session management.

npx playbooks add skill ehtbanton/claudeskillsrepo --skill redis-config-generator

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
728 B
---
name: redis-config-generator
description: Generate Redis configuration files and connection code for caching and session management. Triggers on "create redis config", "generate redis configuration", "redis setup", "cache config".
---

# Redis Config Generator

Generate Redis configuration files and TypeScript client setup for caching.

## Output Requirements

**File Output:** `redis.conf`, `redis.ts`
**Format:** Valid Redis configuration and TypeScript
**Standards:** Redis 7.x, ioredis

## When Invoked

Immediately generate Redis configuration and client connection code.

## Example Invocations

**Prompt:** "Create Redis config for production caching"
**Output:** Complete `redis.conf` and `redis.ts` client setup.

Overview

This skill generates ready-to-deploy Redis configuration files and a TypeScript client module for caching and session management. It produces a valid redis.conf tuned for Redis 7.x and a TypeScript connection file using ioredis. The output is immediately usable for production or staging environments.

How this skill works

When triggered it creates two files: redis.conf and redis.ts. The redis.conf contains recommended settings for persistence, memory management, security, and network tuning. The redis.ts exports an ioredis client with typed connection options and helpers for common cache/session patterns.

When to use it

  • Setting up Redis for production caching or session storage
  • Bootstrapping a new service that requires a tuned Redis instance
  • Converting a development Redis setup into a secure, production-ready configuration
  • Generating TypeScript client code that follows ioredis best practices
  • Creating reproducible Redis config and connection code for infrastructure as code workflows

Best practices

  • Review and adjust maxmemory and eviction policy to match your workload and node size
  • Enable AUTH and bind/listen settings to restrict network access; keep protected-mode relevant to your deployment
  • Use AOF or RDB persistence settings based on recovery requirements and I/O capacity
  • Tune client connection pooling and retry strategies in the TypeScript module for resiliency
  • Test failover and persistence behavior in a staging environment before production rollout

Example use cases

  • Create a redis.conf with AOF enabled and volatile-lru eviction for a session store
  • Generate redis.ts that connects with TLS, AUTH, and reconnection logic for a cloud-hosted Redis instance
  • Produce a minimal production-ready redis.conf with maxmemory and appendfsync tuned for write-heavy caching
  • Spin up a local test Redis config and a corresponding TypeScript client for integration tests
  • Migrate from a default Redis config to a hardened, observability-friendly configuration with slowlog and client-output-buffer limits

FAQ

Which Redis version does the generated config target?

The config is written for Redis 7.x and uses settings compatible with that series.

Which TypeScript client library is used?

The TypeScript file uses ioredis and includes typed connection options plus common helper patterns for caching and sessions.