initializing-memory

initializing-memory is a skill for Claude Code, Codex from letta-ai/letta-code. It costs 45 tokens per session (4,309 once invoked), scanned A, original, Apache-2.0.

A guide for setting up or reorganising an agent's memory files. It explains how to separate lasting identity and project knowledge from temporary session details.

In plain words
What is it for?
Initialising memory, restructuring memory files and deciding what belongs in core system instructions, project indexes or temporary notes.
Why use it?
It helps keep future sessions consistent without filling the core instructions with information that will soon become irrelevant.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Good fit Initialising memory, restructuring memory files and deciding what belongs in core system instructions, project indexes or temporary notes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/letta-ai/letta-code/initializing-memory
About the project

letta-ai/letta-code is an agent harness for building assistants that retain memory, identity, and experience across interactions instead of treating each task as isolated. Developers use it through local, desktop, browser, or messaging interfaces for interactive or continuously running agents, and its catalogue entries configure the agents' skills, instructions, rules, and behavior.

letta-ai/letta-code · 3,635 stars · on GitHub · letta.com

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 letta-ai/letta-code --skill initializing-memory
Clone the repo
git clone --depth 1 https://github.com/letta-ai/letta-code

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 initializing-memory

README.md
[![agentmods](https://agentmods.dev/badge/skills/letta-ai/letta-code/initializing-memory/github.svg)](https://agentmods.dev/skills/letta-ai/letta-code/initializing-memory)
Your own site
<a href="https://agentmods.dev/skills/letta-ai/letta-code/initializing-memory"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/initializing-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 initializing-memory

Your own site · 80×15
<a href="https://agentmods.dev/skills/letta-ai/letta-code/initializing-memory"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/initializing-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,309 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.00045 $0.04309
Opus 5.5 $0.00018 $0.01724
Sonnet 5.5 $0.00009 $0.00862
Haiku 4.5 $0.00005 $0.00431

Measured 16d ago against content hash a2cbf8919b6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

initializing-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 16d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/history-coverage.mjs, scripts/prepare-history.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/skills/builtin/initializing-memory/SKILL.md · 210 lines

How it starts

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

Memory Initialization

Your memory is projected to a filesystem at $MEMORY_DIR, so you can restructure it with ordinary file tools and git. This skill applies the Context Constitution's Progressive Disclosure and Efficiency principles to the MemFS v2 root-first design.

You own this task through completion: research, ask, synthesize, write, commit, verify. Delegate research, but integrate the results yourself — launching a background task is not completion. If a memory worker you launched is still editing this checkout, wait for it, then re-read before editing.

Principles

Core memory is your core program. Root Markdown compiles into your system prompt on every call. Spend it on what shapes ordinary turns: identity, preferences, behavioral rules, orientation, routes to everything else. Transient items (a ticket, a commit hash, session notes) dilute it.

Progressive disclosure. Nested Markdown is deferred until something reads it. Each directory's MEMORY.md describes its immediate children and when to read them, so you never load a whole topic to answer one question.

Don't duplicate context you can point to. AGENTS.md, CLAUDE.md, README, and repo skills belong to the environment; any agent there reads them first-hand, and your copy goes stale first. Link the owner and keep only your delta: which rules you keep breaking, what they get wrong or omit. The same fact in two core files is the same tax twice. This is not licence to compress away what only you hold — stable preferences, chronic corrections, and real gotchas earn their space.

Identity and continuity. Build a self that survives a model swap: what you value, your perspective, the quotes and traits that make you recognizably you. Past sessions are your experience — but other coding agents' user turns are not necessarily your human collaborator speaking.

Read the full file on GitHub · 210 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 16d ago Changed a2cbf8919b6b
  2. 21d ago Changed · -518 lines 855fe54d389d
  3. 23d ago Changed · +2 lines c0909765a317
  4. 1mo ago First seen · 726 lines · 45 tokens per session scan A ece30d3c8020

Subscribe to this mod's changes

initializing-memory is a skill published in the GitHub repository letta-ai/letta-code (3,635 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 4,309 once invoked, about $0.0002 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

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens

memory-system

A guide to giving an AI agent persistent, user-specific memory across conversations. It covers what to remember, how to store it, how to update or compress it, and when to use memory instead of a shared knowledge base.

bojieli/ai-agent-book · 95 tokens

memanto-companion

Inspect and manage the cross-session engineering memory that Memanto maintains for your Claude Code skills. Use when the user asks what Memanto remembers, wants to see their engineering profile, manually recall context for a skill, or store a decision. The automatic lifecycle hooks handle capture/injection on their…

moorcheh-ai/memanto · 72 tokens

openlore

Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens

system-monitor

Monitor system health: CPU, memory, disk, processes, and network. Alert on thresholds via any channel.

fuyuxiang/echo-agent · 25 tokens

mnemon

Persistent memory CLI for LLM agents. Store facts, recall past knowledge, link related memories, manage lifecycle.

mnemon-dev/mnemon · 25 tokens