Agent skill

Creating Mods

by letta-ai in letta-ai/letta-code

Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.

Apache-2.0Auto-check passedAgent Workflows

Install Creating Mods

skills CLI
$ npx skills add letta-ai/letta-code --skill creating-mods -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install letta-ai/letta-code creating-mods --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/letta-ai/letta-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/builtin/creating-mods .claude/skills/creating-mods && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
creating-mods
GitHub stars
3.6k
Token cost
~2.5k tokens
SKILL.md length
1,133 words
Files
10 (incl. references)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.

  • Works in 9 steps: Pick the target scope: harness mod file… → Inspect the relevant mods directory for… → Preserve unrelated mod code. Prefer a… → …
  • Asked to make a mod
  • SKILL.md covers Choose where the mod file lives, Choose the right capability, Workflow and Core mod shape, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Creating Mods is an agent skill from letta-ai/letta-code. Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior. Use when asked to make a mod, add an agent-callable tool, add a slash command, add a local provider/model adapter, transform turns, react to app events, or add lightweight mod UI outside the dedicated /statusline flow.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/analysis-mode.md`, `references/architecture.md` and `references/commands.md`).

It sits in Agent Workflows, covering Hooks and plugins. It works with Letta and React. The repository describes itself as: Stateful agents that are like people, with memory, identity, and the ability to learn and adapt. The licence is Apache-2.0.

When your agent uses it

  • Asked to make a mod
  • Add an agent-callable tool
  • Add a slash command
  • Add a local provider/model adapter

Example prompts

  • “Use the creating-mods skill to create and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers…”
  • “/creating-mods”

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Pick the target scope: harness mod file (~/.letta/mods/) by default, or agent mod file ($MEMORY_DIR/mods/) only when the behavior should…
  2. Inspect the relevant mods directory for related files.
  3. Preserve unrelated mod code. Prefer a focused new file if merging would be messy.
  4. Choose the mod shape and load only the needed recipe
  5. For multi-capability or stateful mods, also read references/architecture.md.
  6. Write a single-file mod unless the user asks for something larger.
  7. Return disposers for registered providers/commands/tools/events, timers, subscriptions, and panels that should close on reload.
  8. Do a basic review: valid names, descriptions present, schemas are object schemas, optional capabilities guarded, scoped APIs used, cleanup…
  9. Tell the user the absolute file path changed and to run /reload. If a mod breaks startup or command handling, recover with letta --no-mods…

What it can do on your machine

Read from SKILL.md and the folder at commit d31b879. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Creating Mods loads about 2.5k tokens when it runs, and up to ~22k if it reads all its reference files. Until then it costs about 108 tokens; SKILL.md has 1,133 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~108
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~22k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from letta-ai/letta-code at commit d31b879, republished under its Apache-2.0 licence (© letta-ai). 1,133 words, ~2,469 tokens.

Download SKILL.mdSave it as .claude/skills/creating-mods/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
creating-mods
description
Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior. Use when asked to make a mod, add an agent-callable tool, add a slash command, add a local provider/model adapter, transform turns, react to app events, or add lightweight mod UI outside the dedicated /statusline flow.

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.

LocationUse when
~/.letta/mods/foo.tsThe behavior should apply to local sessions on this machine. Use this by default.
$MEMORY_DIR/mods/foo.tsThe 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 wantsBuild
Agent/model should autonomously call a local capabilityMod tool
User wants /foo to send a prompt or run local UI logicMod command
Slash command represents a reusable agent workflowSkill + thin mod command
Command should work while the main agent is busyCommand with runWhenBusy: true, handled, panel/status, and usually ctx.conversation.fork()
Show transient output above inputPanel, usually from a command
Show small persistent stateStatus value
React to app/session lifecycle or transform outbound turnsEvent
Enforce dynamic allow/ask/deny policy for tool callsPermission overlay
Add a custom model/API provider for local agentsProvider mod (local agents only)
Change the bottom statusline appearanceUse customizing-statusline, not this skill

Default to a tool when the model should decide when to use the capability. Default to a command when the human explicitly invokes it. Compose capabilities when the UX needs it, e.g. command + panel + scoped conversation fork.

Workflow

  1. Pick the target scope: harness mod file (~/.letta/mods/) by default, or agent mod file ($MEMORY_DIR/mods/) only when the behavior should travel with this agent.
  2. Inspect the relevant mods directory for related files.
  3. Preserve unrelated mod code. Prefer a focused new file if merging would be messy.
  4. Choose the mod shape and load only the needed recipe:
    • tools: references/tools.md
    • commands: references/commands.md
    • local custom providers: references/providers.md
    • events: references/events.md
    • permissions: references/permissions.md
    • panels/status/capabilities: references/ui.md
    • complex plan-mode composition: references/plan-mode.md
  5. For multi-capability or stateful mods, also read references/architecture.md.
  6. Write a single-file mod unless the user asks for something larger.
  7. Return disposers for registered providers/commands/tools/events, timers, subscriptions, and panels that should close on reload.
  8. Do a basic review: valid names, descriptions present, schemas are object schemas, optional capabilities guarded, scoped APIs used, cleanup returned.
  9. Tell the user the absolute file path changed and to run /reload. If a mod breaks startup or command handling, recover with letta --no-mods or LETTA_DISABLE_MODS=1 letta.

Core mod shape

ts
export default function activate(letta) {
  const disposers = [];

  if (letta.capabilities.tools) {
    disposers.push(letta.tools.register(/* ... */));
  }

  if (letta.capabilities.commands) {
    disposers.push(letta.commands.register(/* ... */));
  }

  return () => {
    for (const dispose of disposers.reverse()) dispose();
  };
}

Use letta.capabilities for optional behavior:

ts
letta.capabilities.tools
letta.capabilities.commands
letta.capabilities.events.lifecycle
letta.capabilities.events.tools
letta.capabilities.events.turns
letta.capabilities.events.compact
letta.capabilities.events.llm
letta.capabilities.permissions
letta.capabilities.providers
letta.capabilities.ui.panels

Guard each registration on every capability its behavior depends on — not just the one that registers it. Surfaces load different capability subsets, so a registration that relies on another capability (a command that opens UI, emits an event, or calls a provider) must guard on that capability too. Otherwise it is advertised or activated on a host that cannot fulfill it and silently does nothing. Register where the host can actually do the work.

Scoped API model

  • In commands and events, use ctx.conversation for conversation operations:
    • ctx.conversation.getHistory() for recent messages
    • ctx.conversation.fork() for independent/background model work
    • forked.sendMessageStream([...]) to stream from a fork
  • In tools, use ctx.conversation.getHistory() when the tool needs recent context.
  • Use letta.client only for server-specific Letta API calls; do not use it as a substitute for scoped conversation helpers.
  • Do not import @/backend, @/cli, or other Letta Code internals from mod files.
Show full SKILL.md (450 more words)Show less

Diagnostics

Use letta.diagnostics.report({ message, severity }) sparingly as a debug utility for mod setup/runtime problems an agent should inspect, such as missing required environment variables or failed local configuration. Default severity is "error"; use severity: "warning" only for optional/degraded behavior. Keep messages short and actionable, and do not dump routine logs or large state.

Agents can inspect local mod diagnostics at:

text
~/.letta/mods/diagnostics/latest.json

Rules

  • Do not create project mods.
  • Custom provider mods are local-backend/local-agent only. They do not add providers for agents managed through the Letta API.
  • Provider mods may run in a provider-only listener context; keep provider registration independent from commands/tools/UI and guard everything else.
  • Direct mod files should not assume third-party npm packages are available. Use Node/Bun built-ins unless packaging is explicitly requested.
  • Do not do surprising side effects on startup; mods activate on app start and /reload.
  • Keep user-facing output short and intentional.
  • Prefer Node/Bun standard APIs (node:child_process, node:fs, etc.) for local work.
  • For shell execution, prefer execFile/spawn over shell strings.
  • Do not use emojis for loading states; use text or spinner-like characters if the user asks for loading UI.
  • For runWhenBusy: true, do not return prompt; return handled and own the UI/background work.
  • Treat turn_start as powerful trusted code: keep transforms narrow and unsurprising.

Pre-flight checklist for complex mods

Before finishing, verify:

  • The mod has one clear owner/file and does not mix unrelated features.
  • Command/tool IDs are valid; command overrides of built-ins are intentional, and tool IDs do not collide with built-ins.
  • Tool descriptions explain when the model should call them.
  • JSON schemas are object schemas with useful descriptions.
  • Optional UI/event APIs are capability-guarded.
  • Each registration is guarded by every capability its behavior depends on, not just the one that registers it, so it isn't advertised or activated on a surface that can't fulfill it.
  • Provider mods are capability-guarded and clearly documented as local-agent only.
  • Timers, intervals, event registrations, and panels are cleaned up in a disposer.
  • Busy commands return { type: "handled" } quickly and avoid main-conversation sends.
  • Conversation work uses ctx.conversation or forked handles, not app internals.
  • Local shell/file work is scoped to ctx.cwd unless intentionally global.
  • Errors shown to the user are short and actionable.

References

ReferenceLoad when
references/tools.mdThe model should autonomously call a local capability
references/commands.mdThe human should invoke /foo
references/providers.mdAdding a custom model/API provider for local agents
references/events.mdReacting to lifecycle/tool/turn events or transforming turns/tools
references/permissions.mdEnforcing dynamic tool allow/ask/deny policy before approval/execution
references/ui.mdPanels (including order-0 statusline and order-1 dreaming indicator) or ui.panels capability guards are involved
references/plan-mode.mdRecreating plan mode with commands, tools, events, permissions, and local state
references/analysis-mode.mdPhrase-triggered diagnostic mode with turn reminders (simpler than plan-mode)
references/architecture.mdMultiple capabilities, local state, cleanup, background model work, or non-trivial composition

© letta-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in src/skills/builtin/creating-mods of letta-ai/letta-code.

  • SKILL.md
  • references/analysis-mode.md
  • references/architecture.md
  • references/commands.md
  • references/events.md
  • references/permissions.md
  • references/plan-mode.md
  • references/providers.md
  • references/tools.md
  • references/ui.md

Open the folder on GitHubat commit d31b879

Compare with similar skills

Creating Mods next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Creating Mods compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Creating Mods this skillletta-ai/letta-code3.6k—~2.5kAutomated safety check: PassApache-2.0
Plate Plugin Creatorudecode/plate17k—~2.3kAutomated safety check: PassCustom licence
Knowledge Interaction Surfaces Terminal UIechoVic/blade-code181—~1.5kAutomated safety check: PassMIT
Create Opencode PluginIgorWarzocha/Opencode-Workflows122—~2.4kAutomated safety check: PassNone
Tsh Writing HooksTheSoftwareHouse/copilot-collections284—~3kAutomated safety check: PassMIT
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0

Similar skills

  • Build new Plate plugins with Slate-first architecture, sane typing, and explicit React/Plate wrapper boundaries.

    17k GitHub stars~2.3k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • 覆盖 Blade React + Ink TUI 的初始化、输入协议、消息与工具渲染、确认队列、Session 切换、流式缓冲和 Runtime 清理。进入时机:修改终端键盘行为、粘贴、Ctrl+C、审批与 问答、流式输出、Static 布局、会话恢复或 slash command 展示。

    181 GitHub stars~1.5k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Create Opencode Plugin

    IgorWarzocha/Opencode-Workflows

    Create OpenCode plugins using the @opencode-ai/plugin SDK. An agent skill from IgorWarzocha/Opencode-Workflows.

    122 GitHub stars~2.4k tokensUpdated 8 mo ago
    DevelopmentAuto-check passed
  • Tsh Writing Hooks

    TheSoftwareHouse/copilot-collections

    Custom hook and composable patterns — naming, composition, stable return shapes, lifecycle cleanup, and testing strategies.

    284 GitHub stars~3k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed

More from letta-ai/letta-code

All 25 skills in this repo
  • Creating Skills

    letta-ai/letta-code

    Guide for creating effective skills. An agent skill from letta-ai/letta-code.

    3.6k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Generating Mod Envs

    letta-ai/letta-code

    Generates and reviews mod learning env JSON files for Letta Code local mods.

    3.6k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Initializing Memory

    letta-ai/letta-code

    Comprehensive guide for initializing or reorganizing agent memory.

    3.6k GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Self Configuration

    letta-ai/letta-code

    Inspect or modify Letta Code's own memory, model, context window, system prompt, compaction, permissions, toolsets, mods, skills, channels, schedules, agent secrets, and local runtime settings.

    3.6k GitHub stars~7k tokensUpdated today
    Auto-check passed
  • Browser Use

    letta-ai/letta-code

    Control a real browser to navigate pages, click, type, fill forms, inspect rendered UI, take screenshots, or record video.

    3.6k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Customizing Statusline

    letta-ai/letta-code

    Creates, edits, and migrates Letta Code statusline mods. An agent skill from letta-ai/letta-code.

    3.6k GitHub stars~834 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Creating Mods

What does Creating Mods do?

Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior. Creating Mods is an agent skill from letta-ai/letta-code. Creates and edits trusted local Letta Code mods, including tools, slash commands, local-only model providers, lifecycle/turn events, scoped conversation helpers, panels, and capability-gated behavior.

When should I use Creating Mods?

Creating Mods fits situations like: asked to make a mod; add an agent-callable tool; add a slash command; add a local provider/model adapter.

How do I install Creating Mods in Claude Code?

Run `npx skills add letta-ai/letta-code --skill creating-mods -a claude-code`. Or copy the skill folder (src/skills/builtin/creating-mods in letta-ai/letta-code) into .claude/skills/creating-mods in your project. Claude Code loads it when a task matches its description.

How do I install Creating Mods in Codex?

Run `npx skills add letta-ai/letta-code --skill creating-mods -a codex`. Or copy the skill folder (src/skills/builtin/creating-mods in letta-ai/letta-code) into .agents/skills/creating-mods in your project. Codex loads it when a task matches its description.

Can I use Creating Mods in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add letta-ai/letta-code --skill creating-mods -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/creating-mods, .gemini/skills/creating-mods, .github/skills/creating-mods and .opencode/skills/creating-mods in your project.

What does Creating Mods need to run?

SKILL.md names no scripts, command-line tools or credentials: Creating Mods is instructions for the agent only.

Does Creating Mods access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Creating Mods safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Creating Mods use?

Creating Mods is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Creating Mods use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 19k tokens, read only when the agent opens those files.

What are the alternatives to Creating Mods?

Skills that share tags, products or a category with Creating Mods: Plate Plugin Creator (udecode/plate, 17k stars), Knowledge Interaction Surfaces Terminal UI (echoVic/blade-code, 181 stars), Create Opencode Plugin (IgorWarzocha/Opencode-Workflows, 122 stars) and Tsh Writing Hooks (TheSoftwareHouse/copilot-collections, 284 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Creating Mods?

letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,562 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 10, 2026.

Source: letta-ai/letta-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.