hindsight-memory

Long-term memory for a coding agent, stored between conversations so it can recall earlier work, decisions, and lasting preferences.

In plain words
What is it for?
Recalling deployment details, design decisions, user preferences, and other durable project facts, then saving new facts for future sessions.
Why use it?
It avoids repeating project context or relying on guesses when a later task depends on past conversations.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/vectorize-io/hindsight/hindsight-memory
Any agent
npx skills add vectorize-io/hindsight --skill hindsight-memory
Clone the repo
git clone --depth 1 https://github.com/vectorize-io/hindsight

Made for: Claude Code, Codex.

Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 620 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00074 $0.00620
Opus 5 $0.00037 $0.00310
Sonnet 5 $0.00015 $0.00124
Haiku 4.5 $0.00007 $0.00062

Measured 2d ago against content hash 736dec06d414, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hindsight-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

hindsight-integrations/agent-plugin/skills/hindsight-memory/SKILL.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hindsight long-term memory

This plugin connects the agent to Hindsight, a long-term memory engine. Memory persists across sessions in a bank (scoped by HINDSIGHT_BANK_ID), so what you retain now is available to recall in future conversations.

The hindsight MCP server exposes the tools below. Prefer these over guessing from scratch when the answer might live in past context.

When to recall (read memory)

Call recall at the start of a task, or whenever the user:

  • refers to earlier work, a past decision, or "the thing we set up",
  • states a preference or constraint that may already be recorded,
  • asks a question that accumulated project/user context could answer.
recall(query: "how do we deploy the API and which region")

recall runs semantic + keyword + graph + temporal retrieval and returns the most relevant memories. Ground your answer in what comes back, and say when nothing relevant was found rather than inventing continuity.

When to retain (write memory)

Call retain when you learn something durable and reusable — worth having in a future session, not just this one:

  • stable user preferences ("prefers pnpm; deploys from main only"),
  • project facts and decisions ("staging DB is Postgres 16 on Neon"),
  • outcomes and gotchas ("the flaky test was a timezone bug, fixed in #482").
retain(content: "The user deploys the API to us-east-1 via GitHub Actions on push to main.")

Do not retain transient chatter, secrets, or anything the user asked you to keep out of memory. Retain the fact, not the whole transcript.

When to reflect (reason over memory)

Call reflect when a single recall is too shallow and you need synthesized reasoning over everything remembered — the why behind a behavior, or a judgment that weighs many facts together:

reflect(query: "What has repeatedly caused our CI to flake, and what should we standardize?")

reflect is slower and disposition-aware; use it deliberately, not for lookups.

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 65 lines · 74 tokens per session scan A 736dec06d414

Subscribe to this mod's changes

hindsight-memory is a skill published in the GitHub repository vectorize-io/hindsight (21,822 stars, last pushed 3d ago), licensed MIT. It adds 74 tokens to every session and 620 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

nocturnusai-knowledge

Use when working with NocturnusAI facts and rules — asserting (tell), querying (ask/infer), teaching rules (teach), retracting (forget), bulk operations, aggregation, or discovering predicates. Covers the core knowledge base CRUD operations. Triggers on: tell, ask, teach, forget, assert, query, infer, rule, fact…

Auctalis/nocturnusai · 92 tokens

nocturnusai-memory

Use when working with NocturnusAI agent memory — context windows, salience scoring, temporal queries, recall, consolidation, decay, TTL, expiration, event streaming, or memory lifecycle management. Triggers on: memory, context window, salience, temporal, recall, consolidate, decay, TTL, expire, events, NocturnusAI…

Auctalis/nocturnusai · 81 tokens

nocturnusai-admin

Use when managing NocturnusAI databases, tenants, health checks, metrics, backups, API key management, RBAC configuration, admin operations, or operational monitoring. Triggers on: NocturnusAI database, tenant, health, metrics, backup, API key, RBAC, admin, monitoring, operational.

Auctalis/nocturnusai · 72 tokens

nocturnusai-connect

Use when setting up NocturnusAI connection, configuring MCP server in claudedesktopconfig.json or .mcp.json, setting up API keys, auth, RBAC bootstrap, creating databases/tenants, or troubleshooting connection issues. Triggers on: setup, connect, configure, MCP, auth, API key, tenant, database, bootstrap, NocturnusAI.

Auctalis/nocturnusai · 85 tokens

nocturnusai-reasoning

Use when working with NocturnusAI advanced reasoning — negation-as-failure (NAF), scopes (fork/merge/diff), hypothetical reasoning, confidence scores, conflict resolution strategies, or proof chains. Triggers on: NAF, negation, negation-as-failure, scope, fork, merge, hypothesis, confidence, conflict, proof, what-if…

Auctalis/nocturnusai · 92 tokens

agent-release-manager

Agent skill for release-manager - invoke with $agent-release-manager.

ruvnet/ruflo · 16 tokens