Skip to content
Sign up

Slash commands

Control Letta Code's behavior during an interactive session with slash commands

Control Letta Code’s behavior during an interactive session with slash commands. Press Tab to autocomplete command names.

CommandDescription
/agentsBrowse agents (pinned, Letta Code, all)
/modelSwitch model
/initInitialize (or re-init) your agent’s memory
/remember [text]Remember something from the conversation
/skill [description]Enter skill creation mode
/memoryView your agent’s memory blocks
/searchSearch messages across all agents
/clearClear conversation history (keep memory)
/newCreate a new agent and switch to it
/pin [-l] [name]Pin current agent globally (-l for local only)
/unpin [-l]Unpin current agent (-l for local only)
/rename <name>Rename the current agent
/description <text>Update the current agent’s description
/downloadDownload AgentFile (.af)
/toolsetSwitch toolset (default/codex/gemini)
/adeOpen agent in ADE (browser)
/systemSwitch system prompt
/subagentsManage custom subagents
/mcpManage MCP servers
/usageShow session usage statistics and balance
/feedbackSend feedback to the Letta team
/terminal [--revert]Setup terminal shortcuts (Shift+Enter)
/connect claudeConnect an existing Claude account
/disconnectDisconnect from Claude OAuth
/bgShow background shell processes
/exitExit this session
/logoutClear credentials and exit

Custom slash commands let you define frequently used prompts as Markdown files that Letta Code can execute. Commands can be project-specific (shared with your team) or personal (available across all projects).

/<command-name> [arguments]
ParameterDescription
<command-name>Name derived from the Markdown filename (without .md extension)
[arguments]Optional arguments passed to the command

Commands stored in your repository and shared with your team. These show “(project)” in /help.

Location: .commands/

Terminal window
# Create a project command
mkdir -p .commands
echo "Review this code for security vulnerabilities:" > .commands/security.md

Commands available across all your projects. These show “(user)” in /help.

Location: ~/.letta/commands/

Terminal window
# Create a personal command
mkdir -p ~/.letta/commands
echo "Explain this code in simple terms:" > ~/.letta/commands/explain.md

Pass dynamic values to commands using argument placeholders:

All arguments with $ARGUMENTS

.commands/fix-issue.md
Fix issue #$ARGUMENTS following our coding standards

Usage: /fix-issue 123 high-priority$ARGUMENTS becomes “123 high-priority”

Positional arguments with $1, $2, etc.

.commands/review-pr.md
Review PR #$1 with priority $2 and assign to $3

Usage: /review-pr 456 high alice$1=“456”, $2=“high”, $3=“alice”

Execute shell commands when the slash command runs using !`command` syntax:

Current branch: !`git branch --show-current`
Recent commits:
!`git log --oneline -5`

Shell commands are executed and replaced with their output.

Include file contents using the @ prefix:

Review the implementation in @src/utils/helpers.js
Compare @src/old-version.js with @src/new-version.js

Command files support frontmatter for metadata:

PropertyPurposeDefault
descriptionBrief description shown in /helpFirst line of prompt
argument-hintArguments expected (shown in autocomplete)None

Example:

.commands/review.md
---
description: Review code changes in the current branch
argument-hint: "[focus area]"
---
Review all uncommitted changes in this repository. Focus on:
- Code quality and best practices
- Potential bugs or edge cases
- Suggestions for improvement
$ARGUMENTS

Project commands (.commands/) take precedence over global commands (~/.letta/commands/). Custom commands appear in autocomplete alongside built-in commands.

Quick, frequently used prompts:

  • Simple prompt snippets you use often
  • Quick reminders or templates
  • Frequently used instructions that fit in one file

Examples:

  • /review → “Review this code for bugs and suggest improvements”
  • /explain → “Explain this code in simple terms”
  • /optimize → “Analyze this code for performance issues”

Comprehensive capabilities with structure:

  • Complex workflows with multiple steps
  • Capabilities requiring scripts or utilities
  • Knowledge organized across multiple files
  • Team workflows you want to standardize

Examples:

  • Code review Skill with security checklist, performance patterns, and linting scripts
  • Documentation Skill with style guides and templates
  • Deployment Skill with environment-specific configs and validation
AspectSlash CommandsSkills
ComplexitySimple promptsComplex capabilities
StructureSingle .md fileDirectory with SKILL.md + resources
ContextInjected once when invokedPinned to context when loaded
Survives compactionNoYes
DiscoveryExplicit (/command)Agent loads via Skill tool
ScopeProject or personalProject or global

As a slash command:

.commands/review.md
Review this code for:
- Security vulnerabilities
- Performance issues
- Code style violations

Usage: /review (one-time injection)

As a Skill:

.skills/code-review/
├── SKILL.md (overview and workflows)
├── SECURITY.md (security checklist)
├── PERFORMANCE.md (performance patterns)
└── STYLE.md (style guide reference)

Usage: Agent loads the skill and has persistent access to all reference material throughout the conversation.

  • Skills - Create comprehensive capabilities with multiple files
  • Memory - Manage agent memory blocks
  • CLI reference - Command-line options and flags