Agent skill

Tanstack AI Memory Hindsight

by TanStack in TanStack/ai

A skill your agent uses when wiring hindsight() from @tanstack/ai-memory/hindsight — a hosted memory adapter that buckets memory per conversation and exposes retain/recall/reflect tools to the model.

MITAuto-check passed

Install Tanstack AI Memory Hindsight

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

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

GitHub CLI
$ gh skill install TanStack/ai tanstack-ai-memory-hindsight --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-hindsight .claude/skills/tanstack-ai-memory-hindsight && 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-hindsight
GitHub stars
3.2k
Token cost
~477 tokens
SKILL.md length
129 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when wiring hindsight() from @tanstack/ai-memory/hindsight — a hosted memory adapter that buckets memory per conversation and exposes retain/recall/reflect tools to the model.

  • SKILL.md covers Setup, Options and Tools
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Tanstack AI Memory Hindsight is an agent skill from TanStack/ai. Use when wiring hindsight() from @tanstack/ai-memory/hindsight — a hosted memory adapter that buckets memory per conversation and exposes retain/recall/reflect tools to the model. Requires the optional @vectorize-io/hindsight-client peer.

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

It works with 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.

Example prompts

  • “/tanstack-ai-memory-hindsight”

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 Hindsight loads about 477 tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 129 words of instructions outside code blocks.

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

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). 129 words, ~477 tokens.

Download SKILL.mdSave it as .claude/skills/tanstack-ai-memory-hindsight/SKILL.md (or your agent's skills folder).
name
tanstack-ai-memory-hindsight
description
Use when wiring hindsight() from @tanstack/ai-memory/hindsight — a hosted memory adapter that buckets memory per conversation and exposes retain/recall/reflect tools to the model. Requires the optional @vectorize-io/hindsight-client peer.

Hindsight Memory Adapter

Hosted recall/save adapter backed by Hindsight. Hindsight owns extraction and ranking server-side, buckets memory into per-conversation "banks" ({tenantId|_}__{user}__{threadId}), and — uniquely — exposes LLM tools through recall so the model can retain/recall/reflect directly.

Setup

ts
import { memoryMiddleware } from '@tanstack/ai-memory'
import { hindsight } from '@tanstack/ai-memory/hindsight'

// Build per request from the server-validated session — never from req.body.
function memoryFor(session: { userId: string; threadId: string }) {
  const memory = hindsight({ user: session.userId }) // baseUrl defaults to HINDSIGHT_URL

  return memoryMiddleware({
    adapter: memory,
    scope: { threadId: session.threadId, userId: session.userId },
  })
}

@vectorize-io/hindsight-client is an optional peer dependency, loaded lazily on first use — install it where you use hindsight().

Options

  • user — durable user id for the bank key (falls back to scope.userId).
  • baseUrl — Hindsight server URL (default HINDSIGHT_URL or http://localhost:8888).
  • budget — recall budget: 'low' | 'mid' | 'high' (default 'mid').
  • onToolRetain / onToolRecall — callbacks fired when the model uses the memory tools.

Scope fields: bank id is {tenantId|_}__{user}__{threadId}. namespace is ignored.

Tools

recall returns hindsight_retain, hindsight_recall, and hindsight_reflect in its tools plus a toolGuidance block. memoryMiddleware merges them into the run so the model can manage long-term memory itself.

© 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-hindsight of TanStack/ai.

Open the folder on GitHubat commit 5a41239

Compare with similar skills

Tanstack AI Memory Hindsight 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 Hindsight compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Tanstack AI Memory Hindsight this skillTanStack/ai3.2k—~477Automated safety check: PassMIT
Native Data FetchingCherryHQ/cherry-studio-app4k6 repos~2.9kAutomated safety check: NotesMIT
Game Changing FeaturesopenstatusHQ/data-table-filters2.3k3 repos~2.1kAutomated safety check: PassMIT
Frontend Query Mutationlangflow-ai/langflow156k—~979Automated safety check: PassMIT
React Frontend Development Guidelinesdiet103/claude-code-infrastructure-showcase10k2 repos~2.9kAutomated safety check: PassMIT
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT

Similar skills

  • Native Data Fetching

    CherryHQ/cherry-studio-app

    A skill your agent uses when implementing or debugging ANY network request, API call, or data fetching.

    4k GitHub starsUsed in 6 repos~2.9k tokens
    DevelopmentAuto-check: notes
  • Game Changing Features

    openstatusHQ/data-table-filters

    Find 10x product opportunities and high-leverage improvements.

    2.3k GitHub starsUsed in 3 repos~2.1k tokens
    Product & Project ManagementAuto-check passed
  • Frontend Query Mutation

    langflow-ai/langflow

    Guide for implementing Langflow frontend query and mutation patterns with Axios and TanStack React Query v5.

    156k GitHub stars~979 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Frontend Development Guidelines

    diet103/claude-code-infrastructure-showcase

    Guidelines for React 18 and TypeScript apps covering Suspense data fetching, lazy loading, feature folders, MUI v7 styling, TanStack Router and performance.

    10k GitHub starsUsed in 2 repos~2.9k tokens
    Frontend & DesignAuto-check passed
  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • React State Management

    involvex/youtube-music-cli

    Master modern React state management with Redux Toolkit, Zustand, Jotai, and React Query.

    456 GitHub starsUsed in 12 repos~3k tokens
    Frontend & DesignAuto-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 wiring redis() from @tanstack/ai-memory/redis in production — covers client setup (ioredis or node-redis via fromNodeRedis), the storage model, client-side ranking…

    3.2k GitHub starsUsed in 1 repo~840 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

Works with

Questions about Tanstack AI Memory Hindsight

What does Tanstack AI Memory Hindsight do?

A skill your agent uses when wiring hindsight() from @tanstack/ai-memory/hindsight — a hosted memory adapter that buckets memory per conversation and exposes retain/recall/reflect tools to the model. Tanstack AI Memory Hindsight is an agent skill from TanStack/ai. Use when wiring hindsight() from @tanstack/ai-memory/hindsight — a hosted memory adapter that buckets memory per conversation and exposes retain/recall/reflect tools to the model.

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

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

How do I install Tanstack AI Memory Hindsight in Codex?

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

Can I use Tanstack AI Memory Hindsight 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-hindsight -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-hindsight, .gemini/skills/tanstack-ai-memory-hindsight, .github/skills/tanstack-ai-memory-hindsight and .opencode/skills/tanstack-ai-memory-hindsight in your project.

What does Tanstack AI Memory Hindsight need to run?

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

Does Tanstack AI Memory Hindsight 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 Hindsight 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 Hindsight use?

Tanstack AI Memory Hindsight 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 Hindsight use?

About 477 tokens (SKILL.md is roughly 1.9k 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 Hindsight?

Skills that share tags, products or a category with Tanstack AI Memory Hindsight: Native Data Fetching (CherryHQ/cherry-studio-app, 4k stars), Game Changing Features (openstatusHQ/data-table-filters, 2.3k stars), Frontend Query Mutation (langflow-ai/langflow, 156k stars) and React Frontend Development Guidelines (diet103/claude-code-infrastructure-showcase, 10k 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 Hindsight?

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.