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.
git clone --depth 1 https://github.com/HermeticOrmus/LibreEmbed-Claude-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/commands/hermeticormus/libreembed-claude-code/memory)<a href="https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/memory"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/memory/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.
<a href="https://agentmods.dev/commands/hermeticormus/libreembed-claude-code/memory"><img src="https://agentmods.dev/badge/commands/hermeticormus/libreembed-claude-code/memory.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00026 | $0.00936 |
| Opus 5.5 | $0.00010 | $0.00374 |
| Sonnet 5.5 | $0.00005 | $0.00187 |
| Haiku 4.5 | $0.00003 | $0.00094 |
Grade A, and why
memory 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 2mo 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 — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/memory
Memory management command: pool allocators, stack sizing, heap analysis, MPU protection.
Trigger
/memory <action> [options]
Actions
analyze
Analyze memory usage from a map file or ELF.
/memory analyze --elf firmware.elf
/memory analyze --map firmware.map --show-stacks
pool
Generate a fixed-block memory pool for a data type.
/memory pool --type msg_t --count 32 --thread-safe freertos
/memory pool --size 128 --count 16 --type generic
protect
Generate MPU configuration for stack protection.
/memory protect --mcu stm32f4 --guard-stack --region 7
/memory protect --mcu stm32h7 --regions "bootloader=ro,app-stack=guard"
audit
Generate stack high-water mark audit code.
/memory audit --tasks "sensor=256,comm=512,display=384" --alert-threshold 32
Process
- Run
arm-none-eabi-sizeto get current SRAM usage. - Identify all FreeRTOS objects and their sizes.
- Check
uxTaskGetStackHighWaterMarkfor each task after 24h of typical operation. - Calculate: stack usage = (initial_stack_depth - hwm) * 4 bytes.
- Set minimum stack = peak_usage * 1.5 (50% headroom).
Output Examples
Memory budget calculation
Flash:
.text + .rodata: 48,320 bytes (48KB)
.data LMA copy: 512 bytes
Total flash: 48,832 / 1,048,576 bytes (4.6%)
SRAM:
.data (init): 512 bytes
.bss (zero): 4,096 bytes
FreeRTOS heap: 32,768 bytes
Task stacks: 6,144 bytes (sensor=1KB, comm=2KB, display=1.5KB, idle=256B, timer=512B)
Total SRAM: 43,520 / 131,072 bytes (33%)
Stack sizing formula
Required stack = local variables + nested call chain depth + interrupt overhead
+ printf with %d: ~256 bytes
+ printf with %f: ~1024 bytes (avoid in embedded)
+ FreeRTOS queue send/receive: ~64 bytes
+ IRQ save/restore frame: 32 bytes (8 stacked registers * 4 bytes)
Minimum for a sensor task doing I2C reads and printf:
= 256 (locals) + 128 (calls) + 256 (printf %d) + 64 (queue) + 32 (IRQ) = 736 bytes ≈ 192 words
With 50% headroom: 288 words → use 384 words (configurable in 256-word steps)
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.
- 2mo ago First seen · 110 lines · 26 tokens per session scan A 82179ec5de85
memory is a command published in the GitHub repository HermeticOrmus/LibreEmbed-Claude-Code (50 stars, last pushed 1mo ago), licensed MIT. It adds 26 tokens to every session and 936 once invoked, about $0.0001 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-10-01.
memory compared with commands from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| memoryHermeticOrmus/LibreEmbed-Claude-Code | Command | 50 | 1mo ago | MIT | A | 26 | Claude Code |
| debugjzl-maker/EA-SKILL | Command | 15 | 1mo ago | MIT | A | 0 | Claude Code |
| lajzl-maker/EA-SKILL | Command | 15 | 1mo ago | MIT | A | 0 | Claude Code |
| flashjzl-maker/EA-SKILL | Command | 15 | 1mo ago | MIT | A | 0 | Claude Code |
| sizejzl-maker/EA-SKILL | Command | 15 | 1mo ago | MIT | A | 0 | Claude Code |
| testjzl-maker/EA-SKILL | Command | 15 | 1mo ago | MIT | A | 0 | Claude Code |
| mapjzl-maker/EA-SKILL | Command | 15 | 1mo ago | MIT | A | 0 | Claude Code |