agent-memory

agent-memory is a skill for Claude Code, Codex from ntorga/agent-starter-kit. It costs 11 tokens per session (2,598 once invoked), scanned A, original, MIT.

A file-based memory system that keeps project knowledge and session logs between conversations.

In plain words
What is it for?
Use it to store long-term project notes, track active or paused sessions, and continue interrupted work.
Why use it?
It prevents lessons, preferences, unfinished tasks, and the details needed to resume work from disappearing when a session ends.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; mentions OpenCode.

Good fit Use it to store long-term project notes, track active or paused sessions, and continue interrupted work.

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

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/ntorga/agent-starter-kit/agent-memory/github.svg)](https://agentmods.dev/skills/ntorga/agent-starter-kit/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/ntorga/agent-starter-kit/agent-memory"><img src="https://agentmods.dev/badge/skills/ntorga/agent-starter-kit/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/ntorga/agent-starter-kit/agent-memory"><img src="https://agentmods.dev/badge/skills/ntorga/agent-starter-kit/agent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,598 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.00011 $0.02598
Opus 5 $0.00005 $0.01299
Sonnet 5 $0.00002 $0.00520
Haiku 4.5 $0.00001 $0.00260

Measured 2d ago against content hash 356995c53122, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-14, 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 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.

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

How it starts

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

Purpose

Agents start cold every session — lessons, preferences, and interrupted work vanish when the conversation ends. This skill defines a file-based memory with two layers: long-term memory (project knowledge that feeds every dispatch) and session memory (an interaction log that lets the next session resume with full context). Together they form a loop: feedback given once stays, and interrupted work resumes with its full trail.

Procedure

  1. Check for the memory directory. Look for .memory/ at the project root. If it does not exist, create it with long-term.md (initialized with the six section headers from the long-term schema below) and subdirectories: session/, plan/, todo/, reviews/ (all empty).

  2. Read session memory at session start. List all files in .memory/session/. For each file with status paused or in-progress, read its Current Task and last 5 log entries. Present the list to the user and ask which action to take:

    • Resume a paused session — that session becomes the current session. If it has an Active Todo, read the todo and include its unchecked items in the summary.
    • Start new — create a new session file in .memory/session/ (naming convention below). Any existing paused sessions remain on disk for later.
    • Switch mid-conversation — pause the current session and resume or start a different one. The user may request this at any point, not just at session start.
    • Files with status done are stale — delete them silently.
  3. Read long-term memory. Read .memory/long-term.md. This step is read-only — do not modify long-term memory here.

  4. Record lessons as they surface. Watch for learning signals throughout the session — do not wait for the user to explicitly frame something as "feedback." Three signal tiers govern when to write:

    • Strong signal — explicit statement. The user says "I prefer X," "always do Y," "never do Z." Record immediately.
    • Medium signal — correction. The user modifies, rejects, or overrides a sub-agent's output. Extract the underlying preference or rule. Before you record a code-related observation, read the relevant files to verify it. Do not record raw claims without checking.
    • Weak signal — implicit pattern. The user consistently does X across multiple interactions but has never stated it. Do not record yet — wait for a strong or medium signal to confirm.

Read the full file on GitHub · 170 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 · 170 lines · 11 tokens per session scan A 356995c53122

Subscribe to this mod's changes

agent-memory is a skill published in the GitHub repository ntorga/agent-starter-kit (142 stars, last pushed 2d ago), licensed MIT. It adds 11 tokens to every session and 2,598 once invoked, about $0.0001 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-09-13.