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.
Built-in slash commands
Section titled “Built-in slash commands”| Command | Description |
|---|---|
/agents | Browse agents (pinned, Letta Code, all) |
/model | Switch model |
/init | Initialize (or re-init) your agent’s memory |
/remember [text] | Remember something from the conversation |
/skill [description] | Enter skill creation mode |
/memory | View your agent’s memory blocks |
/search | Search messages across all agents |
/clear | Clear conversation history (keep memory) |
/new | Create 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 |
/download | Download AgentFile (.af) |
/toolset | Switch toolset (default/codex/gemini) |
/ade | Open agent in ADE (browser) |
/system | Switch system prompt |
/subagents | Manage custom subagents |
/mcp | Manage MCP servers |
/usage | Show session usage statistics and balance |
/feedback | Send feedback to the Letta team |
/terminal [--revert] | Setup terminal shortcuts (Shift+Enter) |
/connect claude | Connect an existing Claude account |
/disconnect | Disconnect from Claude OAuth |
/bg | Show background shell processes |
/exit | Exit this session |
/logout | Clear credentials and exit |
Custom slash commands
Section titled “Custom slash commands”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).
Syntax
Section titled “Syntax”/<command-name> [arguments]| Parameter | Description |
|---|---|
<command-name> | Name derived from the Markdown filename (without .md extension) |
[arguments] | Optional arguments passed to the command |
Command types
Section titled “Command types”Project commands
Section titled “Project commands”Commands stored in your repository and shared with your team. These show “(project)” in /help.
Location: .commands/
# Create a project commandmkdir -p .commandsecho "Review this code for security vulnerabilities:" > .commands/security.mdPersonal commands
Section titled “Personal commands”Commands available across all your projects. These show “(user)” in /help.
Location: ~/.letta/commands/
# Create a personal commandmkdir -p ~/.letta/commandsecho "Explain this code in simple terms:" > ~/.letta/commands/explain.mdArguments
Section titled “Arguments”Pass dynamic values to commands using argument placeholders:
All arguments with $ARGUMENTS
Fix issue #$ARGUMENTS following our coding standardsUsage: /fix-issue 123 high-priority → $ARGUMENTS becomes “123 high-priority”
Positional arguments with $1, $2, etc.
Review PR #$1 with priority $2 and assign to $3Usage: /review-pr 456 high alice → $1=“456”, $2=“high”, $3=“alice”
Dynamic content
Section titled “Dynamic content”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.
File references
Section titled “File references”Include file contents using the @ prefix:
Review the implementation in @src/utils/helpers.js
Compare @src/old-version.js with @src/new-version.jsFrontmatter
Section titled “Frontmatter”Command files support frontmatter for metadata:
| Property | Purpose | Default |
|---|---|---|
description | Brief description shown in /help | First line of prompt |
argument-hint | Arguments expected (shown in autocomplete) | None |
Example:
---description: Review code changes in the current branchargument-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
$ARGUMENTSPriority
Section titled “Priority”Project commands (.commands/) take precedence over global commands (~/.letta/commands/). Custom commands appear in autocomplete alongside built-in commands.
Skills vs slash commands
Section titled “Skills vs slash commands”Use slash commands for
Section titled “Use slash commands for”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”
Use Skills for
Section titled “Use Skills for”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
Key differences
Section titled “Key differences”| Aspect | Slash Commands | Skills |
|---|---|---|
| Complexity | Simple prompts | Complex capabilities |
| Structure | Single .md file | Directory with SKILL.md + resources |
| Context | Injected once when invoked | Pinned to context when loaded |
| Survives compaction | No | Yes |
| Discovery | Explicit (/command) | Agent loads via Skill tool |
| Scope | Project or personal | Project or global |
Example comparison
Section titled “Example comparison”As a slash command:
Review this code for:- Security vulnerabilities- Performance issues- Code style violationsUsage: /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.
See also
Section titled “See also”- Skills - Create comprehensive capabilities with multiple files
- Memory - Manage agent memory blocks
- CLI reference - Command-line options and flags