agent-memory

agent-memory is a skill for Claude Code from komluk/scaffolding. It costs 71 tokens per session (1,527 once invoked), scanned A, original, MIT.

A three-level Markdown memory system for saving knowledge across coding sessions: shared project memory, memory for one agent, and memory for one conversation. Markdown is a plain-text format commonly used for documentation.

In plain words
What is it for?
Use it when reading or writing memory files, deciding where a new insight belongs, or starting work that may depend on earlier context. It covers shared knowledge, agent-specific notes, conversation context, and automatic memory loading.
Why use it?
It prevents useful decisions and lessons from disappearing when a session ends while keeping private or temporary details in the right scope. The protocol also describes how memory is automatically provided to agents.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the scaffolding plugin — 39 skills, 9 commands, 13 agents shipped together

Good fit Use it when reading or writing memory files, deciding where a new insight belongs, or starting work that may depend on earlier context. It covers shared knowledge, agent-specific notes, conversation context, and automatic memory loading.

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

Made for: Claude Code.

Or install scaffolding, the plugin that ships this one along with the rest of its 39 skills, 9 commands, 13 agents.

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/komluk/scaffolding/agent-memory/github.svg)](https://agentmods.dev/skills/komluk/scaffolding/agent-memory)
Your own site
<a href="https://agentmods.dev/skills/komluk/scaffolding/agent-memory"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/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/komluk/scaffolding/agent-memory"><img src="https://agentmods.dev/badge/skills/komluk/scaffolding/agent-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,527 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.00071 $0.01527
Opus 5.5 $0.00028 $0.00611
Sonnet 5.5 $0.00014 $0.00305
Haiku 4.5 $0.00007 $0.00153

Measured 7d ago against content hash c2f424869868, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 · 141 lines

How it starts

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

Agent Memory Protocol

3-tier persistent file-based memory under the repo-local .scaffolding/ directory, for cross-session knowledge accumulation. Vector memory (MCP tools) is covered by the semantic-memory-mcp skill.

Memory Tiers

Tier Path Scope Written By Read By
Shared .scaffolding/agent-memory/shared/KNOWLEDGE.md Whole project Any agent All agents
Agent .scaffolding/agent-memory/agents/{agent-name}/MEMORY.md Per agent Owning agent Own agent + architect
Conversation .scaffolding/conversations/{conversation_id}/agent-memory/context.md Per conversation Any agent in conversation Agents in same conversation

The Conversation tier lives under .scaffolding/conversations/, which is a symlink to <share>/projects/<repo-name>/conversations (shared across machines). Paths are unchanged; always go through the symlink.

How Memory Is Read

No hook or pipeline injects these files into agent context -- they are read on demand (see On First Turn). The conversation tier is the inter-agent handoff: a downstream agent in the same chain reads what an upstream agent recorded there.

On First Turn

Before starting work, read available memory (skip if files don't exist):

  1. Read .scaffolding/agent-memory/shared/KNOWLEDGE.md
  2. Read .scaffolding/agent-memory/agents/{your-agent-name}/MEMORY.md
  3. If conversation_id is provided in task context: Read .scaffolding/conversations/{conversation_id}/agent-memory/context.md

Before Completing

Write significant findings to the appropriate tier:

Shared Knowledge (KNOWLEDGE.md)

Save here:

  • Project architecture facts confirmed across multiple tasks
  • Deployment gotchas and infrastructure quirks
  • Cross-cutting patterns (e.g. how Redis is used, how tasks flow)
  • Known bugs or limitations that affect multiple agents

Do NOT save:

  • Agent-specific patterns (use agent memory)
  • Task-specific context (use conversation memory)
  • Anything already in CLAUDE.md or docs/

Read the full file on GitHub · 141 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 Changed · -5 lines · +1 tokens per session c2f424869868
  2. 8d ago Changed · +2 lines 5f78fdf38cf3
  3. 1mo ago First seen · 144 lines · 70 tokens per session scan A 29c1ff1c13f7

Subscribe to this mod's changes

agent-memory is a skill published in the GitHub repository komluk/scaffolding (15 stars, last pushed yesterday), licensed MIT. It adds 71 tokens to every session and 1,527 once invoked, about $0.0003 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

Other skills, from other repositories

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

import

Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

export

Export a NeatContext context saved from a conversation into a self-contained bundle folder that can be shared or moved to another machine. Use only when the user explicitly invokes this skill or asks to export a NeatContext context.

XTSoftwareLabs/neatcontext-plugins · 47 tokens

use

Connect or switch Codex to a local NeatContext Context by name or list number. Use only when the user explicitly invokes this skill, names a context to connect, or agrees to a routing suggestion.

XTSoftwareLabs/neatcontext-plugins · 43 tokens

delete

Preview and permanently delete a NeatContext context while preserving any externally linked knowledge folder. Use only when the user explicitly invokes this skill or clearly asks to delete a context.

XTSoftwareLabs/neatcontext-plugins · 36 tokens