Agent Memory

Agent Memory is a skill for Claude Code from IgorGanapolsky/ThumbGate. It costs 162 tokens per session (873 once invoked), scanned A, original, MIT.

A local memory system for AI agents that recalls relevant past feedback before work and records whether a task succeeded or failed afterward. Repeated mistakes can become prevention rules.

In plain words
What is it for?
Use it at the start of a task to retrieve related lessons, check prevention rules when mistakes recur, and save feedback after completing work.
Why use it?
It helps an agent avoid repeating known errors across separate sessions by preserving useful feedback and warnings. It requires a local ThumbGate MCP server, a tool connection for sharing capabilities with the agent.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the thumbgate plugin — 35 skills, 7 commands, 1 agent, 5 hooks, 2 MCP servers, 2 plugins shipped together

Good fit Use it at the start of a task to retrieve related lessons…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/igorganapolsky/thumbgate/agent-memory
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.

Any agent
npx skills add IgorGanapolsky/ThumbGate --skill agent-memory
Clone the repo
git clone --depth 1 https://github.com/IgorGanapolsky/ThumbGate

Made for: Claude Code.

Or install thumbgate, the plugin that ships this one along with the rest of its 35 skills, 7 commands, 1 agent, 5 hooks, 2 MCP servers, 2 plugins.

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 Agent Memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/igorganapolsky/thumbgate/agent-memory.svg)](https://agentmods.dev/skills/igorganapolsky/thumbgate/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/igorganapolsky/thumbgate/agent-memory"><img src="https://agentmods.dev/badge/skills/igorganapolsky/thumbgate/agent-memory.svg" alt="Measured on agentmods" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 873 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.00162 $0.00873
Opus 5 $0.00081 $0.00436
Sonnet 5 $0.00032 $0.00175
Haiku 4.5 $0.00016 $0.00087

Measured 7d ago against content hash e7edbb837f0a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

Agent 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 7d 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.

skills/agent-memory/SKILL.md · 98 lines

How it starts

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

Agent Memory

Give your agent persistent memory across sessions. Before starting any task, recall what went wrong last time. After completing work, capture whether it succeeded or failed. Prevention rules are auto-generated from repeated mistakes.

Setup

Add the MCP server (one-time):

claude mcp add thumbgate -- npx -y thumbgate serve

No API key needed. All data stays local.

When to Use

  • Starting a new task or session — recall past context first
  • After completing work that succeeded or failed — capture feedback
  • When the agent keeps making the same mistake — check prevention rules

Workflow

Step 1: Recall past context (do this FIRST on every task)

Call the recall MCP tool with a description of your current task. The tool returns:

  • Past feedback relevant to this task (vector similarity search)
  • Active prevention rules (auto-generated from repeated failures)
  • Recent feedback summary with approval rate

Read the prevention rules carefully. These are patterns that failed before — follow them.

Step 2: Do your work

Complete the task as normal. Keep track of what you did and whether it worked.

Step 3: Capture feedback

Call the capture_feedback MCP tool:

If succeeded:

  • signal: up
  • context: What worked and why
  • tags: Category labels

If failed:

  • signal: down
  • context: What you were trying to do
  • whatWentWrong: Specific failure description
  • whatToChange: How to avoid this next time
  • tags: Category labels

Vague feedback like "it failed" will be rejected. Be specific.

Step 4: Check improvement (optional)

Call the feedback_stats MCP tool to see approval rate, top failure domains, and whether the agent is trending better or worse.

Available MCP Tools

Tool What it does
recall Search past feedback and prevention rules for current task
capture_feedback Record what worked or failed with structured context
prevention_rules View auto-generated rules from repeated mistakes
feedback_stats Approval rate, trend analysis, top failure domains
feedback_summary Human-readable summary of recent signals

Read the full file on GitHub · 98 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. 7d ago First seen · 98 lines · 162 tokens per session scan A e7edbb837f0a

Subscribe to this mod's changes

Agent Memory is a skill published in the GitHub repository IgorGanapolsky/ThumbGate (26 stars, last pushed yesterday), licensed MIT. It adds 162 tokens to every session and 873 once invoked, about $0.0008 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.