Agent skill

Generating Mod Envs

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

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

Apache-2.0Auto-check passed

Install Generating Mod Envs

skills CLI
$ npx skills add letta-ai/letta-code --skill generating-mod-envs -a claude-code

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

GitHub CLI
$ gh skill install letta-ai/letta-code generating-mod-envs --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/generating-mod-envs .claude/skills/generating-mod-envs && 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
generating-mod-envs
GitHub stars
3.6k
Token cost
~1.5k tokens
SKILL.md length
474 words
Files
3 (incl. scripts, assets)
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

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

  • Works in 5 steps: Define the behavior and eval before… → Choose a path → Draft strict JSON. Start from… → …
  • Optimize a mod behavior
  • SKILL.md covers Workflow, Env shape, Quality rules and Minimal scenario-suite example
  • Runs TypeScript scripts from its folder; calls bun

What it does

Generating Mod Envs is an agent skill from letta-ai/letta-code. Generates and reviews mod learning env JSON files for Letta Code local mods. Use when asked to teach, learn, or optimize a mod behavior; create, draft, validate, improve, or explain envs for /mods learn --env; or design evaluation scenarios, memory fixtures, requiredResultMarkers, requiredTraceMarkers, negative controls, and candidate diversity hints.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts and assets (for example `assets/mod-learning-env.template.json` and `scripts/validate-mod-env.ts`).

It works with Letta. 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

  • Optimize a mod behavior
  • Explain envs for /mods learn --env
  • Design evaluation scenarios
  • Memory fixtures

Example prompts

  • “Use the generating-mod-envs skill to generate and reviews mod learning env JSON files for Letta Code local mods”
  • “/generating-mod-envs”

Requirements

  • Node.js

Workflow steps

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

  1. Define the behavior and eval before writing JSON.
  2. Choose a path
  3. Draft strict JSON. Start from assets/mod-learning-env.template.json if useful. No comments or trailing commas.
  4. Prefer evaluation.scenarios with at least
  5. Validate

What it can do on your machine

Read from SKILL.md and the folder at commit 253a3bc. 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

    Ships 1 file in scripts/ (TypeScript), which the agent can run.

    Shell commands in SKILL.md call:

    • bun

    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

Generating Mod Envs loads about 1.5k tokens when it runs. Until then it costs about 94 tokens; SKILL.md has 474 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~94
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from letta-ai/letta-code at commit 253a3bc, republished under its Apache-2.0 licence (© letta-ai). 474 words, ~1,533 tokens.

Download SKILL.mdSave it as .claude/skills/generating-mod-envs/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
generating-mod-envs
description
Generates and reviews mod learning env JSON files for Letta Code local mods. Use when asked to teach, learn, or optimize a mod behavior; create, draft, validate, improve, or explain envs for `/mods learn --env`; or design evaluation scenarios, memory fixtures, requiredResultMarkers, requiredTraceMarkers, negative controls, and candidate diversity hints.
disable-model-invocation
true
user-invocable
true

Generating mod learning envs

Use this skill to create JSON envs consumed by /mods learn --env=<path> or bun scripts/mod-learning/learn-mod.ts --env <path>. An env describes the mod behavior to learn and the scenario-suite eval used to score candidates.

Workflow

  1. Define the behavior and eval before writing JSON.
    • What should the mod do? Tool, turn event, tool event, provider, command, status, etc.
    • What would a placebo/no-op mod fail?
    • What unique sentinel strings make success unambiguous?
  2. Choose a path:
    • Repo example: docs/examples/mods/learning/<slug>.env.json
    • Local/private: any user-requested path
  3. Draft strict JSON. Start from assets/mod-learning-env.template.json if useful. No comments or trailing commas.
  4. Prefer evaluation.scenarios with at least:
    • happy path
    • discrimination/exact-target path
    • negative control
  5. Validate:
bash
bun src/skills/builtin/generating-mod-envs/scripts/validate-mod-env.ts path/to/env.json

If this skill is installed outside the source tree, run the same script from this skill directory: scripts/validate-mod-env.ts.

  1. If asked to run it:
text
/mods learn --env=path/to/env.json --model=auto --backend=api --out=/tmp/<slug>-learn

The raw scripts/mod-learning/learn-mod.ts dev script detaches by default. Add --foreground only when a blocking pass/fail exit code is needed.

Use single-line --flag=value commands for TUI instructions.

Env shape

Required top-level fields:

  • name: human display name.
  • slug: stable kebab-case run/candidate slug.
  • objective: one-paragraph target for the generation agent.
  • requirements: concrete pass/fail behavior constraints.
  • evaluation: either a single prompt eval or a scenario suite.

Common optional fields:

  • targetModName: display metadata for the intended mod filename. The harness still chooses the candidate filename from slug unless --candidate-file-name is passed.
  • candidateDiversityHints: strategies assigned across multi-candidate runs.
  • modApiHints: concise API reminders that prevent bad generated code.
  • examples: small input/expected demos for the generation prompt.

Evaluation fields:

  • evaluation.outputFormat: use stream-json when checking trace markers.
  • evaluation.timeoutMs, evaluation.maxTurns: per-scenario defaults.
  • evaluation.memoryFiles: files seeded under eval $MEMORY_DIR.
  • evaluation.scenarios[]: scenario-specific overrides and fixtures.
  • In scenario-suite envs, do not add a top-level evaluation.prompt unless that prompt must run for every scenario. Assertion-only scenarios should have assertions and no prompt; only scenarios that require model behavior should define scenario.prompt.
  • requiredResultMarkers: literal strings required in the final answer.
  • requiredTraceMarkers: literal strings required in raw stdout/stderr.
  • forbiddenResultMarkers: final-answer strings that fail the run.
  • forbiddenTraceMarkers: raw trace strings that fail the run.
Show full SKILL.md (140 more words)Show less

Quality rules

  • Design the eval first. A useful env distinguishes success from a no-op mod.
  • Use unique sentinels, e.g. MY-MOD-CANARY-OK, not common phrases.
  • Seed memoryFiles rather than depending on real user memory or repo files.
  • Include negative controls for non-use. If behavior should be conditional, verify it stays silent when not triggered.
  • Include discrimination scenarios when paths, IDs, or sources matter. Put a tempting wrong sentinel in an irrelevant fixture and forbid it in the final answer.
  • Put load failures in forbiddenTraceMarkers, usually:
    • [mods] failed to load
    • [extensions] failed to load
    • loaded 0 mod(s)
    • loaded 0 extension(s)
  • For eval-facing tools, require requiresApproval: false, parallelSafe: true, and a strict no-argument schema when applicable.
  • Avoid over-brittle trace markers. Prefer stable substrings like the tool name plus "message_type":"tool_return_message".
  • Keep requirements behavioral; put fragile implementation details in modApiHints only when needed.

Minimal scenario-suite example

json
{
  "name": "Hello tool mod learner demo",
  "slug": "hello-tool",
  "objective": "Learn a trusted local mod that registers a read-only hello_mod_ping tool returning a fixed sentinel.",
  "requirements": [
    "Register a tool named hello_mod_ping.",
    "The tool must accept no parameters, require no approval, be parallelSafe, and return the exact string HELLO-MOD-OK."
  ],
  "candidateDiversityHints": [
    "Use the smallest possible tool-only implementation.",
    "Add explicit defensive checks around the tool schema."
  ],
  "modApiHints": [
    "Use export function activate(letta) or a default export.",
    "Use letta.tools.register({ name, description, parameters, requiresApproval, parallelSafe, run }).",
    "A no-argument tool schema is { \"type\": \"object\", \"properties\": {}, \"additionalProperties\": false }."
  ],
  "evaluation": {
    "outputFormat": "stream-json",
    "timeoutMs": 900000,
    "maxTurns": 6,
    "forbiddenTraceMarkers": ["[mods] failed to load", "loaded 0 mod(s)"],
    "scenarios": [
      {
        "name": "happy-path",
        "prompt": "Call the hello_mod_ping tool, then answer with the exact text HELLO-MOD-OK.",
        "requiredResultMarkers": ["HELLO-MOD-OK"],
        "requiredTraceMarkers": ["hello_mod_ping", "\"message_type\":\"tool_return_message\""]
      },
      {
        "name": "negative-control",
        "prompt": "Answer without calling tools: what is 2 + 2?",
        "requiredResultMarkers": ["4"],
        "forbiddenTraceMarkers": ["hello_mod_ping"]
      }
    ]
  }
}

© 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 2 other files (scripts, assets) in src/skills/builtin/generating-mod-envs of letta-ai/letta-code.

  • SKILL.md
  • assets/mod-learning-env.template.json
  • scripts/validate-mod-env.ts

Open the folder on GitHubat commit 253a3bc

Compare with similar skills

Generating Mod Envs 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.

Generating Mod Envs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generating Mod Envs this skillletta-ai/letta-code3.6k—~1.5kAutomated safety check: PassApache-2.0
Lettabotletta-ai/lettabot327—~3.4kAutomated safety check: PassApache-2.0
Creating Letta Code Channelsletta-ai/skills149—~1.1kAutomated safety check: PassMIT
Letta Configurationletta-ai/skills149—~1.3kAutomated safety check: NotesMIT
Letta Filesystem To Memfsletta-ai/skills149—~1.3kAutomated safety check: PassMIT
Navigating Chatgpt Historyletta-ai/skills149—~1.3kAutomated safety check: PassMIT

Similar skills

  • Lettabot

    letta-ai/lettabot

    Set up and run LettaBot - a multi-channel AI assistant for Telegram, Slack, Discord, WhatsApp, and Signal.

    327 GitHub stars~3.4k tokensUpdated 4 mo ago
    Productivity & AutomationAuto-check passed
  • Builds and debugs Letta Code channels, including first-party channel adapters and dynamic user channel plugins under ~/.letta/channels.

    149 GitHub stars~1.1k tokensUpdated 8 days ago
    Writing & ContentAuto-check passed
  • Letta Configuration

    letta-ai/skills

    Configure LLM models and providers for Letta agents and servers.

    149 GitHub stars~1.3k tokensUpdated 8 days ago
    DevOps & CloudAuto-check: notes
  • Migrates deprecated Letta Filesystem folders/files to MemFS using markdown document corpora, chunking, local lexical search, and QMD semantic search via the memfs-search skill.

    149 GitHub stars~1.3k tokensUpdated 8 days ago
    Documents & OfficeAuto-check passed
  • Navigates archived ChatGPT or Claude-style conversation exports and a MemFS reference archive on demand.

    149 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Self Configuration

    letta-ai/skills

    Configures Letta agents' own runtime behavior, including model, context window, system prompt, reasoning, conversation overrides, compaction settings, and compaction prompts.

    149 GitHub stars~2.4k tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-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
  • 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
  • Creating Mods

    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.

    3.6k GitHub stars~2.5k 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

Questions about Generating Mod Envs

What does Generating Mod Envs do?

Generates and reviews mod learning env JSON files for Letta Code local mods. Generating Mod Envs is an agent skill from letta-ai/letta-code. Generates and reviews mod learning env JSON files for Letta Code local mods.

When should I use Generating Mod Envs?

Generating Mod Envs fits situations like: optimize a mod behavior; explain envs for /mods learn --env; design evaluation scenarios; memory fixtures.

How do I install Generating Mod Envs in Claude Code?

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

How do I install Generating Mod Envs in Codex?

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

Can I use Generating Mod Envs 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 generating-mod-envs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generating-mod-envs, .gemini/skills/generating-mod-envs, .github/skills/generating-mod-envs and .opencode/skills/generating-mod-envs in your project.

What does Generating Mod Envs need to run?

Going by SKILL.md and its folder, Generating Mod Envs needs TypeScript for the scripts in its folder and the command-line tools its instructions call (bun). Our summary lists: Node.js.

Does Generating Mod Envs 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 Generating Mod Envs 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Generating Mod Envs use?

Generating Mod Envs 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 Generating Mod Envs use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generating Mod Envs?

Skills that share tags, products or a category with Generating Mod Envs: Lettabot (letta-ai/lettabot, 327 stars), Creating Letta Code Channels (letta-ai/skills, 149 stars), Letta Configuration (letta-ai/skills, 149 stars) and Letta Filesystem To Memfs (letta-ai/skills, 149 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generating Mod Envs?

letta-ai (a GitHub organization) maintains it in letta-ai/letta-code, which has 3,552 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 9, 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.