agent-memory

agent-memory is a skill for Claude Code, Codex from komluk/scaffolding. It costs 70 tokens per session (1,506 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/komluk/scaffolding/agent-memory
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, Codex.

Or install scaffolding, the plugin that ships this one along with the rest of its 35 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,506 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00070 $0.01506
Opus 5 $0.00035 $0.00753
Sonnet 5 $0.00014 $0.00301
Haiku 4.5 $0.00007 $0.00151

Measured 3d ago against content hash 29c1ff1c13f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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 · 144 lines

How it starts

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

Agent Memory Protocol

3-tier persistent memory system for cross-session knowledge accumulation.

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

Automatic Injection

Memory is auto-injected into agent context via recall_for_agent() in the task execution pipeline. When a task starts, the system reads:

  1. .scaffolding/agent-memory/shared/KNOWLEDGE.md (always)
  2. .scaffolding/agent-memory/agents/{agent-name}/MEMORY.md (when agent_name is known)
  3. .scaffolding/conversations/{id}/agent-memory/context.md (when conversation_id is provided)

This means agents receive memory context automatically. Manual reading on first turn is optional but recommended for verifying latest data.

On First Turn

Before starting work, optionally read available memory for latest content (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 · 144 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. 3d 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 28d ago), licensed MIT. It adds 70 tokens to every session and 1,506 once invoked, about $0.0003 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

ideogram-ultra

Build Ideogram 4 (Ideogram Ultra) txt2img and img2img workflows with the local open-weights model, dual conditional/unconditional models with DualModelGuider, Qwen3-VL text encoder, and structured JSON ("compositional deconstruction") prompts for strong text rendering and layout control.

artokun/comfyui-mcp · 68 tokens

civitai

Discover Civitai models with the BUILT-IN downloadmodel action:"searchcivitai" and install/generate them locally. Find a checkpoint/LoRA/embedding on Civitai, download it into ComfyUI, and use its trigger words. Optionally pair the official Civitai MCP for community features (images browsing, posting, collections).

artokun/comfyui-mcp · 76 tokens

brand-setup

Create or update the brand profile every other skill reads — a quick 5-question or full 17-question interactive setup capturing identity, business model, industry and compliance markets, 4-dimension voice scales, channels, goals, and competitors, saved to /.claude-marketing/brands/{slug}/profile.json via…

indranilbanerjee/digital-marketing-pro · 148 tokens

spring-security-jwt

Use when an application issues and validates its own first-party JWT access and refresh tokens, including authentication filters, password encoding, RBAC, and method security. For JWTs issued by Keycloak, Auth0, Okta, Cognito, or another authorization server, use oauth2-resource-server.

rrezartprebreza/spring-boot-skills · 64 tokens

spring-ai-integration

Use when integrating LLMs, chat clients, embeddings, RAG pipelines, or AI agents into Spring Boot. Covers Spring AI ChatClient, prompt templates, embeddings, vector stores, and structured output. Use when user mentions Spring AI, LLM, ChatGPT, Claude, RAG, embeddings.

rrezartprebreza/spring-boot-skills · 66 tokens

mcp-server

Use when exposing Spring Boot 3 application capabilities through Model Context Protocol tools, resources, or prompts. Covers Spring AI 1.x tool callback registration, transports, schemas, errors, security, and standalone MCP Java SDK compatibility.

rrezartprebreza/spring-boot-skills · 49 tokens