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/captainluzik/oh-my-embeddedWrote 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/captainluzik/oh-my-embedded/power-budget)<a href="https://agentmods.dev/commands/captainluzik/oh-my-embedded/power-budget"><img src="https://agentmods.dev/badge/commands/captainluzik/oh-my-embedded/power-budget.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.1 | $0.00008 | $0.01291 |
| Opus 5 | $0.00004 | $0.00646 |
| Sonnet 5 | $0.00002 | $0.00258 |
| Haiku 4.5 | $0.00001 | $0.00129 |
Grade A, and why
power-budget 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 8d 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 — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Analyze the project source files and hardware configuration to produce a power budget: estimated current draw per subsystem, total consumption, and a battery or supply recommendation.
Arguments
$ARGUMENTS may contain:
- A battery capacity in mAh (e.g.
2000mAh,3000) to calculate runtime. - A supply voltage (e.g.
3.3V,5V) to override the detected value. - The keyword
sleepto include deep-sleep / low-power mode estimates.
Step 1: Detect supply voltage
Check in order:
sdkconfigforCONFIG_ESP_DEFAULT_CPU_FREQ_MHZand power-related keys.platformio.iniforboard_build.f_cpuorboardname.- Schematic files (
*.kicad_sch) for a VCC or 3V3 power symbol. - Source files for voltage regulator part numbers (e.g. AMS1117-3.3, AP2112K).
If $ARGUMENTS specifies a voltage, use that. Otherwise state the detected voltage or default to 3.3V.
Step 2: Identify active peripherals
Scan source files (.c, .cpp, .h, main/, src/, components/) for:
| Pattern to look for | Peripheral |
|---|---|
wifi_init, esp_wifi_start, WiFi.begin |
Wi-Fi radio |
bluetooth, esp_bt_, BLEDevice |
Bluetooth/BLE |
i2c_master, Wire.begin |
I2C bus |
spi_bus_initialize, SPI.begin |
SPI bus |
uart_driver_install, Serial.begin |
UART |
adc_oneshot, analogRead |
ADC |
ledc_, analogWrite, PWM |
PWM / LED driver |
gpio_set_level, digitalWrite |
GPIO outputs |
esp_sleep_enable, LowPower. |
Sleep modes |
| Display driver names (SSD1306, ILI9341, ST7789) | Display |
| Sensor names (BME280, MPU6050, DS18B20) | Sensors |
| Motor driver names (DRV8833, L298N, TMC2209) | Motor drivers |
List every peripheral found.
Step 3: Estimate current draw
Use these reference values (typical, at 3.3V unless noted):
| Peripheral | Active current | Sleep/idle current |
|---|---|---|
| ESP32 (CPU active, 240MHz) | 80 mA | - |
| ESP32 deep sleep | - | 0.01 mA |
| ESP32 Wi-Fi TX | +170 mA peak, ~80 mA avg | - |
| ESP32 Bluetooth active | +30 mA | - |
| STM32F1 (72MHz) | 36 mA | - |
| STM32 stop mode | - | 0.5 mA |
| SSD1306 OLED (128x64) | 15 mA | 0.5 mA |
| ILI9341 TFT (backlight on) | 40 mA | 1 mA |
| BME280 sensor | 0.7 mA (forced mode) | 0.001 mA |
| MPU6050 IMU | 3.9 mA | 0.005 mA |
| DS18B20 temperature | 1.5 mA (conversion) | 0.001 mA |
| Generic I2C device | 1 mA | - |
| GPIO output (LED, 3.3V, 330R) | 10 mA per LED | - |
| DRV8833 motor driver | 1.2 A peak (motor dependent) | 1 mA |
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.
- 8d ago First seen · 114 lines · 8 tokens per session scan A 40e85d92da28
power-budget is a command published in the GitHub repository captainluzik/oh-my-embedded (24 stars, last pushed 6mo ago), licensed MIT. It adds 8 tokens to every session and 1,291 once invoked, about $0.0000 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 commands, from other repositories
ruview-app
Run a RuView sensing application — presence, vitals, pose, sleep, environment mapping, MAT, point cloud, or a novel RF app.
ruview-start
Get started with RuView — pick the fastest path (Docker demo, repo build, or live ESP32) and walk through it.
debug
A command-line debugging toolkit for embedded programs using J-Link or OpenOCD, tools that connect a computer to a microcontroller for inspection.
la
A command for capturing and decoding signals with a Saleae logic analyzer, a device that records electrical digital signals over time. It supports buses such as UART, SPI, and I2C, which are common ways chips communicate with peripherals.
map
A parser for Keil compiler map files, which are build reports describing where program code and data are placed in memory. It reports object sizes, memory regions, symbols, and stack or heap details.
size
A command that reads a Keil compiler .map file, a build report describing where firmware uses memory. It reports Flash, RAM, stack, and heap allocation and compares usage with warning limits.