hmos-runtime-fix-skill

Diagnose and fix ArkTS and JavaScript runtime crashes from jscrash logs and hilog evidence.

2|Updated Jun 21, 2026
One-click install
npx skills add https://github.com/IsKenKenYa/skills --skill hmos-runtime-fix-skill-iskenkenya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hmos-runtime-fix-skill
Source: https://github.com/IsKenKenYa/skills/tree/main/skills/harmonyos/solutions/quality/stability/hmos-runtime-fix-skill
Command: npx skills add https://github.com/IsKenKenYa/skills --skill hmos-runtime-fix-skill-iskenkenya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? HarmonyOS apps often crash at runtime with jscrash logs, uncaught exceptions, or white screens even when the build succeeds, and developers waste time reading the whole codebase without a concrete anchor. This Skill parses crash evidence first, identifies the error type and suspected file, and guides a minimal root-cause fix. ## Core Features & Use Cases - Crash Log Parsing: Parse raw jscrash text, local log files, or device-side faultlog/hilog via devecocli into structured fields like error_type, error_message, suspected_file, and top_stack. - Fault Pattern Knowledge Base: Match parsed errors against curated pattern libraries for ReferenceError, TypeError, SyntaxError, RangeError, URIError, BusinessError, OutOfMemoryError, and framework Error cases. - Use Case: A user reports the app white-screens after tapping a button and pastes a jscrash log. The Skill extracts a TypeError with the suspected .ets file, matches the "Cannot read property of undefined" pattern, and applies a minimal null-check fix. ## Quick Start Ask the assistant to diagnose this HarmonyOS app crash using the attached jscrash log and apply a minimal fix to the suspected file.

Frequently Asked Questions about hmos-runtime-fix-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I diagnose a HarmonyOS jscrash log?

Parse the jscrash log with the provided Node scripts to extract error_type, error_message, suspected_file, and top_stack. Then match the error type against the fault pattern references to identify the root cause and apply a minimal fix.

How to fix ArkTS TypeError Cannot read property of undefined?

This TypeError means a variable was not the expected object when a property was accessed. Validate the object exists before use, and check API return values, async timing, and default values at the stack-indicated location.

Can I collect crash logs from a HarmonyOS device without the user providing logs?

Yes, the Skill can run devecocli log --crash or collect a hilog snapshot from a connected device using the app's bundleName from AppScope/app.json5. If multiple devices are connected, the user must select one first.

Why does my HarmonyOS app crash at runtime when the build succeeds?

Runtime crashes like ReferenceError, TypeError, or BusinessError come from uncaught exceptions that compilation cannot detect, such as uninitialized variables or invalid API parameters. Parse the crash log to find the error type and suspected file before reading code broadly.

What are the limitations of automated jscrash analysis?

Analysis requires a concrete crash anchor such as an error type or stack trace; vague symptom descriptions alone are insufficient. If the log shows no crash signature, better evidence like a fuller log or clearer reproduction steps is needed.