letta-ai/letta-code/generating-mod-envs
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install letta-ai/letta-code/generating-mod-envsSKILL.md
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
- 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?
- Choose a path:
- Repo example:
docs/examples/mods/learning/<slug>.env.json - Local/private: any user-requested path
- Draft strict JSON. Start from
assets/mod-learning-env.template.jsonif useful. No comments or trailing commas. - Prefer
evaluation.scenarioswith at least:
- happy path
- discrimination/exact-target path
- negative control
- Validate:
If this skill is installed outside the source tree, run the same script from this skill directory: scripts/validate-mod-env.ts.
- If asked to run it:
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 fromslugunless--candidate-file-nameis 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: usestream-jsonwhen 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.promptunless that prompt must run for every scenario. Assertion-only scenarios should haveassertionsand noprompt; only scenarios that require model behavior should definescenario.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
memoryFilesrather 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 loadloaded 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
modApiHintsonly when needed.
Minimal scenario-suite example
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingsrc/skills/builtin/generating-mod-envs/SKILL.md
Popularity
- Repository stars
- 3,109
- Repository forks
- 369
- 7-day trend score
- 40
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/letta-ai/letta-code/generating-mod-envs)