Creating Mods logo

Creating Mods

OrganizationPopular
letta-ai
creating-mods

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.

Overview

Publisherletta-ai
Repositoryletta-code
Skill namecreating-mods
Stars
3.4K
Forks
411
Bundled files
9
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 9 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by letta-ai on GitHub. Read the source before you install it.

Installation

Install the Creating Mods AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/letta-ai/letta-code.git /tmp/letta-code
mkdir -p .claude/skills
cp -r /tmp/letta-code/src/skills/builtin/creating-mods .claude/skills/creating-mods
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Creating Mods in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Creating Mods on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Creating Mods is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Creating Mods AI skill 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. 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.

Why use Creating Mods on TypingMind?

Because you install it once and use it with any model. Creating Mods is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Creating Mods in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/creating-mods. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Creating Mods?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Creating Mods?

As many as you like. As long as a model supports skills, you can use Creating Mods with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Creating Mods AI skill free?

Yes. It is published on GitHub by letta-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇