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.
npx skills add komluk/scaffolding --skill agent-memorygit clone --depth 1 https://github.com/komluk/scaffoldingWrote 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.
[](https://agentmods.dev/skills/komluk/scaffolding/agent-memory)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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):
- Read
.scaffolding/agent-memory/shared/KNOWLEDGE.md - Read
.scaffolding/agent-memory/agents/{your-agent-name}/MEMORY.md - If
conversation_idis 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/
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.
- 7d ago Changed · -5 lines · +1 tokens per session c2f424869868
- 8d ago Changed · +2 lines 5f78fdf38cf3
- 1mo ago First seen · 144 lines · 70 tokens per session scan A 29c1ff1c13f7
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.
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.
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.
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.
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.
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.
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.