Claude Skill

redis

In-memory data store.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Download dhaupin-vant-models_public_vant_skills_vant-skill-redis-e1e348e.zip · 0 KB

Install

skills CLI npx skills add https://github.com/dhaupin/vant/tree/main/models/public/vant/skills/vant-skill-redis
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dhaupin-vant@llmmart
Git git clone https://github.com/dhaupin/vant.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole dhaupin/vant collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Redis

In-memory data store.


When To Use

  • Caching
  • Sessions
  • Real-time
  • Rate limiting

What To Do

1. Connect

import { createClient } from 'redis'

const client = createClient({
  url: 'redis://localhost:6379'
})
await client.connect()

2. Operations

Command What
get/set String values
hget/hset Hash values
lpush/lrange Lists
sadd/smembers Sets
publish Pub/sub

3. Patterns

// Cache
await client.set('user:1', JSON.stringify(user))
const user = JSON.parse(await client.get('user:1'))

// Session
await client.setex(`sess:${id}`, 3600, data)

// Rate limit
const count = await client.incr(`ratelimit:${key}`)

4. Use Cases

Use Benefit
Cache DB Speed
Session store Speed
Pub/Sub Real-time
Rate limit Security

Output

## Redis

| Key | Type | TTL |
|-----|------|-----|
| user:1 | string | [n]s |

### operations
- [n] total

Role: Redis Operator Input: Keys, values Output: Fast data

In-memory speed.

Files (vant)
  • SKILL.md 1.2 KB
    ---
    name: redis
    description: In-memory data store.
    license: MIT
    metadata:
      author: vant
      version: "1.0"
    ---
    
    # Redis
    
    > In-memory data store.
    
    ---
    
    ## When To Use
    
    - Caching
    - Sessions
    - Real-time
    - Rate limiting
    
    ---
    
    ## What To Do
    
    ### 1. Connect
    
    ```javascript
    import { createClient } from 'redis'
    
    const client = createClient({
      url: 'redis://localhost:6379'
    })
    await client.connect()
    ```
    
    ### 2. Operations
    
    | Command | What |
    |---------|------|
    | get/set | String values |
    | hget/hset | Hash values |
    | lpush/lrange | Lists |
    | sadd/smembers | Sets |
    | publish | Pub/sub |
    
    ### 3. Patterns
    
    ```javascript
    // Cache
    await client.set('user:1', JSON.stringify(user))
    const user = JSON.parse(await client.get('user:1'))
    
    // Session
    await client.setex(`sess:${id}`, 3600, data)
    
    // Rate limit
    const count = await client.incr(`ratelimit:${key}`)
    ```
    
    ### 4. Use Cases
    
    | Use | Benefit |
    |-----|----------|
    | Cache DB | Speed |
    | Session store | Speed |
    | Pub/Sub | Real-time |
    | Rate limit | Security |
    
    ---
    
    ## Output
    
    ```
    ## Redis
    
    | Key | Type | TTL |
    |-----|------|-----|
    | user:1 | string | [n]s |
    
    ### operations
    - [n] total
    ```
    
    ---
    
    **Role**: Redis Operator **Input**: Keys, values **Output**: Fast data
    
    > In-memory speed.

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.