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.
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.
npx agentmods add skills/letta-ai/letta-code/generating-mod-envsnpx skills add letta-ai/letta-code --skill generating-mod-envsgit clone --depth 1 https://github.com/letta-ai/letta-codeWrote 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.
[](https://agentmods.dev/skills/letta-ai/letta-code/generating-mod-envs)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00079 | $0.01412 |
| Opus 5 | $0.00039 | $0.00706 |
| Sonnet 5 | $0.00016 | $0.00282 |
| Haiku 4.5 | $0.00008 | $0.00141 |
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 5d ago.
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.
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
- 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
- Repo example:
- 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:
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.
- 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 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.
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.
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.
- 5d ago First seen · 131 lines · 79 tokens per session scan A bfac6f1c460b
generating-mod-envs is a skill published in the GitHub repository letta-ai/letta-code (3,207 stars, last pushed today), licensed Apache-2.0. It adds 79 tokens to every session and 1,412 once invoked, about $0.0004 per session on Opus 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.
Other skills, from other repositories
writing
将共享历史中的已验证事实和计算结果整理成符合受众、格式与长度约束的成稿。.
kayba-stage-7-fixer
Implement the approved fixes from the action plan and log all changes. Trigger when the user says "run stage 7", "implement fixes", "apply action plan", or when invoked by the kayba-pipeline orchestrator. Requires eval/actionplan.md to exist.
regex-mastery
Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.
ws-ckpt
工作区快照管理。用户说"保存一下"、"存个快照"时创建 checkpoint,仅限 Linux; 说"回滚"、"撤销"、"恢复到之前"时 rollback;说"删掉快照"时 delete; 说"对比快照"、"快照改了什么"时 diff; 说"看看快照"、"有哪些快照"时 list;说"查看快照状态"、"查看快照剩余空间"时 status。.
memory-recall
Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…
food-order
Reorder previous Foodora orders, preview cart contents, and track delivery ETA/status with ordercli. Use when the user wants to reorder food, check delivery status, or browse recent Foodora order history. Never confirm an order without explicit user approval.