Generated banner for Redis Core
Generated logo for Redis Core

Redis Core

RedisOfficialCreated by Redis, Inc.

  • Skill
  • Guidelines
  • Data and AI
  • MIT
  • No issues found

From the author

Core Redis modeling guidance — choose the right data structure (String, Hash, List, Set, Sorted Set, JSON, Stream, Vector Set) and use consistent colon-separated key names. Use when designing a Redis data model, caching objects, deciding between Hash and JSON, building counters, leaderboards, membership sets, or session stores, or when reviewing/cleaning up Redis key naming.
— the description by Redis, Inc.

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides essential best practices for designing Redis data models. It focuses on two critical areas: selecting the appropriate data structure based on access patterns and implementing consistent, colon-separated key naming conventions. By following these guidelines, developers can improve the maintainability of their Redis implementation and ensure efficient use of memory.

What it does

  • Provides a framework for selecting Redis data types based on specific access patterns.
  • Defines conventions for hierarchical, colon-separated key naming.
  • Offers guidance on avoiding common anti-patterns like serializing objects into strings.
  • Explains the benefits of using Hashes for object storage versus JSON documents.
  • Includes examples for implementing data structures in Python and Java.
  • Outlines strategies for multi-tenancy and key management.

When to use it

  • When designing a new Redis data model for caching or state management.
  • When deciding between different data structures like Hashes, Lists, or Sets.
  • When refactoring or cleaning up existing Redis key naming schemes.
  • When building features like counters, leaderboards, or session stores.
  • When choosing between Hash and JSON for entity storage.

Advantages

  • Promotes consistent and readable key structures across services.
  • Helps optimize memory usage by avoiding overly long or redundant keys.
  • Encourages the use of atomic operations by selecting the correct data type.
  • Reduces code complexity by avoiding manual parsing of serialized strings.
  • Supports better organization for multi-tenant applications.

Usage examples

“How should I store a user object in Redis?”
The skill recommends using a Hash to store user objects, allowing for atomic field-level updates without needing to rewrite the entire object.
“What is the best way to name my Redis keys?”
The skill suggests using a consistent, lowercase, colon-separated hierarchy, such as {entity}:{id}:{attribute}, to ensure readability and maintainability.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/redis/redis-core/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip redis-core.zip -d .agents/skills

Documentation by Redis, Inc.

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 caseRecommended typeWhy
Simple values, countersStringAtomic INCR/DECR, SET/GET
Object with independently updated fieldsHashPer-field reads/writes, no whole-object rewrite
Queue, recent-N itemsListO(1) push/pop at ends
Unique items, membership checksSetO(1) SADD/SISMEMBER/SCARD
Rankings, score-based rangesSorted SetScore-ordered; ZADD/ZRANGE/ZRANK
Nested / hierarchical dataJSONPath-level updates, nested arrays, RQE indexing
Event log, fan-out messagingStreamPersistent, consumer groups
Vector similarityVector SetNative 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.

See references/key-naming.md for cleanup examples and edge cases.

References

Files

LICENSE

MIT License

Copyright (c) 2026 Redis, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Redis, Inc.
Publisher
Redis (Official)
Source
redis/agent-skills · skills/redis-core · commit 74708da
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
redis/agent-skills

AutoGineer is not affiliated with or endorsed by Redis, Inc. or Redis.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download redis-core.zip