creating-mods

A guide for creating trusted local Letta Code add-ons, called mods, using the mod interfaces. These add-ons can extend conversations, commands, tools, events, models, and parts of the interface.

In plain words
What is it for?
It is for building agent-callable tools, slash commands, local model providers, lifecycle handlers, conversation helpers, and optional panels.
Why use it?
It helps developers add capabilities without depending on private application internals. It also explains where a mod should live and which environments support each kind of extension.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/letta-ai/letta-code/creating-mods
Any agent
npx skills add letta-ai/letta-code --skill creating-mods
Clone the repo
git clone --depth 1 https://github.com/letta-ai/letta-code

Made for: Claude Code, Codex.

Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,149 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00090 $0.02149
Opus 5 $0.00045 $0.01074
Sonnet 5 $0.00018 $0.00430
Haiku 4.5 $0.00009 $0.00215

Measured yesterday against content hash 0e2521f612b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

creating-mods scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Prefer Node/Bun standard APIs (`node:child_process`, `node:fs`, etc.) for local work.
src/skills/builtin/creating-mods/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating Mods

Use this skill to create or update trusted Letta Code mod files. Mods are trusted local code that add small composable capabilities through mod APIs, not by importing app internals. Dynamic agent/conversation/workspace/model state is passed as ctx to tool, command, event, and permission callbacks (panels receive live agent/model in their render context); do not read mutable global context for model-callable behavior. Prefer scoped handles (ctx.conversation, ctx.cwd, ctx.agent) and guard optional UI with letta.capabilities.

Capabilities vary by surface — not every surface loads every capability. The TUI/headless host can load tools, commands, events, UI, and providers; the desktop listener loads tools, commands, providers, and tool/turn events, but not panel UI. Always guard each registration on the capabilities its behavior needs.

Choose where the mod file lives

Default to a single mod file unless the user asks for something larger.

Location Use when
~/.letta/mods/foo.ts The behavior should apply to local sessions on this machine. Use this by default.
$MEMORY_DIR/mods/foo.ts The behavior should travel with one agent's MemFS/memory.

Do not create project mods.

Packaging is an upgrade path, not the default authoring path. If the user asks to share, publish, distribute, or use third-party package dependencies, first build a working mod file, then use letta mods package <mod-file> --name <package-name>. Package install/update/download/publish details belong outside this skill.

Choose the right capability

User wants Build
Agent/model should autonomously call a local capability Mod tool
User wants /foo to send a prompt or run local UI logic Mod command
Slash command represents a reusable agent workflow Skill + thin mod command
Command should work while the main agent is busy Command with runWhenBusy: true, handled, panel/status, and usually ctx.conversation.fork()
Show transient output above input Panel, usually from a command
Show small persistent state Status value
React to app/session lifecycle or transform outbound turns Event
Enforce dynamic allow/ask/deny policy for tool calls Permission overlay
Add a custom model/API provider for local agents Provider mod (local agents only)
Change the bottom statusline appearance Use customizing-statusline, not this skill

Read the full file on GitHub · 162 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 162 lines · 90 tokens per session scan A 0e2521f612b8

Subscribe to this mod's changes

creating-mods is a skill published in the GitHub repository letta-ai/letta-code (3,156 stars, last pushed 2d ago), licensed Apache-2.0. It adds 90 tokens to every session and 2,149 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

writing

将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.

bojieli/ai-agent-book · 27 tokens

kayba-stage-7-fixer

Implement the approved fixes from the action plan and log all changes. Trigger when the user says "run stage 7", "implement fixes", "apply action plan", or when invoked by the kayba-pipeline orchestrator. Requires eval/actionplan.md to exist.

kayba-ai/agentic-context-engine · 61 tokens

memory-recall

Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…

zilliztech/memsearch · 149 tokens

food-order

Reorder previous Foodora orders, preview cart contents, and track delivery ETA/status with ordercli. Use when the user wants to reorder food, check delivery status, or browse recent Foodora order history. Never confirm an order without explicit user approval.

Bitterbot-AI/bitterbot-desktop · 53 tokens

regex-mastery

Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.

alibaba/anolisa · 60 tokens

ws-ckpt

工作区快照管理。用户说"保存一下"、"存个快照"时创建 checkpoint,仅限 Linux; 说"回滚"、"撤销"、"恢复到之前"时 rollback;说"删掉快照"时 delete; 说"对比快照"、"快照改了什么"时 diff; 说"看看快照"、"有哪些快照"时 list;说"查看快照状态"、"查看快照剩余空间"时 status。.

alibaba/anolisa · 115 tokens