redis-core

Guides Redis data structure selection and consistent colon-separated key naming conventions.

3|1|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/PALabs-v1/AI_friend --skill redis-core-palabs-v1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: redis-core
Source: https://github.com/PALabs-v1/AI_friend/tree/main/.claude/skills/redis-core
Command: npx skills add https://github.com/PALabs-v1/AI_friend --skill redis-core-palabs-v1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing the wrong Redis data type or using inconsistent key names leads to wasted memory, slow updates, and unmaintainable keyspaces. This Skill provides clear decision guidance so your Redis data model matches your actual access patterns from the start. ## Core Features & Use Cases - Data Structure Selection: Maps use cases (counters, leaderboards, queues, membership sets, sessions, vector search) to the right Redis type — String, Hash, List, Set, Sorted Set, JSON, Stream, or Vector Set. - Key Naming Conventions: Enforces lowercase, colon-separated hierarchical keys like user:1001:profile with multi-tenancy prefixing guidance. - Anti-Pattern Detection: Flags common mistakes like stuffing objects into serialized strings or using full URLs as keys, with Python (redis-py) and Java (Jedis) correction examples. - Use Case: When designing a session store or leaderboard, consult this Skill to decide between a Hash and a JSON document and to establish a clean key hierarchy before writing any code. ## Quick Start Ask the AI to help design a Redis data model for caching user profiles and a game leaderboard using proper data structures and key naming.

Frequently Asked Questions about redis-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right Redis data type for my use case?

Match the data type to your access pattern, not the data shape. Use Strings for counters, Hashes for objects with independently updated fields, Sorted Sets for leaderboards, Sets for membership checks, Lists for queues, JSON for nested data, Streams for event logs, and Vector Sets for similarity search.

Redis Hash vs JSON: which should I use for storing objects?

Use a Hash when you need atomic per-field reads and updates on a flat object. Use Redis JSON when your data is nested or hierarchical and you need path-level updates, nested arrays, or RQE indexing.

What is the best Redis key naming convention?

Use lowercase, colon-separated segments in a stable hierarchy like `user:1001:profile`. Keep keys short but readable, avoid spaces and mixed casing, never use full URLs as keys, and add tenant prefixes like `tenant:42:user:7:cart` for multi-tenant applications.

Why is storing objects as serialized strings in Redis bad?

Updating one field in a serialized string requires fetching, parsing, mutating, and rewriting the entire object, which is slow and not atomic. A Redis Hash lets you update individual fields atomically with HSET without touching other fields.

Which Redis type should I use for a leaderboard?

Use a Sorted Set for leaderboards and rankings. It stores members with scores and supports ZADD for updates, ZRANGE for ranked retrieval, and ZRANK for position lookups, all ordered by score.