All skills
redis avatar

/redis-core

@a2c48c0 official
by redisredis/agent-skills163 stars
30

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.

Use this Skill: https://skilld.dev/gh/redis/agent-skills/redis-core

This session only. Nothing lands on disk.

referenceskey-naming.md

≈379 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Use Consistent Key Naming Conventions

Well-structured key names improve code maintainability, debugging, and enable efficient key scanning.

Correct: Use colons as separators with a consistent hierarchy.

# Pattern: service:entity:id:attribute
user:1001:profile
user:1001:settings
order:2024:items
cache:api:users:list
session:abc123

Python (redis-py):

# Good: Short, meaningful key
redis.set("product:8361", cached_html)
page = redis.get("product:8361")

Java (Jedis):

// Good: Short, meaningful key derived from URL
jedis.set("product:8361", "<some cached HTML>");
String page = jedis.get("product:8361");

Incorrect: Inconsistent naming, spaces, or very long keys.

# These cause confusion and waste memory
User_1001_Profile
my key with spaces
com.mycompany.myapp.production.users.profile.data.1001

Java (Jedis):

// Bad: Using full URL as key wastes memory and slows comparisons
jedis.set("http://www.verylongurlkey.com/store/products/product.html?id=8361",
          "<some cached HTML>");

Key naming tips:

  • Keep keys short but readable—they consume memory
  • Consider key prefixes for multi-tenant applications
  • Extract short identifiers from URLs or long strings rather than using the whole thing
  • For large binary values, consider using a hash digest as the key instead of the value itself
  • Use consistent separators (colons are conventional)

Reference: Redis Keys

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides architectural best practices and code examples for Redis data modeling. No security risks were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at a2c48c0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 4 months ago
metadata
{
  "author": "Redis, Inc.",
  "version": "0.1.0"
}
  • redis
  • data-structures
  • caching
  • key-naming
  • hash
  • sorted-set
  • stream
  • schema-design

README badge

README badge for redis/agent-skills/redis-core

Provides foundational guidance on Redis data-structure selection (String, Hash, List, Set, Sorted Set, JSON, Stream, Vector Set) and colon-separated key-naming conventions. Use when designing a Redis data model, caching objects, building counters or leaderboards, or refactoring key names for consistency and memory efficiency.

Generated from the current SKILL.md.

Does this skill cover all Redis data types?
Yes. It covers String, Hash, List, Set, Sorted Set, JSON, Stream, and Vector Set — the full set of core Redis types with guidance on when to use each based on access patterns.
Can I use this skill to refactor existing Redis keys?
Yes. The skill includes key-naming conventions and cleanup examples to help review and standardize existing key schemes across a service.
Does this skill provide code examples?
The SKILL.md includes Python and Java examples in bundled reference files for each data type choice and access pattern.
Should I use a Hash or JSON for storing an object in Redis?
The skill provides a decision framework: use a Hash for independently updated fields; use JSON for nested or hierarchical data that benefits from path-level updates and RQE indexing.
Is this skill specific to a Redis client library?
No. The skill covers Redis data modeling and naming conventions independent of client library — applicable to any Redis setup or language.

Generated from the current SKILL.md. These answers refresh after source changes.