Agent Skillsletta-ai/letta-code › customizing-statusline

customizing-statusline

GitHub

用于创建、编辑和迁移 Letta Code 的状态栏自定义模块。处理/statusline命令,管理~/.letta/mods/statusline.tsx文件,支持从shell提示符迁移及异步渲染优化,确保全局单文件实现与UI安全规范。

src/skills/builtin/customizing-statusline/SKILL.md letta-ai/letta-code

Trigger Scenarios

用户输入 /statusline 命令 需要修改或创建 Letta Code 状态栏 请求迁移现有的 shell 状态行脚本

Install

npx skills add letta-ai/letta-code --skill customizing-statusline -g -y
More Options

Non-standard path

npx skills add https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/customizing-statusline -g -y

Use without installing

npx skills use letta-ai/letta-code@customizing-statusline

指定 Agent (Claude Code)

npx skills add letta-ai/letta-code --skill customizing-statusline -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": "customizing-statusline",
    "description": "Creates, edits, and migrates Letta Code statusline mods. Use when handling the \/statusline command or continuing work started by \/statusline."
}

Customizing Statusline

Use this skill to create or update the global Letta Code statusline mod:

~/.letta/mods/statusline.tsx

The statusline is a panel registered at order: 0 — the primary line just below the input. It overrides the built-in agent · model line. Host UI can still temporarily preempt it for safety confirmations and transient hints.

Statusline ownership model

safety preemption
else transient host hint
else order-0 statusline panel
else built-in default statusline

The order-0 panel owns the whole primary row. It renders text (not React) and owns its own layout via the row/columns helpers.

Workflow

  1. Check whether ~/.letta/mods/statusline.tsx exists.
  2. If it exists, read it before editing and preserve unrelated code.
  3. If it does not exist, synthesize a focused starter for the user's request.
  4. If the user asks to migrate, import a .sh file, or match a shell prompt, read references/migration.md.
  5. If API details or concrete patterns are needed, read references/api.md and references/examples.md.
  6. If the request combines statusline work with commands, tools, events, other panels, or stateful mod behavior, also use creating-mods and its references/architecture.md.
  7. Guard panel work with letta.capabilities.ui.panels when writing new files.
  8. Edit ~/.letta/mods/statusline.tsx.
  9. Summarize the absolute file path changed and tell the user to run /reload unless the command can reload automatically.

Bare /statusline behavior

If the user ran /statusline without a specific request:

  • If a custom statusline file exists, summarize what it appears to do and ask what they want to change.
  • If no custom file exists, explain that Letta is using the built-in default statusline and offer focused next steps:
    1. start from a simple agent · model statusline
    2. add project info like git branch, worktree, or PR
    3. migrate an existing legacy statusline .sh file
    4. match shell prompt / PS1
    5. describe a custom statusline in their own words

Keep this conversational. Do not build a menu UI unless the product command explicitly asks for one.

Rules

  • Global-only for now. Do not create project mods.
  • Keep the mod single-file for MVP.
  • Do not assume extra npm packages are available.
  • Do not use relative multi-file imports yet.
  • Keep render synchronous and side-effect-free. Do not shell, fetch, await, or read files inside render.
  • Do async work in setup code, intervals, or subscriptions, store the result in a closure variable, then call panel.update() to re-render.
  • Register the statusline at order: 0. Compose left/right with row(left, right, width); color with chalk.
  • Guard panel work with letta.capabilities.ui.panels in new files.
  • Return a disposer that clears timers/subscriptions and calls panel.close().
  • Preserve existing mod code unless the user asks to reset.

Useful references

  • references/api.md - panel API, render context, lifecycle rules
  • references/examples.md - common statusline patterns
  • references/migration.md - legacy command .sh and PS1 migration

Version History

  • b7b6330 Current 2026-07-05 20:11

Same Skill Collection

.skills/adding-models/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/dispatching-coding-agents/SKILL.md
src/skills/builtin/editing-letta-code-desktop-preferences/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/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/syncing-memory-filesystem/SKILL.md

Metadata

Files
0
Version
b7b6330
Hash
8125494e
Indexed
2026-07-05 20:11

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-10 01:32
浙ICP备14020137号-1 $Гость$