Agent Native

generating-mod-envs

This skill generates and validates JSON configuration files for Letta Code mod learning environments, used with the `/mods learn` command to teach mods new…

by LettaOfficial publisherNot reviewed

Identity proven by GitHub's verified organisation badge (letta-ai)

Agents
Claude Code
License
Apache-2.0 (permissive)
Pin
c1033d9pinned Oct 9, 2026
Context cost
about 1,400 tokenswhen the skill loads
GitHub stars
3,549on letta-ai/letta-code
Scripts
1 script

What it does

“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.”
The author's description, from SKILL.md

Generated summary from the skill's own text

This skill generates and validates JSON configuration files for Letta Code mod learning environments, used with the `/mods learn` command to teach mods new behaviors. It helps design evaluation scenarios with assertions, memory fixtures, and sentinel markers that distinguish successful mod behavior from no-op implementations. The skill includes a template, validation script, and guidance on scenario design patterns like happy paths, negative controls, and discrimination tests.

When to use it

  • Creating learning environments to train mods on new behaviors or tool integrations
  • Designing evaluation suites with multiple scenarios and marker-based assertions
  • Validating JSON configs before running mod learning harness commands
  • Setting up negative controls and discrimination tests for robust mod evaluation

When not to

  • Running mod learning directly without environment configuration files
  • Implementing the mod code itself rather than designing its evaluation environment
  • Testing mods with manual ad-hoc commands instead of structured scenario suites

Install

These commands install from the publisher's repository and need no account.

skills CLI

npx skills add letta-ai/letta-code --skill generating-mod-envs

Installs from the repository's default branch, which may have changed since the commit we checked.

GitHub CLI 2.90 or later

gh skill install letta-ai/letta-code generating-mod-envs@c1033d9f7e8863a869cd2031805cfd2c66c165b9

Installs the commit we checked (c1033d9).

Copy by hand

Download the folder at c1033d9 and put it in .claude/skills/generating-mod-envs for Claude Code and in .agents/skills/generating-mod-envs for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.

Skill folder on GitHub at c1033d9

Copy for your agent

A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.

Prompt

Install the agent skill "generating-mod-envs" by Letta.

Source, pinned to commit c1033d9f7e8863a869cd2031805cfd2c66c165b9:
https://github.com/letta-ai/letta-code/tree/c1033d9f7e8863a869cd2031805cfd2c66c165b9/src/skills/builtin/generating-mod-envs

1. Download that folder at exactly this commit. Do not use the default branch.
2. Copy every file unchanged, keeping the folder structure, into .claude/skills/generating-mod-envs/ for Claude Code and .agents/skills/generating-mod-envs/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist.
3. Do not edit the files, and do not run any script in the folder unless I ask you to.
4. When you are done, list the files you copied and where you put them.

Listing and checks: https://www.agentnative.dev/skills/letta/generating-mod-envs

SKILL.md at the pin

---
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`.

6. 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.

## 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"]
      }
    ]
  }
}
```

From letta-ai/letta-code at c1033d9, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.

View SKILL.md on GitHub at c1033d9

Files

3 files, 16 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.

Skill folder on GitHub at c1033d9
All 50 skills from Letta

More from Letta

  • acquiring-skills

    Enables the agent to discover and install skills from multiple registries including Hermes Skills Hub, ClawHub, GitHub, and community repositories.

    Agents not labelled yet · about 3.1K tokens · pinned 6 days ago

  • browser-use

    Control a real browser using Chrome DevTools Protocol over WebSocket to navigate pages, interact with UI, fill forms, scrape sites, and capture screenshots or…

    Claude Code, Codex, Cursor +4 · about 3.2K tokens · pinned 6 days ago

  • Context Doctor

    Context Doctor investigates and repairs an agent's context including memory, system prompt, and skills by analyzing observed behavior as evidence.

    Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 6 days ago

  • creating-mods

    This skill creates and edits mod files that extend local Letta instances with tools, slash commands, event handlers, custom model providers, permissions, and…

    Claude Code, Codex, Cursor +4 · about 2.4K tokens · pinned 6 days ago

  • creating-skills

    This skill guides developers in creating modular packages that extend Letta Code agent capabilities with specialized knowledge, workflows, tool integrations…

    Contains scripts

    Claude Code, Codex, Cursor +3 · about 4.5K tokens · pinned 6 days ago

  • curating-memory-palace

    This skill lets the agent maintain a Memory Palace, a structured dashboard view that shows the user what the agent is working on, what it could do next, and…

    Agents not labelled yet · about 3.1K tokens · pinned 6 days ago

All AI and agents skills
  • agent-builder

    Agent Builder orchestrates the creation, modification, testing, and publishing of n8n Agents.

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.3K tokens · pinned 6 days ago

  • intent-recognition

    Classifies automation requests by determining which primitive owns the top-level control flow (workflow, agent, needs clarification, or out-of-scope) and…

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +4 · about 6.9K tokens · pinned 6 days ago

  • planned-task-runtime

    This skill manages follow-up interactions with a background task execution system, handling task completion synthesis, failure replanning, workflow building…

    by n8nOfficial publisher

    Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 6 days ago

  • skill-creator

    This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.

    by GoogleOfficial publisher

    Contains scripts

    Gemini CLI · about 5K tokens · pinned 6 days ago

  • -21risk-automation

    This skill automates 21risk operations by connecting to the 21risk toolkit through Composio's Rube MCP server.

    by ComposioOfficial publisher

    Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 6 days ago

  • -2chat-automation

    This skill automates 2chat tasks by integrating with Composio's 2chat toolkit through Rube MCP.

    by ComposioOfficial publisher

    Agents not labelled yet · about 680 tokens · pinned 6 days ago

Open roles at Letta

4 open roles on the jobs board

The skills listed here are third-party software, collected from public GitHub repositories as a catalog of recent skills and provided as is. Agent Native does not write or control them and is not responsible for any harm, loss or damage caused by installing or using them. Labels and checks describe what we saw at one commit and are not a guarantee. Read a skill's files before you run it. Terms of use