redis-cache

Cache data, manage sessions, and use pub/sub messaging via the Redis server running at {{REDIS_HOST}}:{{REDIS_PORT}} in your Docker network.

54 stars

Best use case

redis-cache is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Cache data, manage sessions, and use pub/sub messaging via the Redis server running at {{REDIS_HOST}}:{{REDIS_PORT}} in your Docker network.

Teams using redis-cache should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/redis-cache/SKILL.md --create-dirs "https://raw.githubusercontent.com/bidewio/better-openclaw/main/skills/redis-cache/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/redis-cache/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How redis-cache Compares

Feature / Agentredis-cacheStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Cache data, manage sessions, and use pub/sub messaging via the Redis server running at {{REDIS_HOST}}:{{REDIS_PORT}} in your Docker network.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Redis Cache Skill

Redis is available at `{{REDIS_HOST}}:{{REDIS_PORT}}` within the Docker network.

## Caching

To cache a value, use the Redis CLI or HTTP API through the sandbox shell:

```bash
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD SET mykey "myvalue" EX 3600
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD GET mykey
```

## Pub/Sub

Publish messages to channels for real-time communication between services.

```bash
# Publish a message to a channel
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD PUBLISH openclaw:events '{"type":"task_complete","id":"abc123"}'

# Subscribe to a channel (in a separate process)
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD SUBSCRIBE openclaw:events
```

## Hash Operations

Store structured data efficiently using Redis hashes:

```bash
# Set multiple fields on a hash
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD HSET openclaw:session:user1 name "Alice" role "admin" last_seen "$(date -Iseconds)"

# Get all fields from a hash
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD HGETALL openclaw:session:user1
```

## List-Based Queues

Use Redis lists as lightweight task queues:

```bash
# Push a task onto the queue
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD LPUSH openclaw:queue:tasks '{"action":"process","file":"input.csv"}'

# Pop a task from the queue (blocking)
redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD BRPOP openclaw:queue:tasks 30
```

## Key Patterns

- Use `openclaw:cache:*` prefix for cache entries
- Use `openclaw:session:*` for session data
- Use `openclaw:queue:*` for task queues
- Use `openclaw:lock:*` for distributed locks
- Use `openclaw:rate:*` for rate-limiting counters

## Tips for AI Agents

- Always set a TTL (`EX` for seconds, `PX` for milliseconds) on cache keys to avoid memory leaks.
- Use `SETNX` or `SET ... NX` for distributed locking to prevent race conditions.
- Prefer `MGET`/`MSET` for batch operations to reduce round-trips.
- Check connectivity with `redis-cli -h {{REDIS_HOST}} -p {{REDIS_PORT}} -a $REDIS_PASSWORD PING` before running complex operations.
- Use `SCAN` instead of `KEYS` in production to avoid blocking the server.

Related Skills

valkey-cache

54
from bidewio/better-openclaw

Cache data and manage state using Valkey (Redis-compatible) at {{VALKEY_HOST}}:{{VALKEY_PORT}}.

youtube-growth

54
from bidewio/better-openclaw

Act as an expert YouTube Strategy Consultant. Apply the Creator Unlock N.I.C.E.R. Framework for conducting channel audits, niche validation, and data-backed video ideation/thumbnail generation.

xyops-automate

54
from bidewio/better-openclaw

Build and manage automation pipelines using xyOps at {{XYOPS_HOST}}:{{XYOPS_PORT}}.

xml-parse

54
from bidewio/better-openclaw

Parse and transform XML/HTML documents using command-line tools in the shared volume at {{SHARED_VOLUME}}.

woodpecker-ci

54
from bidewio/better-openclaw

Lightweight container-native CI/CD with Woodpecker

whisper-transcribe

54
from bidewio/better-openclaw

Transcribe audio and video files to text using the Whisper speech-to-text API at {{WHISPER_HOST}}:{{WHISPER_PORT}}.

web-interface-guidelines

54
from bidewio/better-openclaw

Checklist for reviewing UI code for compliance with comprehensive web interface, accessibility, performance, and content guidelines — based on Vercel's Web Interface Guidelines.

web-design-reviewer

54
from bidewio/better-openclaw

Inspect web interfaces for layout, responsive, accessibility, and visual issues, then apply targeted source code fixes and re-verify results.

weaviate-search

54
from bidewio/better-openclaw

Perform hybrid vector and keyword search using Weaviate at {{WEAVIATE_HOST}}:{{WEAVIATE_PORT}}.

watchtower-update

54
from bidewio/better-openclaw

Auto-update Docker containers using Watchtower.

vaultwarden-manage

54
from bidewio/better-openclaw

Self-hosted password management with Vaultwarden

vault-secrets

54
from bidewio/better-openclaw

Secrets management with HashiCorp Vault