OpenParable
Skip to content
← Back to skills

Redis

Development
redis

Redis is an Agent Skill for development published in the a5c-ai/babysitter repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Redis caching patterns, pub/sub, sessions, rate limiting, and data structures.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/a5c-ai/babysitter/blob/HEAD/library/specializations/web-development/skills/redis/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/redis, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Redis Skill

Expert assistance for Redis caching and data management.

Capabilities

  • Implement caching strategies
  • Build pub/sub systems
  • Manage sessions
  • Implement rate limiting
  • Use Redis data structures

Caching Pattern

async function getCachedUser(id: string) {
  const cached = await redis.get(`user:${id}`);
  if (cached) return JSON.parse(cached);

  const user = await db.user.findUnique({ where: { id } });
  await redis.setex(`user:${id}`, 3600, JSON.stringify(user));
  return user;
}

Rate Limiting

async function rateLimit(ip: string, limit = 100, window = 60) {
  const key = `ratelimit:${ip}`;
  const count = await redis.incr(key);
  if (count === 1) await redis.expire(key, window);
  return count <= limit;
}

Target Processes

  • caching-implementation
  • real-time-features
  • session-management