code-review-facilitator
Automated static code review for Arduino, ESP32, and RP2040 projects. Identifies memory safety issues, structure improvements, and best practices to enhance firmware quality and reliability.
Introduction
The Code Review Facilitator is a specialized engineering tool designed for embedded systems developers working with Arduino, ESP32, and RP2040 platforms. It serves as an automated mentor that systematically analyzes C++ firmware to ensure code robustness, memory efficiency, and maintainability. By integrating static analysis via the scripts/analyze_code.py utility, the skill identifies common pitfalls such as heap fragmentation, stack overflows, improper use of the String class, and blocking delay() calls. It is intended for developers ranging from hobbyists building prototypes to engineers finalizing production-grade embedded firmware. Users can trigger the review process when they need feedback on their logic, want to ensure code quality before publishing to GitHub, or are encountering mysterious runtime crashes. The skill parses project directories or individual files, providing a clear, actionable checklist for refactoring—from organizing 'god functions' into modular tasks to implementing non-blocking state machines and safe buffer handling. It emphasizes microcontroller-specific best practices, such as PROGMEM usage, avoiding magic numbers, and implementing robust error handling for hardware peripherals like I2C, SPI, and sensors.
-
Performs static analysis of C++ source files to detect 15+ common embedded programming issues.
-
Supports individual file checks and recursive project directory scanning for comprehensive review.
-
Provides automated guidance on memory safety, including heap/stack management and buffer overflow prevention.
-
Suggests refactoring paths for non-blocking timing, debouncing inputs, and modular hardware abstraction.
-
Generates actionable, categorized checklists for improving project structure and code readability.
-
Offers an interactive mode for real-time feedback on pasted code snippets.
-
Run analysis using 'uv run scripts/analyze_code.py [target]' for immediate diagnostic reports.
-
Use the --severity flag to filter feedback based on project phase or criticality.
-
Follow the recommended refactoring patterns provided in the output to resolve identified warnings.
-
Ideal for use during the development of IoT sensors, robotic controllers, and data loggers.
-
Complementary to hardware debugging; use this to eliminate logic and safety bugs before deploying to production boards.
Repository Stats
- Stars
- 0
- Forks
- 0
- Open Issues
- 0
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 07:02 PM