What problem does it solve?
This Skill helps you reason about memory pressure, stack limits, and concurrency hazards in the Megahub ESP32 firmware so you can avoid crashes, deadlocks, and hidden performance regressions.
Core Features & Use Cases
- Heap and PSRAM budgeting: Track free heap and PSRAM across startup stages and Bluetooth lifecycle events.
- Task and stack safety: Use known FreeRTOS task stack high-water marks to size work safely and prevent overflow.
- Concurrency guardrails: Apply timeout-based mutexes, queues, and semaphores for BLE callbacks, HID events, and inter-task communication.
- Use case: When adding a new Lua feature or BLE handler, check its memory impact, choose the right task context, and keep the BT stack healthy.
Quick Start
Ask for a memory-aware review of the change and include the affected task, expected allocations, and any Bluetooth or Lua callbacks involved.