Agent skill

Bun Redis

by secondsky in secondsky/claude-skills

A skill your agent uses when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.

MITAuto-check passedDatabases

Install Bun Redis

skills CLI
$ npx skills add secondsky/claude-skills --skill bun-redis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/claude-skills bun-redis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/bun/skills/bun-redis .claude/skills/bun-redis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bun-redis
GitHub stars
227
Token cost
~1.8k tokens
SKILL.md length
115 words
Files
1
Skills in repo
169
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.

  • Working with Redis in Bun (ioredis
  • SKILL.md covers Client Options, ioredis Setup, Basic Operations and Data Structures, plus 8 more sections
  • Calls bun; needs UPSTASH_REDIS_REST_TOKEN
  • Session storage

What it does

Bun Redis is an agent skill from secondsky/claude-skills. Use when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Event-driven systems and Caching. It works with Redis and Upstash. The repository describes itself as: Production-ready skills for Claude Code CLI - Cloudflare, React, Tailwind v4, and AI integrations. The licence is MIT.

When your agent uses it

  • Working with Redis in Bun (ioredis
  • Session storage
  • Key-value operations

Example prompts

  • “/bun-redis”

Requirements

  • A credential in UPSTASH_REDIS_REST_TOKEN

What it can do on your machine

Read from SKILL.md and the folder at commit 8837836. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • UPSTASH_REDIS_REST_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bun Redis loads about 1.8k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 115 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/claude-skills at commit 8837836, republished under its MIT licence (© secondsky). 115 words, ~1,775 tokens.

Download SKILL.mdSave it as .claude/skills/bun-redis/SKILL.md (or your agent's skills folder).
name
bun-redis
description
Use when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.
license
MIT

Bun Redis

Redis integration with Bun using popular Redis clients.

Client Options

ClientBest ForInstall
ioredisSelf-hosted Redisbun add ioredis
@upstash/redisServerless/Edgebun add @upstash/redis
redisOfficial Node clientbun add redis

ioredis Setup

typescript
import Redis from "ioredis";

// Default connection
const redis = new Redis();

// With options
const redis = new Redis({
  host: "localhost",
  port: 6379,
  password: "secret",
  db: 0,
});

// Connection string
const redis = new Redis("redis://:password@localhost:6379/0");

// TLS connection
const redis = new Redis({
  host: "redis.example.com",
  port: 6380,
  tls: {},
});

Basic Operations

typescript
import Redis from "ioredis";

const redis = new Redis();

// Strings
await redis.set("name", "Alice");
await redis.set("count", "100");
await redis.setex("temp", 60, "expires in 60s"); // With TTL

const name = await redis.get("name"); // "Alice"
const count = await redis.incr("count"); // 101
await redis.del("name");

// Check existence
const exists = await redis.exists("name"); // 0 or 1

// TTL
await redis.expire("key", 3600); // Set 1 hour TTL
const ttl = await redis.ttl("key"); // Get remaining TTL

Data Structures

Hashes
typescript
// Set hash fields
await redis.hset("user:1", {
  name: "Alice",
  email: "alice@example.com",
  age: "30",
});

// Get single field
const name = await redis.hget("user:1", "name");

// Get all fields
const user = await redis.hgetall("user:1");
// { name: "Alice", email: "...", age: "30" }

// Increment field
await redis.hincrby("user:1", "visits", 1);
Lists
typescript
// Add to list
await redis.rpush("queue", "task1", "task2");
await redis.lpush("queue", "urgent");

// Pop from list
const task = await redis.lpop("queue"); // "urgent"
const blocking = await redis.blpop("queue", 5); // Wait 5s

// Range
const items = await redis.lrange("queue", 0, -1);
Sets
typescript
// Add members
await redis.sadd("tags", "javascript", "typescript", "bun");

// Check membership
const isMember = await redis.sismember("tags", "bun"); // 1

// Get all members
const tags = await redis.smembers("tags");

// Set operations
await redis.sinter("tags1", "tags2"); // Intersection
await redis.sunion("tags1", "tags2"); // Union
Sorted Sets
typescript
// Add with scores
await redis.zadd("leaderboard", 100, "alice", 200, "bob", 150, "charlie");

// Get by rank
const top3 = await redis.zrevrange("leaderboard", 0, 2, "WITHSCORES");

// Get by score range
const highScores = await redis.zrangebyscore("leaderboard", 100, 200);

// Increment score
await redis.zincrby("leaderboard", 50, "alice");

JSON (RedisJSON)

typescript
// Requires RedisJSON module
await redis.call("JSON.SET", "user:1", "$", JSON.stringify({
  name: "Alice",
  settings: { theme: "dark" },
}));

const user = await redis.call("JSON.GET", "user:1");
const settings = await redis.call("JSON.GET", "user:1", "$.settings");

Pub/Sub

typescript
import Redis from "ioredis";

// Publisher
const pub = new Redis();

// Subscriber
const sub = new Redis();

// Subscribe to channel
sub.subscribe("notifications", (err, count) => {
  console.log(`Subscribed to ${count} channels`);
});

// Handle messages
sub.on("message", (channel, message) => {
  console.log(`${channel}: ${message}`);
});

// Publish
await pub.publish("notifications", JSON.stringify({
  type: "alert",
  message: "Hello!",
}));

// Pattern subscribe
sub.psubscribe("user:*");
sub.on("pmessage", (pattern, channel, message) => {
  console.log(`${pattern} -> ${channel}: ${message}`);
});

Transactions

typescript
// Multi/Exec
const results = await redis
  .multi()
  .set("key1", "value1")
  .set("key2", "value2")
  .incr("counter")
  .exec();

// Pipeline (no atomicity, better performance)
const pipeline = redis.pipeline();
pipeline.set("key1", "value1");
pipeline.set("key2", "value2");
pipeline.incr("counter");
const results = await pipeline.exec();

Upstash Redis (Serverless)

typescript
import { Redis } from "@upstash/redis";

const redis = new Redis({
  url: process.env.UPSTASH_REDIS_REST_URL,
  token: process.env.UPSTASH_REDIS_REST_TOKEN,
});

// Same API as ioredis
await redis.set("key", "value");
const value = await redis.get("key");

// With automatic JSON serialization
await redis.set("user", { name: "Alice", age: 30 });
const user = await redis.get<{ name: string; age: number }>("user");

Caching Patterns

Cache-Aside
typescript
async function getUser(id: string) {
  // Check cache
  const cached = await redis.get(`user:${id}`);
  if (cached) {
    return JSON.parse(cached);
  }

  // Fetch from database
  const user = await db.query.users.findFirst({
    where: eq(users.id, id),
  });

  // Cache for 1 hour
  if (user) {
    await redis.setex(`user:${id}`, 3600, JSON.stringify(user));
  }

  return user;
}
Write-Through
typescript
async function updateUser(id: string, data: UserUpdate) {
  // Update database
  await db.update(users).set(data).where(eq(users.id, id));

  // Update cache
  const user = await db.query.users.findFirst({
    where: eq(users.id, id),
  });
  await redis.setex(`user:${id}`, 3600, JSON.stringify(user));

  return user;
}
Rate Limiting
typescript
async function rateLimit(key: string, limit: number, window: number) {
  const current = await redis.incr(key);

  if (current === 1) {
    await redis.expire(key, window);
  }

  return current <= limit;
}

// Usage
const allowed = await rateLimit(`rate:${userId}`, 100, 60);
if (!allowed) {
  throw new Error("Rate limit exceeded");
}

Session Storage

typescript
import { Hono } from "hono";
import Redis from "ioredis";
import { v4 as uuid } from "uuid";

const redis = new Redis();
const app = new Hono();

app.use("*", async (c, next) => {
  const sessionId = c.req.header("X-Session-Id") || uuid();
  const session = await redis.hgetall(`session:${sessionId}`);

  c.set("session", session);
  c.set("sessionId", sessionId);

  await next();

  // Save session
  const updatedSession = c.get("session");
  if (Object.keys(updatedSession).length > 0) {
    await redis.hset(`session:${sessionId}`, updatedSession);
    await redis.expire(`session:${sessionId}`, 86400); // 24h
  }
});

Common Errors

ErrorCauseFix
ECONNREFUSEDRedis not runningStart Redis server
NOAUTHAuthentication requiredProvide password
WRONGTYPEWrong data typeCheck key type
OOMOut of memoryConfigure maxmemory

When to Load References

Load references/clustering.md when:

  • Redis Cluster setup
  • Sentinel configuration
  • High availability patterns

Load references/lua-scripts.md when:

  • Custom Lua scripts
  • Atomic operations
  • Complex transactions

© secondsky, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/bun/skills/bun-redis of secondsky/claude-skills.

Open the folder on GitHubat commit 8837836

Compare with similar skills

Bun Redis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bun Redis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bun Redis this skillsecondsky/claude-skills227—~1.8kAutomated safety check: PassMIT
Upstash Redis Kvintellectronica/agent-skills295—~2.8kAutomated safety check: WarnCC0-1.0
Redis Patternsrohitg00/awesome-claude-code-toolkit2.7k—~1.2kAutomated safety check: PassApache-2.0
Redisericrisco/rsc-harness167—~4.3kAutomated safety check: PassMIT
Redis Patternsaffaan-m/ECC275k1 repos~3kAutomated safety check: PassMIT
Azure Resource Manager Redis Dotnetmicrosoft/skills3.1k5 repos~3kAutomated safety check: PassMIT

Similar skills

  • Upstash Redis Kv

    intellectronica/agent-skills

    Read and write to Upstash Redis-compatible key-value store via REST API.

    295 GitHub stars~2.8k tokensUpdated 5 mo ago
    DatabasesAuto-check: warnings
  • Redis Patterns

    rohitg00/awesome-claude-code-toolkit

    Redis patterns including caching strategies, pub/sub, streams for event processing, Lua scripts, and data structures

    2.7k GitHub stars~1.2k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Redis

    ericrisco/rsc-harness

    A skill your agent uses when using Redis or any Redis-protocol store (Valkey, ElastiCache, Upstash, Dragonfly, Memorystore) as a cache, queue, rate limiter or distributed lock and it has to be…

    167 GitHub stars~4.3k tokensUpdated today
    DatabasesAuto-check passed
  • Redis Patterns

    affaan-m/ECC

    Redis data structure patterns, caching strategies, distributed locks, rate limiting, pub/sub, and connection management for production applications.

    275k GitHub starsUsed in 1 repo~3k tokens
    Backend & APIsAuto-check passed
  • Official

    Azure Resource Manager SDK for Redis in .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 5 repos~3k tokens
    DatabasesAuto-check passed
  • Amazon Elasticache

    aws/agent-toolkit-for-aws

    Official

    Activate when developers have latent caching needs: slow API responses, database read bottlenecks, DynamoDB throttling or cost, RDS/Aurora scaling pressure, Bedrock latency or cost, or adding a…

    2.8k GitHub stars~4.5k tokensUpdated today
    Backend & APIsAuto-check passed

More from secondsky/claude-skills

All 169 skills in this repo
  • Tanstack AI

    secondsky/claude-skills

    TanStack AI (alpha) provider-agnostic type-safe chat with streaming for OpenAI, Anthropic, Gemini, Ollama.

    227 GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check: notes
  • Auto Animate

    secondsky/claude-skills

    AutoAnimate (@formkit/auto-animate) zero-config animations for React.

    227 GitHub stars~2.9k tokensUpdated 10 days ago
    Auto-check passed
  • Base UI React

    secondsky/claude-skills

    MUI Base UI unstyled React components with Floating UI. An agent skill from secondsky/claude-skills.

    227 GitHub stars~1.9k tokensUpdated 10 days ago
    Auto-check passed
  • Cloudflare Images

    secondsky/claude-skills

    This skill should be used when the user asks to "upload images to Cloudflare", "implement direct creator upload", "configure image transformations", "optimize WebP/AVIF", "create image variants"…

    227 GitHub stars~3.6k tokensUpdated 10 days ago
    Auto-check: notes
  • Cloudflare Nextjs

    secondsky/claude-skills

    Deploy Next.js to Cloudflare Workers via the OpenNext adapter (@opennextjs/cloudflare).

    227 GitHub stars~5.3k tokensUpdated 10 days ago
    Auto-check: notes
  • Cloudflare Sandbox

    secondsky/claude-skills

    Cloudflare Sandboxes SDK for secure code execution in Linux containers at edge.

    227 GitHub stars~4.5k tokensUpdated 10 days ago
    Auto-check passed

Works with

Questions about Bun Redis

What does Bun Redis do?

A skill your agent uses when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations. Bun Redis is an agent skill from secondsky/claude-skills. Use when working with Redis in Bun (ioredis, Upstash), caching, pub/sub, session storage, or key-value operations.

When should I use Bun Redis?

Bun Redis fits situations like: working with Redis in Bun (ioredis; session storage; key-value operations.

How do I install Bun Redis in Claude Code?

Run `npx skills add secondsky/claude-skills --skill bun-redis -a claude-code`. Or copy the skill folder (plugins/bun/skills/bun-redis in secondsky/claude-skills) into .claude/skills/bun-redis in your project. Claude Code loads it when a task matches its description.

How do I install Bun Redis in Codex?

Run `npx skills add secondsky/claude-skills --skill bun-redis -a codex`. Or copy the skill folder (plugins/bun/skills/bun-redis in secondsky/claude-skills) into .agents/skills/bun-redis in your project. Codex loads it when a task matches its description.

Can I use Bun Redis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/claude-skills --skill bun-redis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bun-redis, .gemini/skills/bun-redis, .github/skills/bun-redis and .opencode/skills/bun-redis in your project.

What does Bun Redis need to run?

Going by SKILL.md and its folder, Bun Redis needs the command-line tools its instructions call (bun) and credentials named UPSTASH_REDIS_REST_TOKEN. Our summary lists: A credential in UPSTASH_REDIS_REST_TOKEN.

Does Bun Redis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Bun Redis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bun Redis use?

Bun Redis is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bun Redis use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bun Redis?

Skills that share tags, products or a category with Bun Redis: Upstash Redis Kv (intellectronica/agent-skills, 295 stars), Redis Patterns (rohitg00/awesome-claude-code-toolkit, 2.7k stars), Redis (ericrisco/rsc-harness, 167 stars) and Redis Patterns (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bun Redis?

secondsky (a GitHub user) maintains it in secondsky/claude-skills, which has 227 GitHub stars. The repository holds 169 skills in this directory. The repository was last updated on September 28, 2026.

Source: secondsky/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.