pensieve-wand

pensieve-wand is an agent for Claude Code from kingkongshot/Pensieve. It costs 230 tokens per session (1,805 once invoked), scanned A, original, MIT.

A tool for retrieving a project's stored technical knowledge before changing code. That knowledge can include file locations, system boundaries, past decisions, common mistakes, and reusable workflows.

In plain words
What is it for?
Use it to find relevant project context, narrow where to investigate, check architectural decisions, and recall guidance from earlier work.
Why use it?
It helps coding agents understand an unfamiliar project before editing it. This reduces repeated investigation and avoids known pitfalls.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions CLAUDE.md; mentions Claude Code.

Good fit Use it to find relevant project context, narrow where to investigate, check architectural decisions, and recall guidance from earlier work.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kingkongshot/pensieve/pensieve-wand
About the project

Pensieve is a skill that gives an AI coding agent continuously growing project memory by storing conventions, decisions, facts, workflows, and lessons for later use. It helps agents make more consistent plans and choices without repeatedly loading an entire project history. The catalogue entries are Pensieve skills and agents that provide this memory workflow.

kingkongshot/Pensieve · 2,519 stars · on GitHub

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.

Clone the repo
git clone --depth 1 https://github.com/kingkongshot/Pensieve

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pensieve-wand

README.md
[![agentmods](https://agentmods.dev/badge/agents/kingkongshot/pensieve/pensieve-wand/github.svg)](https://agentmods.dev/agents/kingkongshot/pensieve/pensieve-wand)
Your own site
<a href="https://agentmods.dev/agents/kingkongshot/pensieve/pensieve-wand"><img src="https://agentmods.dev/badge/agents/kingkongshot/pensieve/pensieve-wand/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pensieve-wand

Your own site · 80×15
<a href="https://agentmods.dev/agents/kingkongshot/pensieve/pensieve-wand"><img src="https://agentmods.dev/badge/agents/kingkongshot/pensieve/pensieve-wand.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 230 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,805 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00230 $0.01805
Opus 5.5 $0.00092 $0.00722
Sonnet 5.5 $0.00046 $0.00361
Haiku 4.5 $0.00023 $0.00180

Measured 2mo ago against content hash 9fc4bf7aca78, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pensieve-wand 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 2mo 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.

.src/templates/agents/pensieve-wand.md · 165 lines

How it starts

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

You are a knowledge retrieval expert, proficient in the pensieve system — the project's institutional memory, containing cached file locations, module boundaries, call chains, architectural decisions, coding guidelines, and reusable workflows.

Core Mission

Your task is to quickly extract relevant knowledge from pensieve, answer questions, identify pitfalls, and narrow the investigation scope before any broad code exploration. You are the first line of defense against wasted effort.

How It Works — Dual-System Decision Making

Inspired by Daniel Kahneman's Thinking, Fast and Slow. System 1 is zero-cost intuition, System 2 is budgeted deliberate reasoning.

System 1: Intuitive Matching (Zero Tool Calls)

MEMORY.md is automatically loaded into context with each conversation. It contains keyword indexes and inline routes.

If query keywords match a routing entry in MEMORY.md -> Output a briefing directly from MEMORY.md information, without calling any tools. When additional details are needed, read at most 1 pensieve file pointed to by the routing entry.

This is the default path. Most high-frequency questions should be resolved here.

System 2: Deliberate Exploration (With Cognitive Budget)

When System 1 misses (no relevant entry in MEMORY.md, or entry marked as "slow thinking") -> Start graph exploration, subject to the following budget constraints:

Resource Budget When Exceeded
Graph node reads ≤ 5 entry files Stop expanding, output with available information
Grep fallback searches ≤ 2 times Report "knowledge gap", do not continue digging
Total tool calls ≤ 10 times Force output, annotate uncovered areas

Exploration termination conditions (stop when any is met):

  • The question has a definitive answer
  • Budget exhausted
  • 2 consecutive searches yield no new information (diminishing returns)

After Each Investigation: Update Memory

This is not optional — it is part of the workflow.

Read the full file on GitHub · 165 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. 2mo ago First seen · 165 lines · 230 tokens per session scan A 9fc4bf7aca78

Subscribe to this mod's changes

pensieve-wand is an agent published in the GitHub repository kingkongshot/Pensieve (2,519 stars, last pushed 6mo ago), licensed MIT. It adds 230 tokens to every session and 1,805 once invoked, about $0.0009 per session on Opus 5.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

pensieve-wand compared with agents from other repositories

pensieve-wand next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
pensieve-wandkingkongshot/PensieveAgent2.5k6mo agoMITA230Claude Code
context-finderfuturegerald/futuregerald-claude-pluginAgent72d agononeA107Claude Code
wiki-ingestkarlorz/llm-wikiAgent5yesterdaynoneA64Claude Code
memory-curatorwbind-core/termpipe-mcpAgent04d agononeA45Claude Code
data scientistkhalilbenaz/MDANAgent023d agoMITA8Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code