Agent skill

Tanstack AI Memory Redis

by TanStack in TanStack/ai

A skill your agent uses when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking…

MITAuto-check passedDatabases

Install Tanstack AI Memory Redis

skills CLI
$ npx skills add TanStack/ai --skill tanstack-ai-memory-redis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TanStack/ai tanstack-ai-memory-redis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TanStack/ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/ai-memory/skills/tanstack-ai-memory-redis .claude/skills/tanstack-ai-memory-redis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
tanstack-ai-memory-redis
GitHub stars
3.2k
Used in
1 other repo
Token cost
~840 tokens
SKILL.md length
259 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking…

  • Wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis
  • SKILL.md covers Setup, Storage model, Ranking limits and Troubleshooting
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Node-redis via fromNodeRedis)

What it does

Tanstack AI Memory Redis is an agent skill from TanStack/ai. Use when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking limits, and troubleshooting.

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases. It works with Redis and TanStack. The repository describes itself as: 🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid. The licence is MIT.

When your agent uses it

  • Wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis
  • Node-redis via fromNodeRedis)
  • The storage model
  • Client-side ranking limits

Example prompts

  • “/tanstack-ai-memory-redis”

What it can do on your machine

Read from SKILL.md and the folder at commit 5a41239. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Tanstack AI Memory Redis loads about 840 tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 259 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~840

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from TanStack/ai at commit 5a41239, republished under its MIT licence (© TanStack). 259 words, ~840 tokens.

Download SKILL.mdSave it as .claude/skills/tanstack-ai-memory-redis/SKILL.md (or your agent's skills folder).
name
tanstack-ai-memory-redis
description
Use when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking limits, and troubleshooting.

Redis Memory Adapter

Production-grade recall/save adapter backed by plain Redis (no vector index required). Ranks client-side (lexical + optional cosine + recency + importance).

Setup

Bring your own Redis client. ioredis wires in directly; redis (node-redis v4+) needs a small wrapper.

Option A: ioredis
ts
import Redis from 'ioredis'
import { memoryMiddleware } from '@tanstack/ai-memory'
import { redis } from '@tanstack/ai-memory/redis'

const client = new Redis(process.env.REDIS_URL ?? 'redis://localhost:6379')
const memory = redis({ redis: client, prefix: 'myapp:memory' })

// Resolve scope per request from the server-validated session — never from req.body.
function memoryFor(session: { userId: string; threadId: string }) {
  return memoryMiddleware({
    adapter: memory,
    scope: { threadId: session.threadId, userId: session.userId },
  })
}
Option B: redis (node-redis v4+)
ts
import { createClient } from 'redis'
import { memoryMiddleware } from '@tanstack/ai-memory'
import { redis, fromNodeRedis } from '@tanstack/ai-memory/redis'

const client = createClient({ url: process.env.REDIS_URL })
await client.connect()

const memory = redis({
  redis: fromNodeRedis(client),
  prefix: 'myapp:memory',
})

function memoryFor(session: { userId: string; threadId: string }) {
  return memoryMiddleware({
    adapter: memory,
    scope: { threadId: session.threadId, userId: session.userId },
  })
}

node-redis exposes a camelCase API (sAdd, mGet); fromNodeRedis translates it to the lowercase RedisLike shape. Passing a raw node-redis client without the wrapper throws client.sadd is not a function.

redis() accepts the same topK / minScore / kinds / embedder / extract options as inMemory().

Storage model

text
{prefix}:record:{id}                                          -> JSON record
{prefix}:index:{tenantId or _}:{userId or _}:{threadId}       -> Set<id>

save writes the record and adds it to the scope's index set; recall loads the set, scores, and renders. Scope values are escaped (:, \, and _) so a delimiter or the unset placeholder inside a dim can't collide two scopes.

Hard cut: there is no dual-read of older index layouts. If you previously wrote under a different shape (e.g. without tenantId), reindex or wipe — old keys are orphaned.

Always pass the same tenantId/userId/threadId on write and read: missing optional dims become _, so omit ≠ "match any".

Ranking limits

Ranking is client-side: recall loads every record for the scope into Node and scores it. Fine up to ~10k records per scope. Beyond that, write a vector-index-aware adapter against the same recall/save contract.

Troubleshooting

  • Records not visible across processes: ensure every process uses the same REDIS_URL and prefix.
  • Malformed JSON rows: a row whose JSON won't parse is skipped on read and left in place (never deleted) — the signal is a one-time console.warn per bad id. Fix or delete the offending {prefix}:record:{id} key to remediate.

© TanStack, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packages/ai-memory/skills/tanstack-ai-memory-redis of TanStack/ai.

Open the folder on GitHubat commit 5a41239

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in TanStack/ai, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Tanstack AI Memory Redis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Tanstack AI Memory Redis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tanstack AI Memory Redis this skillTanStack/ai3.2k1 repos~840Automated safety check: PassMIT
Runtime Behavior Proberedis/node-redis18k—~4.4kAutomated safety check: PassMIT
Implement Commandredis/node-redis18k—~5kAutomated safety check: PassMIT
Redis Insight Pluginredis/RedisInsight8.9k—~3.5kAutomated safety check: PassMIT
Extend Commands APIredis/lettuce5.8k—~7.7kAutomated safety check: NotesMIT
Cognee Community Packagestopoteretes/cognee32k—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Runtime Behavior Probe

    redis/node-redis

    Official

    Plan and execute runtime-behavior investigations with temporary TypeScript probe scripts, validation matrices, state controls, and findings-first reports.

    18k GitHub stars~4.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Implement Command

    redis/node-redis

    Official

    Add a new Redis command (or command variant) to node-redis end-to-end — the <NAME.ts Command file, its registration with JSDoc in the package commands/index.ts, and a co-located <NAME.spec.ts with…

    18k GitHub stars~5k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Redis Insight Plugin

    redis/RedisInsight

    Official

    A skill your agent uses when creating, modifying, debugging, deploying, or testing Redis Insight Workbench visualization plugins, plugin manifests, package.json visualizations, activationMethod…

    8.9k GitHub stars~3.5k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Extend Commands API

    redis/lettuce

    Official

    Add or extend Redis commands in the Lettuce client API end-to-end — a new core command, a family of new commands, an extension to an existing command's options, or a module/area command…

    5.8k GitHub stars~7.7k tokensUpdated today
    DatabasesAuto-check: notes
  • Cognee Community Packages

    topoteretes/cognee

    Guide to using and contributing cognee community packages: database adapters, data-source connectors, custom tasks and retrievers, and Keywords AI observability.

    32k GitHub stars~1.2k tokensUpdated today
    DatabasesAuto-check passed
  • Email Blast

    antiwork/gumroad

    Send one-off email blasts to Gumroad creators directly via production console, no PR or deploy needed.

    9.8k GitHub stars~1.4k tokensUpdated today
    DatabasesAuto-check passed

More from TanStack/ai

All 24 skills in this repo
  • I Have Adhd

    TanStack/ai

    A skill your agent uses when the user invokes /i-have-adhd, says they have ADHD, or asks for ADHD-friendly output.

    3.2k GitHub starsUsed in 5 repos~1.8k tokens
    Auto-check passed
  • PR Sweep

    TanStack/ai

    Sweep open (or listed) PRs with up to 100 parallel agents: security-scan outside contributors, rebase onto main when behind (push --force-with-lease), approve pending first-time-contributor CI when…

    3.2k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when wiring honcho() from @tanstack/ai-memory/honcho — a hosted memory adapter where recall is a dialectic answer over the user's representation (no discrete fragments).

    3.2k GitHub starsUsed in 1 repo~457 tokens
    Auto-check passed
  • A skill your agent uses when wiring inMemory() from @tanstack/ai-memory/in-memory — explains setup, options (embedder, extract, topK/minScore), when to pick it (dev/tests/single-process demos), and…

    3.2k GitHub starsUsed in 1 repo~448 tokens
    Auto-check passed
  • A skill your agent uses when adding a public teaching example or a docs tutorial.

    3.2k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • AI Persistence

    TanStack/ai

    Durability and state persistence for TanStack AI chats with @tanstack/ai-persistence.

    3.2k GitHub stars~3.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Tanstack AI Memory Redis

What does Tanstack AI Memory Redis do?

A skill your agent uses when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking…. Tanstack AI Memory Redis is an agent skill from TanStack/ai. Use when wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking limits, and troubleshooting.

When should I use Tanstack AI Memory Redis?

Tanstack AI Memory Redis fits situations like: wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis; Node-redis via fromNodeRedis); the storage model; client-side ranking limits.

How do I install Tanstack AI Memory Redis in Claude Code?

Run `npx skills add TanStack/ai --skill tanstack-ai-memory-redis -a claude-code`. Or copy the skill folder (packages/ai-memory/skills/tanstack-ai-memory-redis in TanStack/ai) into .claude/skills/tanstack-ai-memory-redis in your project. Claude Code loads it when a task matches its description.

How do I install Tanstack AI Memory Redis in Codex?

Run `npx skills add TanStack/ai --skill tanstack-ai-memory-redis -a codex`. Or copy the skill folder (packages/ai-memory/skills/tanstack-ai-memory-redis in TanStack/ai) into .agents/skills/tanstack-ai-memory-redis in your project. Codex loads it when a task matches its description.

Can I use Tanstack AI Memory Redis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TanStack/ai --skill tanstack-ai-memory-redis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/tanstack-ai-memory-redis, .gemini/skills/tanstack-ai-memory-redis, .github/skills/tanstack-ai-memory-redis and .opencode/skills/tanstack-ai-memory-redis in your project.

What does Tanstack AI Memory Redis need to run?

SKILL.md names no scripts, command-line tools or credentials: Tanstack AI Memory Redis is instructions for the agent only.

Does Tanstack AI Memory Redis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Tanstack AI Memory Redis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Tanstack AI Memory Redis use?

Tanstack AI Memory Redis is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Tanstack AI Memory Redis use?

About 840 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Tanstack AI Memory Redis?

Skills that share tags, products or a category with Tanstack AI Memory Redis: Runtime Behavior Probe (redis/node-redis, 18k stars), Implement Command (redis/node-redis, 18k stars), Redis Insight Plugin (redis/RedisInsight, 8.9k stars) and Extend Commands API (redis/lettuce, 5.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Tanstack AI Memory Redis?

TanStack (a GitHub organization) maintains it in TanStack/ai, which has 3,169 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 7, 2026.

Source: TanStack/ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.