This repository contains Redis performance optimization rules optimized for AI agents and LLMs.
# From repository root
npm install
# Validate existing rules
npm run validate
# Build AGENTS.md
npm run build-
Choose a section prefix based on the category:
data-Data Structures & Keys (HIGH)ram-Memory & Expiration (HIGH)conn-Connection & Performance (HIGH)json-JSON Documents (MEDIUM)rqe-Redis Query Engine (HIGH)vector-Vector Search & RedisVL (HIGH)semantic-cache-Semantic Caching (MEDIUM)stream-Streams & Pub/Sub (MEDIUM)cluster-Clustering & Replication (MEDIUM)security-Security (HIGH)observe-Observability (MEDIUM)
-
Copy the template:
cp rules/_template.md rules/data-your-rule-name.md
-
Fill in the content following the template structure
-
Validate and build:
npm run validate npm run build
-
Review the generated
AGENTS.md
redis-best-practices/
├── SKILL.md # Agent-facing skill manifest
├── AGENTS.md # [GENERATED] Compiled rules document
├── README.md # This file
├── metadata.json # Version and metadata
├── package.json # Build scripts
├── scripts/
│ ├── build.js # Compiles rules into AGENTS.md
│ └── validate.js # Validates rule frontmatter
└── rules/
├── _template.md # Rule template
├── _sections.md # Section definitions
├── _contributing.md # Writing guidelines
└── *.md # Individual rules
See rules/_template.md for the complete template. Key elements:
---
title: Clear, Action-Oriented Title
impact: HIGH|MEDIUM|LOW
impactDescription: Quantified benefit (e.g., "10x faster")
tags: relevant, keywords
---
## [Title]
[1-2 sentence explanation]
**Avoid:**
```python
# Comment explaining what's wrong
[Bad example]
```
**Recommended:**
```python
# Comment explaining why this is better
[Good example]
```See rules/_contributing.md for detailed guidelines. Key principles:
- Show concrete transformations - "Change X to Y", not abstract advice
- Problem-first structure - Show the problematic pattern before the solution
- Quantify impact - Include specific metrics (10x faster, 50% less memory)
- Self-contained examples - Complete, runnable code
- Semantic naming - Use meaningful names (user:1001, cache:api), not (key1, mykey)