Agent Skillsletta-ai/letta-code › editing-letta-code-desktop-preferences

editing-letta-code-desktop-preferences

GitHub

用于安全读取和更新 Letta Code Desktop 的本地偏好设置 JSON 文件,支持修改主题、工作目录等用户配置,确保合并时保留未知键并验证 JSON 有效性。

src/skills/builtin/editing-letta-code-desktop-preferences/SKILL.md letta-ai/letta-code

Trigger Scenarios

用户请求更改桌面主题 用户需要修改默认工作目录 调整远程访问或后台运行设置

Install

npx skills add letta-ai/letta-code --skill editing-letta-code-desktop-preferences -g -y
More Options

Non-standard path

npx skills add https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/editing-letta-code-desktop-preferences -g -y

Use without installing

npx skills use letta-ai/letta-code@editing-letta-code-desktop-preferences

指定 Agent (Claude Code)

npx skills add letta-ai/letta-code --skill editing-letta-code-desktop-preferences -a claude-code -g -y

安装 repo 全部 skill

npx skills add letta-ai/letta-code --all -g -y

预览 repo 内 skill

npx skills add letta-ai/letta-code --list

SKILL.md

Frontmatter
{
    "name": "editing-letta-code-desktop-preferences",
    "description": "Edits Letta Code Desktop (LCD) preferences by safely reading and updating ~\/.letta\/desktop_preferences.json. Use only when the user asks to change current Desktop\/LCD settings such as theme, default working directory, remote access preference, or remote environment name via the preferences JSON."
}

Editing Letta Code Desktop Preferences

Use this skill only to edit the active Letta Code Desktop preferences JSON file. Do not use it for Desktop product-code changes, Electron IPC work, UI changes, or general Letta Cloud Desktop implementation tasks.

Preferences file

The Desktop preferences file is:

~/.letta/desktop_preferences.json

User-editable preference keys:

  • defaultWorkingDirectory: default folder for new local sessions.
  • theme: auto, light, or dark.
  • allowRemoteAccess: boolean for whether remote access should be enabled in preferences.
  • runInBackground: boolean for whether Desktop stays alive in tray/menu bar when all windows close.
  • startAtLogin: boolean for whether Desktop starts hidden at login.
  • remoteEnvName: environment name shown in the Letta Cloud environment picker for the cloud listener.
  • localBackendDirectory: directory containing local backend agents, conversations, and memory.
  • allowLocalAgentsWhenSignedIn: boolean for whether signed-in Desktop sessions can see local/offline agents.

System-managed keys (do not edit directly):

  • artifactsByAgent: per-agent artifacts panel state, written by Desktop UI.
  • debugPanelEnabled: developer debug panel, controlled via app menus.
  • remoteAppServerEnabled: Remote App Server toggle, applied at startup.
  • remoteAppServerUrl: Remote App Server URL, configured via preferences UI.

Workflow

  1. Read the existing JSON first.
  2. Preserve unknown keys.
  3. Merge only the requested preference updates.
  4. Write pretty JSON with a trailing newline.
  5. Do not edit token, provider, secret, agent, conversation, memory, or unrelated state files.
  6. Changes apply live within ~100ms via Desktop's file watcher; if Desktop is not running, changes take effect on next startup.

Safe edit command

Use a merge-style edit like this, changing only the requested keys:

node - <<'NODE'
const fs = require('fs');
const os = require('os');
const path = require('path');

const file = path.join(os.homedir(), '.letta', 'desktop_preferences.json');
fs.mkdirSync(path.dirname(file), { recursive: true });

const current = fs.existsSync(file)
  ? JSON.parse(fs.readFileSync(file, 'utf8'))
  : {};

const next = {
  ...current,
  // Example update. Replace this with the user's requested setting.
  theme: 'dark',
};

fs.writeFileSync(file, JSON.stringify(next, null, 2) + '\n');
NODE

Validation

After editing, read the file back or parse it to confirm valid JSON:

node -e "JSON.parse(require('fs').readFileSync(require('os').homedir() + '/.letta/desktop_preferences.json', 'utf8')); console.log('desktop_preferences.json is valid')"

Version History

  • b94afce Current 2026-08-27 15:21

    新增缺失的偏好键(如 runInBackground, startAtLogin 等),澄清实时重载机制,并移除旧版关于手动重载的建议。

  • b7b6330 2026-07-05 20:11

Same Skill Collection

.skills/adding-models/SKILL.md
.skills/capturing-tui-visual-proof/SKILL.md
src/skills/builtin/acquiring-skills/SKILL.md
src/skills/builtin/context-doctor/SKILL.md
src/skills/builtin/converting-mcps-to-skills/SKILL.md
src/skills/builtin/creating-mods/SKILL.md
src/skills/builtin/creating-skills/SKILL.md
src/skills/builtin/customizing-commands/SKILL.md
src/skills/builtin/customizing-statusline/SKILL.md
src/skills/builtin/dispatching-coding-agents/SKILL.md
src/skills/builtin/finding-agents/SKILL.md
src/skills/builtin/generating-mod-envs/SKILL.md
src/skills/builtin/image-generation/SKILL.md
src/skills/builtin/initializing-memory/SKILL.md
src/skills/builtin/letta-guide/SKILL.md
src/skills/builtin/managing-shared-memory/SKILL.md
src/skills/builtin/messaging-agents/SKILL.md
src/skills/builtin/migrating-memory/SKILL.md
src/skills/builtin/modifying-the-harness/SKILL.md
src/skills/builtin/scheduling-tasks/SKILL.md
src/skills/builtin/self-configuration/SKILL.md
src/skills/builtin/syncing-memory-filesystem/SKILL.md
src/skills/builtin/teleporting-between-environments/SKILL.md
src/skills/builtin/using-cloud-mcp/SKILL.md

Metadata

Files
0
Version
0016701
Hash
d9f7b142
Indexed
2026-07-05 20:11

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-30 06:31
浙ICP备14020137号-1 $Map of visitor$