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 commands/mathisk2095/jko-claude-plugins/esp-optimizegit clone --depth 1 https://github.com/mathisk2095/jko-claude-pluginsWhat 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.00014 | $0.00834 |
| Opus 5 | $0.00007 | $0.00417 |
| Sonnet 5 | $0.00003 | $0.00167 |
| Haiku 4.5 | $0.00001 | $0.00083 |
Grade A, and why
esp-optimize 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 2d 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 — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ESP32 Firmware Optimization
First: Use the esp32-expert skill. → Consult memory reference for heap/PSRAM/IRAM placement, LVGL reference for display performance, and power reference for sleep mode design.
Optimization without measurement is guesswork. Profile first, then target the bottleneck. On ESP32, the bottleneck is almost always memory bandwidth (PSRAM), flash cache misses, or DMA contention -- not CPU speed.
Parse Target from $ARGUMENTS
$1 should be one of: speed, memory, power, size. Default to a general review if not specified.
Speed Optimization
- IRAM placement: Move critical functions to IRAM with
IRAM_ATTR - DMA usage: Ensure SPI/I2S/ADC use DMA for large transfers
- Cache optimization: Align data structures, avoid PSRAM for hot paths
- Task priority tuning: Ensure real-time tasks have appropriate priority
- Compiler flags:
-O2or-Ofastfor performance-critical components - Algorithm selection: Replace O(n^2) with O(n log n) where applicable
- Interrupt latency: Minimize ISR processing, use deferred handlers
- Flash access: Reduce flash reads (cache-friendly code layout)
Memory Optimization
- Heap analysis: Run
idf.py size-componentsto identify large consumers - Stack tuning: Measure with
uxTaskGetStackHighWaterMark(), reduce to actual + 25% - Flash strings: Use
PROGMEM(Arduino) or ensure const strings stay in flash - PSRAM offloading: Move large buffers to PSRAM (
MALLOC_CAP_SPIRAM) - Component pruning: Disable unused ESP-IDF components in menuconfig
- Static allocation: Replace dynamic allocation with static for permanent objects
- Shared buffers: Reuse buffers across non-concurrent operations
Power Optimization
- Sleep mode selection: Deep sleep for >1s idle, light sleep for 10ms-1s
- WiFi power save: Enable modem sleep, use duty cycling
- Peripheral shutdown: Disable unused peripherals before sleep
- CPU frequency: Reduce to 80MHz when processing demand is low
- GPIO hold: Use
gpio_hold_en()to maintain state during sleep - Batch operations: Wake, do all work, sleep (minimize active time)
- ULP usage: Offload monitoring to ULP coprocessor during deep sleep
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.
- 2d ago First seen · 71 lines · 14 tokens per session scan A f1b697f7a571
esp-optimize is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 4d ago), licensed MIT. It adds 14 tokens to every session and 834 once invoked, about $0.0001 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-31.
Other commands, from other repositories
status
Show tlive daemon, channel, and Codex companion status.
codex-review
Run OpenAI Codex code review on current changes or a specific branch/commit.
stats
Show statistics for saved conversation files.
close
Close out a Linear issue — move to Done, add a closing comment, and clean up the local branch/worktree.
prompt
Convert a rough ask into a structured XML-tagged prompt using the factory-prompting vocabulary.
submit
Move the current branch's Linear issue to In Review.