What problem does it solve? HarmonyOS developers often receive cryptic error codes (like 5400xxx, 801, 9200) or crash/freeze logs without knowing which module failed or why. This Skill replaces guesswork with a structured six-stage diagnostic workflow that traces failures from logs and source code down to the concrete application-side operation that caused them, producing an actionable diagnosis report. ## Core Features & Use Cases - Structured Six-Stage Diagnosis: Runs environment discovery, clue extraction, module identification, log collection, triage against knowledge bases, deep-dive analysis, and project source code review, ending in a standardized Markdown report. - Automated Log Collection: Pulls and decodes device hilog files via hdc using hilogtool (with gzip fallback), captures in-memory log buffers, and tracks state machine transitions across the timeline. - Module & Error Code Mapping: Maps error code prefixes, DOMAIN identifiers, .so library names, API prefixes, and hilog domain IDs to specific OpenHarmony modules with links to source and documentation repositories. - Media File Analysis: Validates media files (MP4, MKV, TS, AAC, MP3, FLAC, WAV, OGG, AMR) for format support, truncation, and corruption when Media Kit errors 5400103/5400106/5400102 appear. - Use Case: A developer hits error 5400106 when playing a video. The Skill collects device logs, identifies the multimedia_player_framework module, analyzes the media file for corruption, inspects the project's AVPlayer usage, and delivers a report ranking root causes with code fix suggestions. ## Quick Start Ask the agent to analyze your HarmonyOS problem by providing the error description and log file, for example: use hmos-apifault-analysis to diagnose error code 5400103 with the attached hilog file and my player code snippet.