Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计提醒

syncing-memory-filesystem同步内存文件系统

Agent Skill

syncing-memory-filesystem 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,505

周安装

64

GitHub Stars

2,410

下载量

527
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncing-memory-filesystem(同步内存文件系统)
来源仓库:https://github.com/letta-ai/letta-code
仓库路径:skills/syncing-memory-filesystem
安装命令:
npx skills add https://github.com/letta-ai/letta-code --skill syncing-memory-filesystem
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/letta-ai/letta-code --skill syncing-memory-filesystem

简介

同步内存文件系统用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。
  • syncing-memory-filesystem 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Git-Backed Memory Repos

Agents with the git-memory-enabled tag have their memory blocks stored in git repositories accessible via the Letta API. This enables version control, collaboration, and external editing of agent memory.

Features:

  • Stored in cloud (GCS)
  • Accessible via $LETTA_BASE_URL/v1/git/<agent-id>/state.git
  • Bidirectional sync: API <-> Git (webhook-triggered, ~2-3s delay)
  • Structure: memory/system/*.md for system blocks

What the CLI Harness Does Automatically

When memfs is enabled, the Letta Code CLI automatically:

  1. Adds the git-memory-enabled tag to the agent (triggers backend to create the git repo)
  2. Clones the repo into ~/.letta/agents/<agent-id>/memory/ (git root is the memory directory)
  3. Configures a local credential helper in memory/.git/config (so git push/git pull work without auth ceremony)
  4. Installs a pre-commit hook that validates frontmatter before each commit (see below)
  5. On subsequent startups: pulls latest changes, reconfigures credentials and hook (self-healing)
  6. During sessions: periodically checks git status and reminds you (the agent) to commit/push if dirty

If any of these steps fail, you can replicate them manually using the sections below.

Authentication (Preferred: Repo-Local)

The harness configures a per-repo credential helper during clone and refreshes it on pull/startup. This local setup is the default and recommended approach.

Why this matters: host-level global credential helpers (e.g. installed by other tooling) can conflict with memfs auth and cause confusing failures.

Important: Always use single-line format for credential helpers. Multi-line helpers can break tools that parse git config --list line-by-line.

cd ~/.letta/agents/<agent-id>/memory

# Check local helper(s)
git config --local --get-regexp '^credential\..*\.helper$'

# Reconfigure local helper (e.g. after API key rotation) - SINGLE LINE
git config --local credential.$LETTA_BASE_URL.helper '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'

If you suspect global helper conflicts, inspect and clear host-specific global entries:

# Inspect Letta-related global helpers
git config --global --get-regexp '^credential\..*letta\.com.*\.helper$'

# Example: clear a conflicting host-specific helper
git config --global --unset-all credential.https://api.letta.com.helper

For cloning a *different* agent's repo, prefer a one-off auth header over global credential changes:

AUTH_HEADER="Authorization: Basic $(printf 'letta:%s' "$LETTA_API_KEY" | base64 | tr -d '\n')"
git -c "http.extraHeader=$AUTH_HEADER" clone "$LETTA_BASE_URL/v1/git/<agent-id>/state.git" ~/my-agent-memory

Pre-Commit Hook (Frontmatter Validation)

The harness installs a git pre-commit hook that validates .md files under memory/ before each commit. This prevents pushes that the server would reject.

Rules:

  • Every .md file must have YAML frontmatter (--- header and closing ---)
  • Required fields: description (non-empty string), limit (positive integer)
  • read_only is a protected field: you (the agent) cannot add, remove, or change it. Files with read_only: true cannot be modified at all. Only the server/user sets this field.
  • Unknown frontmatter keys are rejected

Valid file format:

---
description: What this block contains
limit: 20000
---

Block content goes here.

If the hook rejects a commit, read the error message — it tells you exactly which file and which rule was violated. Fix the file and retry.

Clone Agent Memory

# Clone agent's memory repo
git clone "$LETTA_BASE_URL/v1/git/<agent-id>/state.git" ~/my-agent-memory

# View memory blocks
ls ~/my-agent-memory/memory/system/
cat ~/my-agent-memory/memory/system/human.md

Enabling Git Memory (Manual)

If the harness /memfs enable failed, you can replicate it:

AGENT_ID="<your-agent-id>"
AGENT_DIR=~/.letta/agents/$AGENT_ID
MEMORY_REPO_DIR="$AGENT_DIR/memory"

# 1. Add git-memory-enabled tag (IMPORTANT: preserve existing tags!)
# First GET the agent to read current tags, then PATCH with the new tag appended.
# The harness code does: tags = [...existingTags, "git-memory-enabled"]
curl -X PATCH "$LETTA_BASE_URL/v1/agents/$AGENT_ID" \
  -H "Authorization: Bearer $LETTA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tags": ["origin:letta-code", "git-memory-enabled"]}'

# 2. Clone the repo into memory/
mkdir -p "$MEMORY_REPO_DIR"
git clone "$LETTA_BASE_URL/v1/git/$AGENT_ID/state.git" "$MEMORY_REPO_DIR"

# 3. Configure local credential helper (single-line format required)
cd "$MEMORY_REPO_DIR"
git config --local credential.$LETTA_BASE_URL.helper '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'

Bidirectional Sync

API Edit -> Git Pull

# 1. Edit block via API (or use memory tools)
# 2. Pull to get changes (webhook creates commit automatically)
cd ~/.letta/agents/<agent-id>/memory
git pull

Changes made via the API are automatically committed to git within 2-3 seconds.

Git Push -> API Update

cd ~/.letta/agents/<agent-id>/memory

# 1. Edit files locally
echo "Updated info" > system/human.md

# 2. Commit and push
git add system/human.md
git commit -m "fix: update human block"
git push

# 3. API automatically reflects changes (webhook-triggered, ~2-3s delay)

Conflict Resolution

When both API and git have diverged:

cd ~/.letta/agents/<agent-id>/memory

# 1. Try to push (will be rejected)
git push  # -> "fetch first"

# 2. Pull to create merge conflict
git pull --no-rebase
# -> CONFLICT in system/human.md

# 3. View conflict markers
cat system/human.md
# <<<<<<< HEAD
# your local changes
# =======
# server changes
# >>>>>>> <commit>

# 4. Resolve
echo "final resolved content" > system/human.md
git add system/human.md
git commit -m "fix: resolved conflict in human block"

# 5. Push resolution
git push
# -> API automatically updates with resolved content

Block Management

Create New Block

# Create file in system/ directory (automatically attached to agent)
echo "My new block content" > system/new-block.md
git add system/new-block.md
git commit -m "feat: add new block"
git push
# -> Block automatically created and attached to agent

Delete/Detach Block

# Remove file from system/ directory
git rm system/persona.md
git commit -m "chore: remove persona block"
git push
# -> Block automatically detached from agent

Directory Structure

~/.letta/agents/<agent-id>/
├── .letta/
│   └── config.json              # Agent metadata
└── memory/                      # Git repo root
    ├── .git/                    # Git repo data
    └── system/                  # System blocks (attached to agent)
        ├── human.md
        └── persona.md

System blocks (memory/system/) are attached to the agent and appear in the agent's system prompt.

Requirements

  • Agent must have git-memory-enabled tag
  • Valid API key with agent access
  • Git installed locally

Troubleshooting

Clone fails with "Authentication failed":

  • Check local helper(s): git -C ~/.letta/agents/<agent-id>/memory config --local --get-regexp '^credential\..*\.helper$'
  • Check for conflicting global helper(s): git config --global --get-regexp '^credential\..*letta\.com.*\.helper$'
  • Reconfigure local helper: see Authentication section above
  • Verify the endpoint is reachable: curl -u letta:$LETTA_API_KEY $LETTA_BASE_URL/v1/git/<agent-id>/state.git/info/refs?service=git-upload-pack

Push/pull doesn't update API:

  • Wait 2-3 seconds for webhook processing
  • Verify agent has git-memory-enabled tag
  • Check if you have write access to the agent

Harness setup failed (no.git/ after /memfs enable):

  • Check debug logs (LETTA_DEBUG=1)
  • Follow "Enabling Git Memory (Manual)" steps above

Can't see changes immediately:

  • Bidirectional sync has a 2-3 second delay for webhook processing
  • Use git pull to get latest API changes
  • Use git fetch to check remote without merging

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.75%
按下载量换算178

Claude

28.39%
按下载量换算150

Cursor

21.06%
按下载量换算111

Gemini CLI

10.43%
按下载量换算55

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills