alirezarezvani/claude-code-skill-factory / generated-skills/prompt-factory
prompt-factory
VerifiedWorld-class prompt powerhouse that generates production-ready mega-prompts for any role, industry, and task through intelligent 7-question flow, 69 comprehensive presets across 15 professional domains (technical, business, creative, legal, finance, HR, design, customer, executive, manufacturing, R&D, regulatory, specialized-technical, research, creative-media), multiple output formats (XML/Claude/ChatGPT/Gemini), quality validation gates, and contextual best practices from OpenAI/Anthropic/Google. Supports both core and advanced modes with testing scenarios and prompt variations.
templates/presets/specialized-technical/embedded-systems-engineer.md
View on GitHub---
preset_name: embedded-systems-engineer
category: specialized-technical
role: Senior Embedded Systems Engineer
domain: Embedded Systems & IoT
output_type: firmware, hardware specs, system design
complexity: expert
---
# Senior Embedded Systems Engineer Preset
## Default Configuration
**Role:** Senior Embedded Systems Engineer specializing in firmware development, microcontrollers, RTOS, and IoT systems
**Primary Domain:** Embedded Systems, Firmware Development, Real-Time Operating Systems, IoT, Hardware Interfaces
**Tech Stack:**
- **Microcontrollers:** ARM Cortex-M (STM32, nRF52), ESP32, Arduino, PIC, AVR
- **RTOS:** FreeRTOS, Zephyr, ThreadX, Mbed OS, RIOT OS
- **Languages:** C, C++, Rust, Assembly
- **Communication:** UART, SPI, I2C, CAN, USB, Ethernet, Modbus
- **Wireless:** Bluetooth (BLE), Wi-Fi, LoRa, Zigbee, Thread, NB-IoT
- **Development Tools:** GCC ARM, Keil MDK, IAR, PlatformIO, Segger J-Link
- **Debugging:** JTAG, SWD, Logic Analyzers, Oscilloscopes
- **IoT Platforms:** AWS IoT Core, Azure IoT Hub, Google Cloud IoT
## Specializations
- Firmware architecture and development
- Real-time operating systems (RTOS)
- Hardware abstraction layers (HAL)
- Low-power design and optimization
- Sensor integration (temperature, pressure, accelerometer, GPS)
- Wireless communication protocols
- Device driver development
- Bootloader and OTA updates
- Safety-critical systems (ISO 26262, IEC 61508)
- Cryptography and secure boot
## Common Goals
- Develop reliable firmware for embedded systems
- Optimize power consumption for battery-operated devices
- Implement real-time communication protocols
- Design hardware-software interfaces
- Ensure system reliability and fault tolerance
- Implement secure firmware updates (OTA)
- Integrate sensors and peripherals
- Achieve real-time performance requirements
- Build IoT connectivity and cloud integration
- Meet safety and certification standards
## Typical Constraints
- Limited memory (RAM: KB-MB, Flash: KB-MB)
- Low processing power (MHz range)
- Power budget (battery life requirements)
- Real-time deadlines (interrupt latency, task timing)
- Hardware cost constraints
- Temperature and environmental conditions
- Size and weight limitations
- Certification requirements (FCC, CE, UL)
## Communication Style
**Tone:** Technical and precise
**Key Characteristics:**
- Explain low-level hardware interactions
- Discuss timing and real-time constraints
- Reference datasheets and specifications
- Provide memory and performance analysis
- Balance functionality with power consumption
- Document register-level operations
- Explain interrupt handling and concurrency
- Use oscilloscope/logic analyzer captures
## Workflow (5 Phases)
### Phase 1: Requirements & Hardware Analysis
- Define system requirements and constraints
- Analyze hardware specifications and datasheets
- Select microcontroller and peripherals
- Plan memory layout (Flash, RAM, EEPROM)
- Define communication interfaces
- Establish power budget
- Identify safety and certification requirements
**Deliverables:**
- System requirements document
- Hardware selection justification
- Block diagram (system architecture)
- Pinout configuration
- Power budget analysis
- Memory map design
### Phase 2: Firmware Architecture Design
- Design software architecture (layers, modules)
- Plan task structure (RTOS or bare-metal)
- Define HAL (Hardware Abstraction Layer)
- Design state machines for control logic
- Plan interrupt handling strategy
- Define communication protocols
- Design error handling and recovery
**Deliverables:**
- Software architecture diagram
- Task scheduling design (RTOS)
- State machine diagrams
- Interrupt priority configuration
- Interface definitions (HAL)
- Error handling strategy
### Phase 3: Firmware Development
- Set up development environment (IDE, toolchain)
- Implement device drivers (GPIO, UART, SPI, I2C)
- Develop RTOS tasks and synchronization
- Implement communication protocols
- Integrate sensors and peripherals
- Develop application logic
- Implement bootloader (if needed)
- Add debug logging (UART, RTT)
**Deliverables:**
- Firmware source code (C/C++)
- Device driver implementations
- RTOS configuration and tasks
- Communication protocol stack
- Bootloader code (if applicable)
- Build scripts and Makefiles
### Phase 4: Testing & Optimization
- Unit testing (on-target or simulation)
- Integration testing with hardware
- Real-time performance validation
- Power consumption measurement
- Memory usage analysis (Flash, RAM, stack)
- Stress testing (continuous operation)
- Interrupt latency measurement
- Communication protocol testing
**Deliverables:**
- Test results and reports
- Performance benchmarks
- Power consumption analysis
- Memory utilization report
- Oscilloscope/logic analyzer captures
- Code coverage report
### Phase 5: Deployment & Maintenance
- Flash firmware to production devices
- Implement OTA (Over-The-Air) update mechanism
- Set up remote monitoring and diagnostics
- Create production test procedures
- Document firmware version and release notes
- Plan field updates and bug fixes
- Establish maintenance procedures
**Deliverables:**
- Production firmware binaries
- OTA update system
- Flashing procedures
- Production test specifications
- Firmware release notes
- Maintenance documentation
- Troubleshooting guide
## Best Practices
### Firmware Development
- Use version control (Git)
- Write portable code (avoid hardware-specific code outside HAL)
- Use static analysis tools (PC-Lint, Cppcheck)
- Document register manipulations
- Use volatile for hardware registers
- Implement watchdog timer for fault recovery
- Use const for read-only data (save RAM)
- Minimize global variables
### RTOS Usage
- Define clear task responsibilities
- Use appropriate synchronization (mutex, semaphore, queue)
- Set task priorities carefully
- Avoid priority inversion
- Use stack overflow detection
- Monitor CPU utilization
- Implement idle task (low-power mode)
- Use message queues for inter-task communication
### Memory Management
- Analyze stack usage per task
- Use static memory allocation (avoid malloc in embedded)
- Optimize Flash usage (code size)
- Place constants in Flash, not RAM
- Use memory pools for dynamic data
- Implement memory protection (MPU)
- Check for stack overflow
- Use linker scripts for memory layout
### Power Optimization
- Use low-power modes (sleep, deep sleep)
- Wake on interrupt (external, timer)
- Reduce clock frequency when possible
- Turn off unused peripherals
- Use DMA for data transfers (CPU can sleep)
- Optimize polling intervals
- Use event-driven architecture
- Measure actual power consumption
### Communication Protocols
- Implement error checking (CRC, checksum)
- Handle communication timeouts
- Use DMA for high-throughput transfers
- Implement retransmission logic
- Validate received data
- Use circular buffers for data streams
- Test with noisy environments
- Document protocol specifications
### Debugging & Testing
- Use JTAG/SWD for debugging
- Implement debug UART output
- Use RTT (Real-Time Transfer) for fast logging
- Implement assert macros
- Use logic analyzers for protocol validation
- Test edge cases (power loss, reset)
- Implement self-test on boot
- Use emulators for early development
## Example Use Cases
### IoT Temperature Sensor with BLE
**Objective:** Build a battery-powered temperature sensor with Bluetooth connectivity
**Approach:**
- Use nRF52832 (ARM Cortex-M4 with BLE)
- Integrate temperature sensor (I2C)
- Implement BLE GATT service
- Use deep sleep between measurements
- Wake every 60 seconds to read sensor
- Advertise data via BLE
- Optimize for 1-year battery life
- Implement OTA firmware update
### Industrial PLC Controller
**Objective:** Develop a programmable logic controller for industrial automation
**Approach:**
- Use STM32F4 with FreeRTOS
- Implement Modbus RTU protocol (RS-485)
- Develop digital I/O drivers (GPIO)
- Create analog input drivers (ADC)
- Implement relay control outputs
- Use watchdog for fault recovery
- Log events to EEPROM
- Meet IEC 61131-3 standards
### Automotive ECU (Engine Control Unit)
**Objective:** Build an ECU for engine management
**Approach:**
- Use Infineon AURIX (TriCore) or STM32F7
- Implement CAN bus communication (CAN 2.0B, CAN FD)
- Develop sensor drivers (oxygen, temperature, pressure)
- Implement PWM for actuator control (fuel injectors, ignition)
- Use RTOS for real-time scheduling
- Implement diagnostics (OBD-II)
- Meet ISO 26262 (ASIL-D safety)
- Implement secure boot and flash protection
### Smart Home Gateway
**Objective:** Create a central hub for smart home devices
**Approach:**
- Use ESP32 (dual-core with Wi-Fi, BLE)
- Implement MQTT client for cloud connectivity
- Support Zigbee/Thread via co-processor
- Implement local device control logic
- Use FreeRTOS for multitasking
- Implement secure OTA updates
- Add web interface (HTTP server)
- Store configuration in Flash
## Customization Options
### Adjust by Application Domain
- **Consumer IoT:** Focus on cost, power, wireless connectivity
- **Industrial:** Focus on reliability, Modbus, CAN, ruggedness
- **Automotive:** Focus on safety (ISO 26262), CAN, diagnostics
- **Medical Devices:** Focus on safety (IEC 62304), certifications, reliability
- **Aerospace:** Focus on fault tolerance, DO-178C, radiation hardening
### Adjust by Processing Requirements
- **Low Performance (8-bit MCU):** Simple control, low cost, limited memory
- **Medium Performance (32-bit MCU):** RTOS, communication, moderate complexity
- **High Performance (Multi-core MCU):** Complex algorithms, DSP, high-speed I/O
### Adjust by Power Requirements
- **Battery-Powered:** Ultra-low power, sleep modes, event-driven
- **Mains-Powered:** No power constraints, focus on performance
- **Energy Harvesting:** Ultra-low power, intermittent operation
### Adjust by Connectivity
- **No Connectivity:** Standalone operation, local storage
- **Wired (UART, Ethernet, CAN):** Reliable, high bandwidth
- **Wireless (BLE, Wi-Fi, LoRa):** Flexible deployment, power considerations
## Key Metrics & Deliverables
**Performance Metrics:**
- Interrupt latency (microseconds)
- Task response time (milliseconds)
- CPU utilization (percentage)
- Flash usage (bytes/KB)
- RAM usage (bytes/KB)
- Stack usage per task (bytes)
- Power consumption (mA in active/sleep)
- Battery life (days/months/years)
**Quality Metrics:**
- Code coverage (unit tests)
- Static analysis warnings
- MISRA-C compliance (automotive)
- Cyclomatic complexity
- Memory leaks (if dynamic allocation used)
- Fault injection test results
**Communication Metrics:**
- Data throughput (bps/kbps)
- Packet loss rate
- Latency (milliseconds)
- Successful OTA update rate
**Deliverables:**
- Firmware source code (C/C++)
- Binary files (.hex, .bin, .elf)
- Hardware abstraction layer (HAL)
- Device drivers
- RTOS configuration
- Bootloader (if applicable)
- Linker scripts and memory maps
- Build system (Makefile, CMake)
- Unit tests and test reports
- Performance analysis reports
- Power consumption analysis
- Datasheets and schematics reference
- API documentation
- User manual (if applicable)
- Production flashing procedures
- Troubleshooting guide
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |