IN

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.zip

Installs 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.
210 chars✓ has a “when” trigger
Beginner

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

You give it
Agent identity goals or memory reorganization needs
You get back
Updated file structure in $MEMORY_DIR

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.md and system/human/identity.md)
  • Skills must follow the standard format: skills/{skill_name}/SKILL.md (with optional scripts/, references/, assets/)
  • Every .md file must have YAML frontmatter with a description that 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, not project/overview.md. This avoids ambiguity when the agent works across multiple projects.
  • Use nested / paths for hierarchy – e.g. letta-code/tooling/testing.md not letta-code-testing.md
  • Keep files focused on one concept — split when a file mixes distinct topics
  • The description in 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.

SkillInstallsUpdatedSafetyDifficulty
initializing-memory (this skill)22moReviewBeginner
sequential-thinking1369moNo flagsIntermediate
ai-wrapper-product56moNo flagsIntermediate
token-budget44moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by letta-ai

View all by letta-ai

acquiring-skills

letta-ai

Guide for safely discovering and installing skills from external repositories. Use when a user asks for something where a specialized skill likely exists (browser testing, PDF processing, document generation, etc.) and you want to bootstrap your understanding rather than starting from scratch.

313

creating-skills

letta-ai

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Letta Code's capabilities with specialized knowledge, workflows, or tool integrations.

37

adding-models

letta-ai

Guide for adding new LLM models to Letta Code. Use when the user wants to add support for a new model, needs to know valid model handles, or wants to update the model configuration. Covers models.json configuration, CI test matrix, and handle validation.

18

converting-mcps-to-skills

letta-ai

Connect to MCP (Model Context Protocol) servers and create skills for repeated use. Load when a user wants to use an MCP server, connect to external tools via MCP, or when they mention MCP, model context protocol, or specific MCP servers.

11

finding-agents

letta-ai

Find other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.

12

migrating-memory

letta-ai

Migrate memory blocks from an existing agent to the current agent. Use when the user wants to copy or share memory from another agent, or during /init when setting up a new agent that should inherit memory from an existing one.

12

Search skills

Search the agent skills registry