customizing-statusline

Creates, edits, and migrates Letta Code statusline mods in ~/.letta/mods/statusline.tsx.

3.2k|385|Updated Oct 25, 2025
One-click install
npx skills add https://github.com/letta-ai/letta-code --skill customizing-statusline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: customizing-statusline
Source: https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/customizing-statusline
Command: npx skills add https://github.com/letta-ai/letta-code --skill customizing-statusline

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Customizing the Letta Code CLI statusline requires writing a TypeScript mod file with the correct panel API, lifecycle rules, and async patterns, which is error-prone without guidance. This Skill handles creating, editing, and migrating the global statusline mod so the primary line below the input shows exactly what the user wants.

Core Features & Use Cases

  • Statusline Creation and Editing: Generates or updates ~/.letta/mods/statusline.tsx as an order-0 panel that overrides the built-in agent · model line, with synchronous render and async state via intervals and panel.update().
  • Legacy Migration: Converts legacy command-based statuslines from settings.json, standalone .sh scripts, and shell PS1 prompts into the new mod format, mapping polling intervals and left/right output splits.
  • Use Case: A user wants their statusline to show the current git branch and open PR number. The Skill writes a mod that polls git branch --show-current and gh pr view every 30-60 seconds, caches results in closure variables, and renders them with row and chalk.

Quick Start

Ask the agent to customize your statusline, for example: update my statusline to show the current git branch and model name.

Frequently Asked Questions about customizing-statusline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I customize the Letta Code statusline?

Run the /statusline command or ask the agent to edit ~/.letta/mods/statusline.tsx. The mod registers an order-0 panel via letta.ui.openPanel with a synchronous render function, then run /reload to apply changes.

How to show git branch in the Letta statusline?

Use execFile from node:child_process in setup code to run git branch --show-current on an interval, store the result in a closure variable, and call panel.update(). The render function reads the cached value synchronously and composes it with row and chalk.

Can I migrate a legacy command statusline or shell PS1 prompt?

Yes. The Skill reads statusLine config from ~/.letta/settings.json or project settings, ports .sh scripts by mapping stdin JSON to render context fields, and converts PS1 escapes like \u, \h, and \w into equivalent mod code with chalk colors.

Why must the statusline render function be synchronous?

The panel API requires render to be synchronous and side-effect-free, so shell commands, network requests, and file reads are forbidden inside it. Async work belongs in setup code or intervals, with results cached in closure variables and panel.update() triggering re-renders.

What are the limitations of statusline mods?

Mods are global-only at ~/.letta/mods/statusline.tsx with no project-scoped support, must stay single-file without relative imports, and cannot assume extra npm packages. The render output is clipped to the terminal width and capped in height by the host.