Agent Native

syncing-memory-filesystem

This skill diagnoses and repairs Git repository issues affecting an agent's memory system, including initialization failures, sync problems, authentication…

by LettaOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (letta-ai)

Agents
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
License
Apache-2.0 (permissive)
Pin
c1033d9pinned Oct 9, 2026
Context cost
about 1,900 tokenswhen the skill loads
GitHub stars
3,549on letta-ai/letta-code
Scripts
None found

What it does

“Diagnose and repair MemFS repository setup, remote sync, authentication failures, optional backup remotes, or merge/rebase conflicts. Do not load for routine memory reads or edits.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill diagnoses and repairs Git repository issues affecting an agent's memory system, including initialization failures, sync problems, authentication errors, merge conflicts, and optional backup remote setup. It provides commands and troubleshooting procedures for repository state inspection, conflict resolution, and verification without interfering with normal memory operations.

When to use it

  • Agent memory repository fails to initialize or sync
  • Merge or rebase conflicts block memory synchronization
  • Authentication or remote URL problems prevent repository access
  • User needs to set up optional backup memory repository mirror

When not to

  • Reading or editing memory files during normal agent operation
  • Routine memory maintenance delegated to background memory subagent

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add letta-ai/letta-code --skill syncing-memory-filesystem

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install letta-ai/letta-code syncing-memory-filesystem@c1033d9f7e8863a869cd2031805cfd2c66c165b9

Installs the commit we checked (c1033d9).

Copy by hand

Download the folder at c1033d9 and put it in .claude/skills/syncing-memory-filesystem for Claude Code and in .agents/skills/syncing-memory-filesystem for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at c1033d9

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "syncing-memory-filesystem" by Letta.

Source, pinned to commit c1033d9f7e8863a869cd2031805cfd2c66c165b9:
https://github.com/letta-ai/letta-code/tree/c1033d9f7e8863a869cd2031805cfd2c66c165b9/src/skills/builtin/syncing-memory-filesystem

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/syncing-memory-filesystem/ for Claude Code and .agents/skills/syncing-memory-filesystem/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/letta/syncing-memory-filesystem

SKILL.md at the pin

---
name: syncing-memory-filesystem
description: Diagnose and repair MemFS repository setup, remote sync, authentication failures, optional backup remotes, or merge/rebase conflicts. Do not load for routine memory reads or edits.
---

# MemFS Repository Repair

Use this skill only when the Git repository behind an agent's memory is not
setting up or syncing correctly. For ordinary memory reads and edits, use the
memory files without loading this skill. Delegate incidental upkeep during another
task to the background `memory` subagent. When memory repair is the user's main
request, diagnose and repair it directly, then verify the result before reporting
success. If a memory worker you launched may still be running, wait for it: re-read
its output file until it ends with `[Task completed]` or `[Task failed]` before
editing memory files or changing Git state. While the harness reports a repair in
progress, leave both alone as well; that worker edits `$MEMORY_DIR` in place.

## Current Model

MemFS is a Git repository projected onto the computer where the agent is
running. `$MEMORY_DIR` is the repository root. There is no second `memory/`
directory inside it.

The repository can use either memory layout. Inspect its current tree and the
memory rules in the system prompt before editing files:

```text
Root layout                         Existing layout
$MEMORY_DIR/                        $MEMORY_DIR/
├── MEMORY.md     # root index      ├── system/     # in-context memory
├── persona.md    # core memory     ├── reference/  # deferred memory
├── <topic>/                        └── skills/     # agent-owned skills
│   └── MEMORY.md # child index
└── skills/       # agent-owned skills
```

Cloud-backed agents have a hosted MemFS remote. Local-backend agents keep a
local-only Git repository and do not need a remote or cloud credentials.

The agent doing the memory work commits its changes. After each turn, the harness pushes
clean committed changes for cloud-backed agents. Local-backend commits remain
on the current machine. Do not run `git push` for normal MemFS sync; let the
harness push after the turn.

Committed memory changes do not alter the current compiled prompt immediately.
Use `/recompile` when the current conversation must see changed core memory
right away. Otherwise, the next prompt compilation or conversation will use
the committed revision.

## Start With the Harness

Prefer the harness commands over manual API calls, remote construction, or
credential-helper edits:

```text
/memfs status    # show whether MemFS is enabled and its path
/memfs enable    # initialize or repair MemFS setup
/memfs sync      # pull the hosted repository
```

From a shell, the standalone status and pull commands are:

```bash
letta memory status --agent "$AGENT_ID"
letta memory pull --agent "$AGENT_ID"
```

`letta memory pull` is a no-op for a local-backend agent because there is no
hosted remote.

Do not reproduce `/memfs enable` by PATCHing agent tags or constructing a Git
remote by hand. The enable flow also updates the system prompt mode, recompiles
the agent, persists local settings, preserves and adds tags, initializes the
checkout, installs hooks, configures identity, and seeds default memory files.

## Inspect a Broken Checkout

Use `$MEMORY_DIR` instead of a hard-coded `~/.letta/agents/...` path. Local and
cloud-backed agents use different parent directories.

```bash
git -C "$MEMORY_DIR" status --short --branch
git -C "$MEMORY_DIR" remote get-url origin | sed -E 's#(https?://)[^/@]+@#\1<redacted>@#'
git -C "$MEMORY_DIR" log -5 --oneline
```

Do not print credential-helper values or tokens. Do not change global Git
configuration. The harness installs or refreshes repository-local auth during
clone and pull when the active transport supports a persistent helper. Desktop
may instead use a temporary Git transport proxy and intentionally omit the
persistent helper.

If the checkout is missing `.git/`, use `/memfs enable`. If it exists but is
behind, use `/memfs sync` or `letta memory pull --agent "$AGENT_ID"`. Pull also
repairs recognized stale MemFS origin URLs and refreshes repository-local hooks,
auth, branch tracking, and agent identity.

## Uncommitted Changes

Raw file edits must preserve the active layout's rules:

- In the root layout, root and child `MEMORY.md` indexes have no frontmatter.
  Every other memory Markdown file has exactly `name` and `description`.
- In the existing layout, Markdown files under `system/` and `reference/` need
  a non-empty `description`. `read_only` is protected and cannot be added,
  removed, or changed by the agent.

```markdown
---
description: What this memory file contains
---

Memory content goes here.
```

Review the complete diff before committing. Stage named memory files only and
create a new commit. Once the repository is clean, the harness will push a
cloud-backed agent's pending commits after the turn.

## Merge or Rebase Conflicts

The harness first tries a fast-forward pull. When a remote push is rejected
because the remote moved, post-turn sync tries `git pull --rebase` and retries
the push. If that rebase conflicts, the harness launches a fresh background
`memory` subagent to repair it. The primary conversation is not interrupted.
The harness retries normal sync after the worker finishes. The instructions
below are for explicit troubleshooting; routine repairs run in the background.

Start by reading the current Git operation and every conflicted file:

```bash
git -C "$MEMORY_DIR" status
git -C "$MEMORY_DIR" diff --name-only --diff-filter=U
```

Resolve the conflict markers without deleting required frontmatter, then stage
the resolved files by name. Finish the operation Git reports:

```bash
git -C "$MEMORY_DIR" add <resolved-memory-path>

# If git status says a rebase is in progress:
GIT_EDITOR=true git -C "$MEMORY_DIR" rebase --continue

# If git status says a merge is in progress:
git -C "$MEMORY_DIR" commit
```

Do not start a new merge when a rebase is already in progress. Do not reset,
abort, or discard either side without the user's approval. When the repository
is clean and the merge or rebase is complete, the harness retries the hosted
push after a future turn.

## Optional Backup Remote

`/memory-repository` mirrors the agent's `main` branch to an additional Git
URL. This is separate from the hosted MemFS origin.

```text
/memory-repository set git@github.com:you/my-memory.git
/memory-repository status
/memory-repository push
/memory-repository unset
```

`set` stores `letta.memoryRepository.url` in the MemFS repository's local Git
config, installs the post-commit hook, and attempts an initial push. Later
commits on `main` start a background mirror push. Mirror failures do not block
the commit; `/memory-repository status` shows the recent push log.

Use normal SSH or Git credential handling for the backup URL. Avoid embedding a
token in the URL because the URL is stored in `.git/config`. Use
`/memory-repository push` only for this optional backup remote, not for normal
MemFS synchronization.

## Failure Checklist

1. Confirm `$MEMORY_DIR` points to the active agent's repository.
2. Check whether the backend is cloud-backed or local-only.
3. Inspect `git status`, the origin URL, and the current Git operation.
4. Use `/memfs enable` for a missing checkout and `/memfs sync` for a pull.
5. Preserve the active layout's indexes and frontmatter, then finish any
   existing merge or rebase.
6. Leave hosted pushes to post-turn sync once the repository is clean.
7. If the command still fails, rerun it with `LETTA_DEBUG=1` and report the
   redacted error. Never print or copy credential-helper values.

From letta-ai/letta-code at c1033d9, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at c1033d9

Files

1 file, 7.7 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at c1033d9
All 50 skills from Letta

More from Letta

  • acquiring-skills

    Enables the agent to discover and install skills from multiple registries including Hermes Skills Hub, ClawHub, GitHub, and community repositories.

    Agents not labelled yet · about 3.1K tokens · pinned 6 days ago

  • browser-use

    Control a real browser using Chrome DevTools Protocol over WebSocket to navigate pages, interact with UI, fill forms, scrape sites, and capture screenshots or…

    Claude Code, Codex, Cursor +4 · about 3.2K tokens · pinned 6 days ago

  • Context Doctor

    Context Doctor investigates and repairs an agent's context including memory, system prompt, and skills by analyzing observed behavior as evidence.

    Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 6 days ago

  • creating-mods

    This skill creates and edits mod files that extend local Letta instances with tools, slash commands, event handlers, custom model providers, permissions, and…

    Claude Code, Codex, Cursor +4 · about 2.4K tokens · pinned 6 days ago

  • creating-skills

    This skill guides developers in creating modular packages that extend Letta Code agent capabilities with specialized knowledge, workflows, tool integrations…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 4.5K tokens · pinned 6 days ago

  • curating-memory-palace

    This skill lets the agent maintain a Memory Palace, a structured dashboard view that shows the user what the agent is working on, what it could do next, and…

    Agents not labelled yet · about 3.1K tokens · pinned 6 days ago

All AI and agents skills
  • agent-builder

    Agent Builder orchestrates the creation, modification, testing, and publishing of n8n Agents.

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.3K tokens · pinned 6 days ago

  • intent-recognition

    Classifies automation requests by determining which primitive owns the top-level control flow (workflow, agent, needs clarification, or out-of-scope) and…

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +4 · about 6.9K tokens · pinned 6 days ago

  • planned-task-runtime

    This skill manages follow-up interactions with a background task execution system, handling task completion synthesis, failure replanning, workflow building…

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 6 days ago

  • skill-creator

    This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.

    by GoogleOfficial publisher

    Contains scripts

    Gemini CLI · about 5K tokens · pinned 6 days ago

  • -21risk-automation

    This skill automates 21risk operations by connecting to the 21risk toolkit through Composio's Rube MCP server.

    by ComposioOfficial publisher

    Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 6 days ago

  • -2chat-automation

    This skill automates 2chat tasks by integrating with Composio's 2chat toolkit through Rube MCP.

    by ComposioOfficial publisher

    Agents not labelled yet · about 680 tokens · pinned 6 days ago

Open roles at Letta

4 open roles on the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use