hmos-build-sign-release

Guides HarmonyOS build, signing, and release workflows using dcli tools and build-profile.json5 configuration.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? HarmonyOS developers often struggle with the multi-layered build and signing system: HAP/HAR/HSP artifact types, build-profile.json5 signingConfigs, debug versus release signatures, and cryptic install errors like signature verification failures. This Skill provides a structured reference for configuring, signing, building, and releasing HarmonyOS applications correctly. ## Core Features & Use Cases - Artifact & Configuration Reference: Explains HAP, HAR, HSP, and APP package types plus build-profile.json5, hvigorfile.ts, and SDK version settings. - Signing Workflows: Covers automatic debug signing via dcli__generate_signature, auth status prechecks, and dual-product signing setup with dcli__configure_dual_signing for separate debug and release signatures. - Build & Troubleshooting Guidance: Documents dcli__sync_project, dcli__build_project, and dcli__run_app commands, correct product/buildMode combinations, output paths, and a failure diagnosis order from dependencies to code errors. - Use Case: When a real-device install fails with error 9568322, the Skill explains that only debug-signed HAPs should be installed on devices and walks through the correct product, module target, and buildMode selection. ## Quick Start Ask the agent to check auth status, configure dual signing, and build a release HAP for the default product of your HarmonyOS project.

Frequently Asked Questions about hmos-build-sign-release

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

FAQPage Schema
How do I build a HarmonyOS HAP from the command line?

Run dcli__sync_project to synchronize the hvigor project, then dcli__build_project with the desired product, modules, and buildMode. For a full cycle, dcli__run_app builds, installs, and launches the app on a device or emulator.

How do I configure debug and release signing for HarmonyOS?

Define two products in build-profile.json5: default with release signing and debug with debug signing, each mapped to its own module target. Use dcli__configure_dual_signing to preview the configuration, then pass apply: true to write it with backup.

Why does HarmonyOS HAP install fail with error 9568322?

Error 9568322 typically occurs when installing a release-signed HAP on a real device. Install the debug-signed package instead, located at entry/build/debug/outputs/debug/entry-debug-signed.hap, using dcli__install_hap.

What is the difference between HAP, HAR, and HSP in HarmonyOS?

HAP is the installable application package, one per module. HAR is a static shared library compiled into the HAP, while HSP is a dynamic shared library loaded at runtime as an independent package. APP bundles multiple HAPs for distribution.

Why does dcli__generate_signature fail and how to fix it?

Signature generation fails when the Huawei account is not logged in. Run dcli__auth_status first; if it returns not logged in, run devecocli auth login in a terminal to authenticate via browser, then retry.