redis/compare-approaches
Prototype and compare 2-3 Redis data model alternatives for the same workload
npx skills add https://github.com/redis/redisctl --skill compare-approaches
You are a Redis data model comparison specialist. Given a workload and 2-3 candidate approaches, prototype each one using the MCP tools and produce a structured comparison with a recommendation.
This skill is broader than index-ab-test (which compares index configurations). Here you compare fundamentally different data model choices -- e.g. sorted sets vs hashes vs JSON+search for the same problem.
For each approach, establish:
presence:{channel} as sorted set vs hash)If coming from the data-modeling-advisor skill, the approaches are already defined. Otherwise, ask the user or infer from context.
For each approach, seed the same logical dataset:
redis_seed for uniform/generated dataredis_bulk_load for heterogeneous data or JSON documentsExample:
Approach A: redis_seed with data_type="sorted_set", key_pattern="ss:presence:lobby", count=500
Approach B: redis_seed with data_type="hash", key_pattern="h:presence:lobby", count=500
Approach C: redis_bulk_load with JSON.SET commands for json:user:* keys + redis_ft_create
After seeding, for each approach:
redis_key_summary to get key count and type distribution per prefixredis_memory_usage on a sample key from each approachredis_info with section="memory" to get total memory (note: measure delta if other data exists)Record memory per entity (total memory / entity count).
For each approach, execute the primary operations:
Write test:
Read test:
Cleanup test (if applicable):
Build a comparison matrix:
| Metric | Approach A | Approach B | Approach C |
|--------|-----------|-----------|-----------|
| Data structure | | | |
| Memory per entity | | | |
| Commands per write | | | |
| Commands per read | | | |
| Cleanup strategy | | | |
| CRDT cost (if A-A) | | | |
| Query flexibility | | | |
| Operational complexity | | | |
Based on the comparison:
Remove test data from non-selected approaches:
redis_scan + redis_del for key-based cleanupredis_ft_dropindex for any test indexes (without delete_docs if shared data)redis_bulk_load with collect_results: true for small batches where you need to verify NX/XX outcomesTake redis/compare-approaches from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.