generating-mod-envs

generating-mod-envs is a skill for Claude Code from letta-ai/letta-code. It costs 79 tokens per session (1,412 once invoked), scanned A, original, Apache-2.0.

A tool for creating and checking JSON files that teach a local coding-agent add-on how to behave. The files describe the behavior to learn and the test scenarios used to score it.

In plain words
What is it for?
Use it to draft, validate, improve, and explain learning environments for `/mods learn --env`, including evaluation scenarios and success markers.
Why use it?
It makes the learning setup explicit and testable instead of relying on vague instructions. It also checks that scenarios include successful cases, exact-target checks, and negative controls where appropriate.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to draft, validate, improve, and explain learning environments for /mods learn --env, including evaluation scenarios and success markers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/letta-ai/letta-code/generating-mod-envs
About the project

letta-ai/letta-code is an agent harness for building assistants that retain memory, identity, and experience across interactions instead of treating each task as isolated. Developers use it through local, desktop, browser, or messaging interfaces for interactive or continuously running agents, and its catalogue entries configure the agents' skills, instructions, rules, and behavior.

letta-ai/letta-code · 3,935 stars · on GitHub · letta.com

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.

Any agent
npx skills add letta-ai/letta-code --skill generating-mod-envs
Clone the repo
git clone --depth 1 https://github.com/letta-ai/letta-code

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generating-mod-envs

README.md
[![agentmods](https://agentmods.dev/badge/skills/letta-ai/letta-code/generating-mod-envs/github.svg)](https://agentmods.dev/skills/letta-ai/letta-code/generating-mod-envs)
Your own site
<a href="https://agentmods.dev/skills/letta-ai/letta-code/generating-mod-envs"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/generating-mod-envs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for generating-mod-envs

Your own site · 80×15
<a href="https://agentmods.dev/skills/letta-ai/letta-code/generating-mod-envs"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/generating-mod-envs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,412 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 98
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00079 $0.01412
Opus 5.5 $0.00032 $0.00565
Sonnet 5.5 $0.00016 $0.00282
Haiku 4.5 $0.00008 $0.00141

Measured 3mo ago against content hash bfac6f1c460b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

generating-mod-envs scanned grade A with 0 findings 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 3mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate-mod-env.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/builtin/generating-mod-envs/SKILL.md · 131 lines

How it starts

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

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:
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:
/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.

Read the full file on GitHub · 131 lines

Files

What ships with it

2 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. 3mo ago First seen · 131 lines · 79 tokens per session scan A bfac6f1c460b

Subscribe to this mod's changes

generating-mod-envs is a skill published in the GitHub repository letta-ai/letta-code (3,935 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 1,412 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

generating-mod-envs compared with skills from other repositories

generating-mod-envs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
generating-mod-envsletta-ai/letta-codeSkill3.9ktodayApache-2.0A79Claude Code
agent-code-analyzerruvnet/rufloSkill83ktodayMITA19Claude Code
worker-integrationruvnet/rufloSkill83ktodayMITA14Claude Code
eval-dataset-designbojieli/ai-agent-bookSkill60kyesterdayApache-2.0A138Claude Code, Codex
memory-systembojieli/ai-agent-bookSkill60kyesterdayApache-2.0A95Claude Code, Codex
writingbojieli/ai-agent-bookSkill60kyesterdayApache-2.0A27Claude Code, Codex
memory-recallzilliztech/memsearchSkill3.0k3d agoMITA152Claude Code