agent-memory

agent-memory is a skill for Claude Code, Codex from nimadorostkar/Claude-Skills-collection. It costs 41 tokens per session (1,136 once invoked), scanned A, original, MIT.

A method for giving an AI coding agent persistent notes stored in files. The notes survive the end of a session and context compaction, which is when older conversation details may no longer be available.

In plain words
What is it for?
Use it on long-running or multi-session work to record project constraints, useful discoveries, attempted solutions, and other information the agent will need later.
Why use it?
It prevents the agent from repeatedly rediscovering important facts, failed approaches, file locations, and project decisions. It also includes guidance for removing notes that have become outdated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it on long-running or multi-session work to record project constraints, useful discoveries, attempted solutions, and other information the agent will need later.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nimadorostkar/claude-skills-collection/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 nimadorostkar/Claude-Skills-collection --skill agent-memory
Clone the repo
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection

Made for: Claude Code, Codex.

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/nimadorostkar/claude-skills-collection/agent-memory/github.svg)](https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/agent-memory"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/agent-memory/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 agent-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/nimadorostkar/claude-skills-collection/agent-memory"><img src="https://agentmods.dev/badge/skills/nimadorostkar/claude-skills-collection/agent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,136 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00041 $0.01136
Opus 5 $0.00020 $0.00568
Sonnet 5 $0.00008 $0.00227
Haiku 4.5 $0.00004 $0.00114

Measured 12d ago against content hash 2e52d89f0829, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 12d 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-tooling/agent-memory/SKILL.md · 104 lines

How it starts

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

Agent Memory

Purpose

Give an agent state that outlives its context window. Anything the agent must not forget belongs in a file it can re-read — not in a conversation history that will be compacted away.

When to Use

  • A task that spans more turns than the context window holds.
  • Work that continues across sessions.
  • An agent that repeatedly rediscovers the same fact or repeats the same failed approach.
  • Accumulating knowledge about a codebase or a domain over time.

Capabilities

  • Deciding what deserves persistence.
  • File-based memory the agent reads and writes.
  • Structuring notes for retrieval rather than for narrative.
  • Staleness detection and pruning.

Inputs

  • The task and its expected duration.
  • What has been learned that would be expensive to rediscover.
  • What has been tried and failed.

Outputs

  • A memory file that survives compaction and session end.
  • Notes structured so that the relevant part is findable.
  • A pruning discipline so the memory does not become a stale swamp.

Workflow

  1. Write down what would be expensive to rediscover — File locations, API shapes, the reason an approach was abandoned, a constraint the user stated once. Not the narrative of how you got there.
  2. Write it as facts, not as a story — "The auth middleware is in src/mw/auth.ts and it does not run on /health." Not "I looked for the auth middleware and eventually found it."
  3. Record failures explicitly — "Tried X. It does not work because Y." This is the highest-value memory content, because without it the agent will try X again.
  4. Re-read at the start of each session — Memory that is not read is not memory.
  5. Prune what is stale — A note that was true three refactors ago is now a trap. Date the entries and check them.
  6. Keep it small — This file is loaded every session. It competes with the actual work for context.

Best Practices

  • The most valuable memory is a record of what failed and why. Without it, an agent will confidently repeat a failed approach in a new session.
  • Structure the file so the agent can find the relevant section without reading all of it. Headings, not prose.
  • Do not persist the conversation. Persist the conclusions.
  • A memory file that grows monotonically will eventually be mostly wrong. Pruning is part of the discipline, not an afterthought.
  • Distinguish stable facts (architecture, conventions) from working state (what I am doing now). They have different lifetimes and belong in different sections or different files.
  • Date the entries. A fact from six months ago about a fast-moving codebase is a hypothesis.

Read the full file on GitHub · 104 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. 12d ago First seen · 104 lines · 41 tokens per session scan A 2e52d89f0829

Subscribe to this mod's changes

agent-memory is a skill published in the GitHub repository nimadorostkar/Claude-Skills-collection (26 stars, last pushed 24d ago), licensed MIT. It adds 41 tokens to every session and 1,136 once invoked, about $0.0002 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

self-improve

Extract lessons from the current session, or sweep the project's past sessions when asked, and route them to the appropriate knowledge layer (project AGENTS.md, auto memory, existing skills, or new skills). Use when the user asks to "self-improve", "distill this session", "distill past sessions", "sweep past…

tobihagemann/turbo · 125 tokens

recall-reasoning

Recall the reasoning behind a past change by locating the Claude Code transcript that produced it. Use when the user asks to "recall reasoning", "find reasoning", "look up reasoning", "recall implementation reasoning", "find the rationale", "why did I do X", "recall from transcripts", or "find the transcript for this…

tobihagemann/turbo · 76 tokens

install-memu

Install or uninstall memU for whatever agent you are — identify your host, print its packaged guide, and follow it to wire (or unwire) both seams (record and inject). Use when the user asks to install, set up, integrate, remove, or uninstall memU.

NevaMind-AI/memU · 61 tokens

agent-wiki

Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.

Dianel555/DSkills · 89 tokens

capability-evolver

Self-evolution workflow for the agent. Before substantive work, recall past outcomes from evolution memory; while editing, detect improvement signals; at task end, record the outcome; when reusable, distill or search the EvoMap network for proven genes/capsules. Use when the user starts non-trivial work (a feature, a…

Dianel555/DSkills · 98 tokens

agent-memory-mcp

A hybrid memory system that provides persistent, searchable knowledge management for AI agents (Architecture, Patterns, Decisions).

lingxling/awesome-skills-cn · 26 tokens