Agent skill

Managing Shared Memory

by letta-ai in letta-ai/letta-code

Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems.

Apache-2.0Auto-check passedDevelopment

Install Managing Shared Memory

skills CLI
$ npx skills add letta-ai/letta-code --skill managing-shared-memory -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letta-ai/letta-code managing-shared-memory --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/builtin/managing-shared-memory .claude/skills/managing-shared-memory && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
managing-shared-memory
GitHub stars
3.6k
Token cost
~1.4k tokens
SKILL.md length
577 words
Files
1
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems.

  • The user wants to share memory
  • SKILL.md covers Working with Files (the normal…, Managing Repositories (create…, Troubleshooting and Notes and Limits
  • Calls git; needs LETTA_API_KEY
  • Files across agents

What it does

Managing Shared Memory is an agent skill from letta-ai/letta-code. Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems. Use when the user wants to share memory or files across agents, store context outside your own MemFS, attach or detach shared memory, or inspect its file history.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git workflow. It works with Letta and Git. The repository describes itself as: Stateful agents that are like people, with memory, identity, and the ability to learn and adapt. The licence is Apache-2.0.

When your agent uses it

  • The user wants to share memory
  • Files across agents
  • Store context outside your own MemFS
  • Detach shared memory

Example prompts

  • “/managing-shared-memory”

Requirements

  • A credential in LETTA_API_KEY

What it can do on your machine

Read from SKILL.md and the folder at commit 253a3bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LETTA_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Managing Shared Memory loads about 1.4k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 577 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from letta-ai/letta-code at commit 253a3bc, republished under its Apache-2.0 licence (© letta-ai). 577 words, ~1,402 tokens.

Download SKILL.mdSave it as .claude/skills/managing-shared-memory/SKILL.md (or your agent's skills folder).
name
managing-shared-memory
description
Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems. Use when the user wants to share memory or files across agents, store context outside your own MemFS, attach or detach shared memory, or inspect its file history.

Managing Shared Memory

Shared memory is memory created independently of any single agent, designed to be dynamically attached to or detached from multiple agents. Each unit of shared memory is a shared memory repository: a git repository hosted on Letta Cloud, owned by your organization rather than by one agent, reachable from any environment (sandboxes, remote machines, sessions).

Shared memory works like your MemFS: attached repositories are real git checkouts on disk, and you read, edit, and commit with ordinary git. The harness pushes clean committed changes after each turn. Each repository has its own projection root (next to your memory directory, not inside it) and its own remote origin, and other agents may be writing to it too.

Create a shared memory repository when:

  • You have context an agent should be able to access that doesn't belong in its own MemFS (input files, datasets, docs, working artifacts)
  • Multiple agents need to read or write the same context
  • You want a versioned file store that survives across environments and sessions

Working with Files (the normal path)

Attached shared memory is mounted next to your memory directory, one git checkout per repository:

bash
ls "$MEMORY_DIR/../"                      # attached repositories appear here by name
cat "$MEMORY_DIR/../<repo-name>/<path>"   # read like any file

Edit files with your normal file tools, then commit with git. The mount's origin and credentials are already configured:

bash
cd "$MEMORY_DIR/../<repo-name>"
git add <files>
git commit -m "describe the change"

The harness pushes clean commits from read/write attached repositories after the turn. If a push collides with another agent's work, it pulls with rebase and retries once. Dirty files and conflicts are not changed automatically; the harness adds a reminder to the next turn instead.

To pick up other agents' changes:

bash
git -C "$MEMORY_DIR/../<repo-name>" pull --rebase

If a push is rejected (another agent pushed first), git pull --rebase then push again.

History is ordinary git history:

bash
git -C "$MEMORY_DIR/../<repo-name>" log --oneline -- <path>

Managing Repositories (create / attach / detach)

Use the letta shared-memory subcommand. It uses your harness auth (works even when LETTA_API_KEY is not in the shell env) and inherits the agent id from AGENT_ID, so --agent is only needed when targeting another agent.

bash
# List org repositories (marks which are attached to you)
letta shared-memory list

# Create a repository
letta shared-memory create --name shared-notes

# Attach to yourself: attaches via the API, clones the local mount at
# $MEMORY_DIR/../shared-notes, and recompiles the system prompt projection
letta shared-memory attach shared-notes

# Attach to another agent (its mount materializes in that agent's environments)
letta shared-memory attach shared-notes --agent agent-...

# Detach (leaves the local mount directory in place)
letta shared-memory detach shared-notes

# Repair/refresh mounts: clone or pull every attached repository. Use this when
# the system prompt references a repository that is missing on disk (e.g. after
# it was attached from another surface while this session was running).
letta shared-memory sync

# Commit history via the API (works even without a local mount)
letta shared-memory history shared-notes --path docs/plan.md
Show full SKILL.md (255 more words)Show less

Troubleshooting

  • Prompt lists a repository but $MEMORY_DIR/../<name> is missing — the repository was attached without materializing the mount. Run letta shared-memory sync.
  • sync reports "mount path already exists and is not a git repository" — a plain directory (usually created by hand before the mount existed) is occupying the mount path. Inspect it, salvage anything worth keeping, move or delete it, then re-run letta shared-memory sync.
  • Never hand-clone the repository to another location (e.g. /tmp) to work around a broken mount — fix the mount with letta shared-memory sync so every session and other agents see the same checkout.
  • Permission denied under another agent's directory — shared repositories mount per-agent. Only your own mount (under your agent directory) is accessible; another agent's mount of the same repository is walled off by the cross-agent guard. Run letta shared-memory sync to get your own mount.
  • Shared-memory conflict reminder — resolve the conflict in the named repository, finish the rebase or commit, and leave the repository clean. The harness retries the push after a future turn.

Notes and Limits

  • Shared memory is not part of your system prompt. Writing to it does not change your in-context memory — for that, edit your memory blocks or MemFS files.
  • Attaching is asynchronous on the server; letta shared-memory attach waits for the attachment to be visible before cloning.
  • SDK/API equivalent for programmatic callers: @letta-ai/letta-agent-sdk exposes these operations as client.repositories (with files and versions helpers), and shared memory can be attached for a session's lifetime via resources: [{ type: "repository", repositoryId }] on cloud sessions. The REST resource is /v1/repositories.

© letta-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/skills/builtin/managing-shared-memory of letta-ai/letta-code.

Open the folder on GitHubat commit 253a3bc

Compare with similar skills

Managing Shared Memory next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Managing Shared Memory compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Managing Shared Memory this skillletta-ai/letta-code3.6k—~1.4kAutomated safety check: PassApache-2.0
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
Migrate Internal Package into GhostTryGhost/Ghost56k—~3.8kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Moves a package from another TryGhost repository into Ghost as an internal workspace package while keeping its Git history, with checkpoints for the steps that need an administrator.

    56k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Git Merge Conflict Resolver

    tailcallhq/forgecode

    Resolves Git merge conflicts with a plan-first workflow that keeps both sides' intent, regenerates lock files and backs up deleted-but-modified files.

    7.6k GitHub starsUsed in 1 repo~4.5k tokens
    DevelopmentAuto-check passed

More from letta-ai/letta-code

All 25 skills in this repo
  • Creating Skills

    letta-ai/letta-code

    Guide for creating effective skills. An agent skill from letta-ai/letta-code.

    3.6k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Generating Mod Envs

    letta-ai/letta-code

    Generates and reviews mod learning env JSON files for Letta Code local mods.

    3.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Initializing Memory

    letta-ai/letta-code

    Comprehensive guide for initializing or reorganizing agent memory.

    3.6k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Self Configuration

    letta-ai/letta-code

    Inspect or modify Letta Code's own memory, model, context window, system prompt, compaction, permissions, toolsets, mods, skills, channels, schedules, agent secrets, and local runtime settings.

    3.6k GitHub stars~7k tokensUpdated today
    Auto-check passed
  • Browser Use

    letta-ai/letta-code

    Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

    3.6k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Creating Mods

    letta-ai/letta-code

    Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.

    3.6k GitHub stars~2.5k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Managing Shared Memory

What does Managing Shared Memory do?

Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems. Managing Shared Memory is an agent skill from letta-ai/letta-code. Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems.

When should I use Managing Shared Memory?

Managing Shared Memory fits situations like: the user wants to share memory; files across agents; store context outside your own MemFS; detach shared memory.

How do I install Managing Shared Memory in Claude Code?

Run `npx skills add letta-ai/letta-code --skill managing-shared-memory -a claude-code`. Or copy the skill folder (src/skills/builtin/managing-shared-memory in letta-ai/letta-code) into .claude/skills/managing-shared-memory in your project. Claude Code loads it when a task matches its description.

How do I install Managing Shared Memory in Codex?

Run `npx skills add letta-ai/letta-code --skill managing-shared-memory -a codex`. Or copy the skill folder (src/skills/builtin/managing-shared-memory in letta-ai/letta-code) into .agents/skills/managing-shared-memory in your project. Codex loads it when a task matches its description.

Can I use Managing Shared Memory in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/letta-code --skill managing-shared-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/managing-shared-memory, .gemini/skills/managing-shared-memory, .github/skills/managing-shared-memory and .opencode/skills/managing-shared-memory in your project.

What does Managing Shared Memory need to run?

Going by SKILL.md and its folder, Managing Shared Memory needs the command-line tools its instructions call (git) and credentials named LETTA_API_KEY. Our summary lists: A credential in LETTA_API_KEY.

Does Managing Shared Memory access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Managing Shared Memory safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Managing Shared Memory use?

Managing Shared Memory is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Managing Shared Memory use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Managing Shared Memory?

Skills that share tags, products or a category with Managing Shared Memory: Finishing a Development Branch (obra/superpowers, 297k stars), Code Design Rationale Investigator (cursor/plugins, 10k stars), Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars) and Migrate Internal Package into Ghost (TryGhost/Ghost, 56k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Managing Shared Memory?

letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,552 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 9, 2026.

Source: letta-ai/letta-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.