
Embedded Diagnostic Code Analyzer
Analyze embedded diagnostic code for CAN, DTCs, fault trees, and state machines
What You Can Do
You can analyze embedded diagnostic code across five critical domains: CAN message parsing and protocol compliance, Diagnostic Trouble Code (DTC) generation logic, diagnostic state machine transitions, sensor fault detection thresholds, and diagnostic data link command handlers (UDS/KWP). The skill identifies logic errors, false-positive configurations, state transition gaps, and compliance deviations that would otherwise only surface during expensive dyno or road testing.
Features
validates message ID mapping, data field extraction, and endianness handling for diagnostic CAN frames
traces condition thresholds, confirm/pending transitions, and multi-condition AND/OR logic for correctness
diagrams transitions (pending → confirmed → stored) and identifies unreachable states or deadlock conditions
checks threshold configurations, hysteresis logic, and debounce counts for false-positive reduction
reviews UDS/KWP handler implementations against ISO 14229 and OEM-specific diagnostic protocols
traces DTC flows across CAN bus messaging and identifies missing or incorrect broadcast logic
identifies overlapping, contradictory, or unrealistic sensor ranges that cause diagnostic conflicts
lists missing OBD-II/manufacturer requirements and suggests remediation steps
Example Output
Example 1: CAN DTC Logic
Issue Found: Engine Speed Sensor Fault (P0500)
- Condition: Speed < 10 RPM for 500ms
- Problem: No debounce on startup—triggers false DTC during cranking
- Fix: Add 2-second debounce after ECU boot, or set min threshold to 50 RPM
- Severity: High (affects OBD readiness)
Example 2: State Machine Gap
Issue Found: Oxygen Sensor Heater (P013F)
- State: PENDING → missing direct path to CONFIRMED
- Analysis: Requires 100 transitions before confirmation; 50 already exist
- Gap: No timer to age out stale pending codes (>40 driving cycles)
- Fix: Add 40-cycle timeout in PENDING state → CLEAR transition
Example 3: Compliance Check
✓ OBD-II Readiness: Monitors present
✗ Catalyst Monitor: Missing freeze frame data capture
✗ UDS Service 0x19 (Read DTC): Returns pending DTCs but omits status masks
→ Remediation: Add status byte encoding per ISO 14229-1
What's Included
- SKILL.md instruction file with systematic diagnostic code review workflow:
- CAN Protocol Checklist: message ID validation, data field mapping, signal extraction patterns
- DTC State Machine Template: pending/confirmed/stored transition matrix with debounce configurations
- Sensor Threshold Audit Framework: false-positive analysis, hysteresis review, and cross-sensor conflict detection
- UDS/KWP Compliance Mapping: service handler coverage checklist against ISO 14229 and OEM diagnostic requirements
Who It's For
- Automotive embedded software engineers developing OBD-II and manufacturer-specific diagnostics
- Diagnostic firmware code reviewers performing pre-integration audits before dyno testing
- Embedded systems engineers validating CAN diagnostic message protocols and DTC propagation
- Quality assurance engineers preparing diagnostic code for OEM compliance reviews
- ECU software architects designing multi-step diagnostic state machines and fault detection logic
Best For
- Reviewing diagnostic firmware modules before integration testing
- Debugging DTC mismatches between logged codes and actual vehicle faults
- Validating state machine transitions for multi-step diagnostics (pending → confirmed → stored)
- Analyzing sensor threshold configurations to reduce false positives
- Auditing UDS/KWP diagnostic service handlers for protocol compliance and data correctness
- Tracing DTC propagation flows across inter-module CAN messaging
- Identifying logic errors and compliance gaps before expensive vehicle testing







