native-harmonyos

Guides HarmonyOS app development with project structure, LSP checks, and DevEco CLI workflows.

Updated Sep 3, 2026
One-click install
npx skills add https://github.com/YrracOwl/dsh-hmos-sidebar --skill native-harmonyos-yrracowl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: native-harmonyos
Source: https://github.com/YrracOwl/dsh-hmos-sidebar/tree/main/packages/dsh-hmos-sidebar/presets/native-harmonyos/skills/native-harmonyos
Command: npx skills add https://github.com/YrracOwl/dsh-hmos-sidebar --skill native-harmonyos-yrracowl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developing native HarmonyOS (Stage model) applications requires navigating a complex project structure, ArkTS/C++ static checking, signing configuration, and device deployment. This Skill provides a structured workflow so an AI agent can interpret HarmonyOS projects, run the right dcli__* tools, and resolve common build and runtime failures without guesswork. ## Core Features & Use Cases - Project Structure Guidance: Explains AppScope, build-profile.json5, module.json5, oh-package.json5, and entry module layout so agents can locate and edit the right files. - Mandatory LSP Verification: Enforces running dcli__lsp_check after every ArkTS change, with dcli__lsp_restart recovery for stuck or uninitialized LSP instances. - Full Toolchain Reference: Maps tasks to 41 dcli__* tools covering project creation, hvigor builds, device/emulator management, HAP install and launch, logs, docs search, and signature generation. - Troubleshooting Playbook: Provides fixes for common issues such as ohpm dependency failures, signing errors, device authorization, and missing pages or resources. - Use Case: Ask the agent to add a new page to a HarmonyOS app; it will update module.json5 and main_pages.json, edit the ArkTS source, verify with dcli__lsp_check, build with dcli__build_project, and deploy to a connected device. ## Quick Start Load this skill and ask the agent to modify an ArkTS page in your HarmonyOS project, then verify the change with dcli__lsp_check and build the project.

Frequently Asked Questions about native-harmonyos

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

FAQPage Schema
How do I check ArkTS code for errors in a HarmonyOS project?

Run dcli__lsp_check with the .ets file paths relative to the project root and the projectPath set to the project root. It returns structured diagnostics from a persistent LSP instance; fix all reported type, import, and resource issues before continuing.

How do I build and run a HarmonyOS app on a real device?

Use dcli__build_project to compile the HAP, confirm the device is connected and authorized with dcli__list_devices, then deploy with dcli__run_app or dcli__install_hap. Install a debug-signed package on real devices, not a default or release-signed one.

What tools are available for HarmonyOS development in this workflow?

The workflow uses 41 dcli__* tools covering project creation and sync, hvigor builds, device and emulator management, device logs, UI automation, SDK documentation search, signature generation, and lint and compatibility checks.

Why does dcli__lsp_check report LSP not initialized?

This usually means the project root lacks build-profile.json5 or the environment failed to sync. Run dcli__sync_project first, then dcli__lsp_restart with target arkts, cpp, or all; fix root causes like SDK paths instead of repeatedly restarting.

How do I fix HarmonyOS signing errors during build?

Check the signingConfigs section in build-profile.json5 for missing or invalid entries. If no valid signing configuration exists, generate one with dcli__generate_signature and reference it from the product definition.

When should I use the ralph tool for HarmonyOS tasks?

Use ralph only when the user explicitly requests fresh-agent iteration, such as large cross-module refactors or root-causing repeated build failures. Define an immutable objective with acceptance criteria like zero lsp_check diagnostics and a passing build.