用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/redis/redisctl --skill compare-approaches命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | compare-approaches |
| description | Prototype and compare 2-3 Redis data model alternatives for the same workload |
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 outcomes