redis-core

redis-core is a skill for Claude Code from redis/agent-skills. It costs 81 tokens per session (741 once invoked), scanned A, a copy of redis-core, MIT.

Foundational guidance for modeling data in Redis, an in-memory data store. It explains when to use strings, hashes, lists, sets, sorted sets, JSON, streams, or vector sets, and how to name keys consistently.

In plain words
What is it for?
Use it when designing or reviewing Redis data models for caches, sessions, counters, leaderboards, membership checks, nested objects, event logs, or vector data.
Why use it?
It helps you choose a Redis structure that fits how the application reads and changes data, avoiding awkward models and inconsistent keys. The guidance also covers common patterns such as counters, queues, rankings, and event logs.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin.

Part of the redis-development plugin — 8 skills shipped together

Good fit Use it when designing or reviewing Redis data models for caches, sessions…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/redis/agent-skills/redis-core
About the project

Redis Agent Skills is Redis's collection of packaged instructions and resources that teach AI coding agents how to work with Redis data structures, connections, search, caching, clustering, security, observability, and agent memory. It is for developers using coding agents to build or troubleshoot Redis-backed applications. The catalogue entries are the project's own agent skills, instructions, and plugin packaging.

redis/agent-skills · 140 stars · on GitHub · redis.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add redis/agent-skills --skill redis-core
Clone the repo
git clone --depth 1 https://github.com/redis/agent-skills

Made for: Claude Code.

Or install redis-development, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for redis-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/redis/agent-skills/redis-core.svg)](https://agentmods.dev/skills/redis/agent-skills/redis-core)
Your own site
<a href="https://agentmods.dev/skills/redis/agent-skills/redis-core"><img src="https://agentmods.dev/badge/skills/redis/agent-skills/redis-core.svg" alt="Measured on agentmods" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 741 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.00741
Opus 5 $0.00041 $0.00370
Sonnet 5 $0.00016 $0.00148
Haiku 4.5 $0.00008 $0.00074

Measured 7d ago against content hash 7ab1000e7a15, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

redis-core scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to redis-core — 19 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/redis-development/skills/redis-core/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Redis Core

Foundational guidance for modeling data in Redis. Covers data-type selection and key-name conventions — the two decisions that most directly drive memory, performance, and maintainability.

When to apply

  • Caching objects, sessions, or per-user state.
  • Counters, leaderboards, recent-items lists, unique-membership sets.
  • Reviewing or refactoring Redis key names.
  • Deciding between a Redis Hash and a JSON document for an entity.

1. Choose the right data structure

Pick the type that matches the access pattern, not just the shape of the data.

Use case Recommended type Why
Simple values, counters String Atomic INCR/DECR, SET/GET
Object with independently updated fields Hash Per-field reads/writes, no whole-object rewrite
Queue, recent-N items List O(1) push/pop at ends
Unique items, membership checks Set O(1) SADD/SISMEMBER/SCARD
Rankings, score-based ranges Sorted Set Score-ordered; ZADD/ZRANGE/ZRANK
Nested / hierarchical data JSON Path-level updates, nested arrays, RQE indexing
Event log, fan-out messaging Stream Persistent, consumer groups
Vector similarity Vector Set Native vector storage with HNSW

Common anti-pattern: stuffing a flat object into a serialized string. Updating one field means fetch + parse + mutate + rewrite. Use a Hash instead.

See references/choose-data-structure.md for full rationale and Python/Java examples.

2. Use consistent key names

Use colon-separated segments with a stable hierarchy:

{entity}:{id}:{attribute}
user:1001:profile
user:1001:settings
order:2024:items
session:abc123
article:987:likes
game:space-invaders:leaderboard

Rules of thumb:

  • Lowercase, colon-separated. No spaces, no mixed casing (User_1001_Profile is bad).
  • Keep keys short but readable — keys live in memory and appear in every command.
  • Don't use full URLs or long strings as keys. Extract a short identifier, or use a hash digest of the URL.
  • Prefix for multi-tenancy (tenant:42:user:7:cart) so scans and ACLs can target a tenant cleanly.
  • Be consistent. Pick one convention per service and apply it across all keys.

Read the full file on GitHub · 68 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 68 lines · 81 tokens per session scan A 7ab1000e7a15

Subscribe to this mod's changes

redis-core is a skill published in the GitHub repository redis/agent-skills (140 stars, last pushed 5d ago), licensed MIT. It adds 81 tokens to every session and 741 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to redis-core, differing in 19 lines, and is treated as a copy.