customizing-commands

Creates and registers custom slash commands for Letta Code mods.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers extending Letta Code need a reliable way to add custom slash commands (like /review) without breaking existing mod code or misusing the command registration API.

Core Features & Use Cases

  • Command Registration: Register slash commands via letta.commands.register() with prompt, output, or handled result types.
  • Decision Guidance: Helps decide whether a request should be a mod command, a skill-backed workflow, or a mod tool.
  • Busy-Safe Patterns: Supports runWhenBusy commands using scoped conversations and panels without blocking the main agent.
  • Use Case: A user wants a /review command that reviews current git changes; this Skill generates a focused mod file in ~/.letta/mods/ that registers the command and instructs the user to run /reload.

Quick Start

Ask the agent to create a custom slash command such as /review that reviews current git changes using this skill.

Frequently Asked Questions about customizing-commands

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

FAQPage Schema
How do I create a custom slash command in Letta Code?

Create a TypeScript file in ~/.letta/mods/ that exports an activate function calling letta.commands.register with an id, description, and run function. Return the unregister function, then run /reload to activate the command.

What result types can a Letta Code mod command return?

A mod command returns one of three result types: prompt sends content to the agent, output prints local text without contacting the agent, and handled indicates the command managed its own side effects such as panels.

When should I use a mod command versus a skill or mod tool?

Use a mod command when /foo sends a prompt or shows local output. Use a skill with a thin command launcher for reusable agent workflows, and a mod tool when the agent should call the capability autonomously.

Can a slash command run while the main agent is busy?

Yes, by setting runWhenBusy: true, but such commands must not return a prompt while the main agent is busy. They should use scoped conversation helpers or panels and return handled instead.

Why is my custom command not appearing after I create the mod file?

Mods activate on app start or after running /reload, so a newly created file will not register until you reload. Also verify the command ID is a lowercase slug and does not collide with a built-in command ID.