initializing-memory

initializing-memory is a skill for Claude Code, Codex from letta-ai/letta-code. It costs 45 tokens per session (4,789 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,940 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,789 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.04789
Opus 5.5 $0.00018 $0.01916
Sonnet 5.5 $0.00009 $0.00958
Haiku 4.5 $0.00005 $0.00479

Measured 1mo ago against content hash c1773098c1f4, 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 1mo 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 · 226 lines

How it starts

The opening of the file, as written. The whole thing — 226 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.

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.

Generalize, don't memorize, and be specific. Store the pattern, not the episode, and give every preference or gotcha a concrete command, path, or the failure it prevents. "Always use uv for Python — chronic failure, never bare python or pip" is memory; "Prefers terse responses" and "on March 3rd we debugged a crash" are not.

Read the full file on GitHub · 226 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. 1mo ago Changed · +16 lines c1773098c1f4
  2. 1mo ago Changed ad0e8f5e6fed
  3. 2mo ago Changed a2cbf8919b6b
  4. 2mo ago Changed · -518 lines 855fe54d389d
  5. 2mo ago Changed · +2 lines c0909765a317
  6. 3mo 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,940 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 4,789 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

initializing-memory compared with skills from other repositories

initializing-memory next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
initializing-memoryletta-ai/letta-codeSkill3.9ktodayApache-2.0A45Claude Code, Codex
memory-systembojieli/ai-agent-bookSkill60k2d agoApache-2.0A95Claude Code, Codex
memory-recallzilliztech/memsearchSkill3.0kyesterdayMITA38Claude Code, Codex
memanto-companionmoorcheh-ai/memantoSkill2.4kyesterdayApache-2.0A72Claude Code
openloreaakarim/OpenLoreSkill2.0kyesterdayApache-2.0A42Claude Code, Codex
mnemonmnemon-dev/mnemonSkill7538d agoApache-2.0A25Claude Code, Codex
mnemonmnemon-dev/mnemonSkill7538d agoApache-2.0A30Claude Code, Codex