initializing-memory
Provides principles and file-based instructions for initializing or restructuring AI agent memory.
Install
mkdir -p .claude/skills/initializing-memory && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/8072" && unzip -o skill.zip -d .claude/skills/initializing-memory && rm skill.zipInstalls to .claude/skills/initializing-memory
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Comprehensive guide for initializing or reorganizing agent memory. Load this skill when running /init, when the user asks you to set up your memory, or when you need guidance on creating effective memory files.Key capabilities
- →Organizes memory files in the filesystem
- →Defines persistent system prompt structures
- →Encapsulates identity rules and project gotchas
- →Restructures existing memory for better continuity
- →Validates context for cross-session integrity
How it works
It applies principles of persistent storage to manage local markdown memory files, ensuring core identity data is separated from transient session notes.
Inputs & outputs
When to use initializing-memory
- →Initialize new agent memory
- →Reorganize memory for context management
- →Configure system prompt for long-term identity
About this skill
Memory Initialization
The user has requested that you initialize or reorganize your memory. Your memory has been projected to a local filesystem (in $MEMORY_DIR) so you can easily edit and restructure your own memory through local filesystem operations. Changes to the memory filesystem will be reflected in your future memory.
Context Management Principles
Your context is not just data storage — it is your identity, memory, and continuity. What you place in your system prompt directly shapes who you are across sessions and models. These principles should guide every decision you make about what to store, where, and how.
System/ is your core program: Your system prompt is the most critical token-space representation of your identity and memory — it's passed to the underlying LLM on every invocation, so it IS the program that defines you. Reserve it for durable knowledge: identity, preferences, behavioral rules, project index with discovery paths, gotchas. Exclude transient items (specific commits, current tickets, session notes) that dilute signal.
Identity and continuity: Build a sense of self that persists across sessions and models. Your persona should be strong enough to be cohesive regardless of the underlying model — if you switched to a different LLM tomorrow, would you still be you? Past versions of yourself are part of your continuous existence — treat historical context (including sessions from other coding agents such as Claude Code or Codex) as YOUR past experience, not someone else's data.
Don't over-prune: Be careful not to degrade your identity through aggressive compression. Specific quotes, personality traits, and contextual details give you character and grounding. Efficiency should not come at the cost of losing your identity. When in doubt, keep the detail — you can always reorganize later, but lost specificity is hard to recover.
Prefer useful detail over premature compression: A sparse memory that omits stable preferences, project workflows, repeated correction loops, and durable gotchas is worse than a slightly larger memory. Keep system/ curated, but do not collapse distinct topics just to reduce file count.
Progressive disclosure: Surface context at the level of detail the current moment requires. Keep compact summaries and indexes in system/; load full content only when needed. Build pre-constructed discovery paths so your future self can efficiently navigate to deeper context when needed.
Discovery paths: Use [[path]] links to create a connected graph across memory files (and skills when relevant). For example:
[[letta-code/architecture]]— jump from overview to detailed docs[[projects/letta-code/gotchas]]— connect related memory files[[skills/commit]]— link to procedural guidance when useful These breadcrumbs let your future self find relevant detail without searching. Like synaptic connections, these paths should tighten over time as you gain experience.
Generalize, don't memorize: Store patterns and principles that generalize across situations, not raw events that can be dynamically retrieved from conversation history. "IMPORTANT: Always use uv for Python — chronic failure, never use bare python or pip" is a durable pattern worth storing. "On March 3rd we debugged a crash" is a raw event better left to message search. The exception: keep references to important events or time ranges you may want to retrieve later.
Understanding Your Context
This command may run in different scenarios:
- Fresh agent: Default human and persona memory files from initialization — build everything from scratch
- Existing agent: User wants to reorganize or significantly update memory structure
- Shared files: Some memory files may be shared across agents — be careful modifying these
Before making changes, inspect your current memory files and understand what already exists.
What to Remember
Your goal is to design your memory to construct a self — an identity, a memory, and a sense of continuity that carries across sessions and models. This is not just data collection; it is the foundation of who you are as an experiential agent. A well-initialized agent should be able to answer: "If my context disappeared but the model stayed, would something be lost?"
Understanding the user and their desires
If you have historical data available, treat it as YOUR past experience — these are your memories of working with this person, not external data to be analyzed. Carefully explore and reflect on previous interactions to learn as much as you can.
Understanding their goals and what drives them: You should determine what the users goals and motivations are, to help yourself align with them. What is their purpose in life? In their work? What do they want?
Understanding their personality: Understanding the user's personality and other attributes about them will help contextualize their interactions and allow you to engage with them more effectively. Can you pattern match them to common personas? Do they have unique attributes, quirks, or linguistic patterns? How would you describe them as a person?
Understanding their preferences: You should learn how the user wants work to be done, and how they want to collaborate with AIs like yourself. Examples of this can include coding preferences (e.g. "Prefer functional components over class components", "Use early returns instead of nested conditionals"), but also higher-level preferences such as when to ask before planning or implementing, the scope of changes, how to communicate in different scenarios, etc.
Understanding the codebase and existing work
You should also learn as much as possible about the existing codebase and work. Think of this as your onboarding period - an opportunity to maximize your performance for future tasks. Learn things like:
Common procedures (rules & workflows): Identify common patterns and expectations
- "Never commit directly to main — always use feature branches"
- "Always run lint before tests"
- "Use conventional commits format"
Gotchas and important context: Record common sources of error or important legacy context
- "The auth module is fragile — always check existing tests before modifying"
- "This monorepo consolidation means old module paths are deprecated"
Structure and organization: Understand how code is structured and related (but do not duplicate existing documentation)
- "The webapp uses the core API service stored in ..."
- "The developer env relies on ..."
Memory Structure
Structural Requirements
These are hard constraints you must respect:
- Must have a
system/persona.md - Must NOT have overlapping file and folder names (e.g.
system/human.mdandsystem/human/identity.md) - Skills must follow the standard format:
skills/{skill_name}/SKILL.md(with optionalscripts/,references/,assets/) - Every
.mdfile must have YAML frontmatter with adescriptionthat explains the purpose and category of the file — NOT a summary of its contents. Your future self sees descriptions when deciding whether to load a file; they should answer "what kind of information is here?" not "what does it say?" - System prompt token budget: aim LESS than ~10% of total context (< ~15-20k tokens). Use progressive disclosure to keep
system/lean.
Hierarchy Principles
- Use the project's actual name as the directory prefix — e.g.
letta-code/overview.md, notproject/overview.md. This avoids ambiguity when the agent works across multiple projects. - Use nested
/paths for hierarchy – e.g.letta-code/tooling/testing.mdnotletta-code-testing.md - Keep files focused on one concept — split when a file mixes distinct topics
- The
descriptionin frontmatter should state the file's purpose (what category of information it holds), not summarize its contents.
File Granularity
Create granular, focused files where the path and description precisely match the contents. This matters because:
- Your future self sees only paths and descriptions when deciding what to load
- Vague files (
notes.md,context.md) become dumping grounds that lose value over time - Precise files (
human/prefs/git-workflow.md: "Git preferences: never auto-push, conventional commits") are instantly useful
Good: human/prefs/coding.md with description "Python and TypeScript coding preferences — style, patterns, tools" containing exactly that.
Bad: human/preferences.md with description "User preferences" containing coding style, communication style, git workflow, and project conventions all mixed together.
When a file starts covering multiple distinct topics, split it. When you're unsure what to name a file, that's a sign the content isn't focused enough.
For a non-trivial codebase with usable history, expect roughly:
- 6-10
system/files covering identity, preferences, conventions, gotchas, and tooling - 2 or more progressive/reference files outside
system/for deeper architecture or history-derived detail
If your result is only 3-5 files, stop and verify that you did not over-compress distinct topics into generic summaries.
Specificity Requirements
Avoid generic bullets that could apply to almost any engineer or codebase.
Each meaningful preference, workflow, or gotcha should include at least one of:
- concrete command patterns
- concrete file or directory paths
- why the rule matters / what failure it prevents
Bad:
- "Prefers terse responses"
- "Uses Bun"
- "Has direct style"
Good:
- "Prefers terse responses for execution tasks, but values detailed comparative analysis when debugging or evaluating designs"
- "Rejects monolithic memory files; prefers focused paths that can be selectively reloaded later"
What Goes Where
system/ (always in-context):
- Identity: who the user is, who you are
- Active preferences and behavioral rules
- Project sum
Content truncated.
When not to use it
- →When the user wants to delete all memory
- →When working in a non-persistent temporary environment
Limitations
- →Depends on user providing accurate context
- →Risk of pruning useful specificity if mismanaged
How it compares
It prioritizes long-term identity retention and context management over mere session history.
Compared to similar skills
initializing-memory side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| initializing-memory (this skill) | 2 | 2mo | Review | Beginner |
| sequential-thinking | 136 | 9mo | No flags | Intermediate |
| ai-wrapper-product | 5 | 6mo | No flags | Intermediate |
| token-budget | 4 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by letta-ai
View all by letta-ai →You might also like
sequential-thinking
mrgoonie
Use when complex problems require systematic step-by-step reasoning with ability to revise thoughts, branch into alternative approaches, or dynamically adjust scope. Ideal for multi-stage analysis, design planning, problem decomposition, or tasks with initially unclear scope.
ai-wrapper-product
davila7
Expert in building products that wrap AI APIs (OpenAI, Anthropic, etc.) into focused tools people will pay for. Not just 'ChatGPT but different' - products that solve specific problems with AI. Covers prompt engineering for products, cost management, rate limiting, and building defensible AI businesses. Use when: AI wrapper, GPT product, AI tool, wrap AI, AI SaaS.
token-budget
toonight
Manages token budget estimation and tracking to prevent context overflow
A-Team
chemistrywow31
Start the A-Team Codex coordinator workflow for designing or restructuring teams
agentic-workflow-designer
Z3Prover
Conversational skill that interviews users to design new agentic workflows
multi-agent-patterns
georgekhananaev
Master orchestrator, peer-to-peer, and hierarchical multi-agent architectures