harmonyos

Develops HarmonyOS NEXT applications with ArkTS, ArkUI, and DevEco tooling.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill harmonyos-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harmonyos
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/harmonyos
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill harmonyos-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? HarmonyOS NEXT development fails in non-obvious ways: ArkTS rejects valid TypeScript, state decorators silently stop observing, and global ArkUI APIs target the wrong UI instance. This Skill encodes the platform's compile rules, state-management generations, and API-version gates so code compiles, updates, and passes AppGallery release verification. ## Core Features & Use Cases - ArkTS language enforcement: Covers the roughly 76 arkts-* restriction rules with error codes, severities, and rewrite recipes for diagnostics like arkts-no-any-unknown and arkts-no-structural-typing. - State management V1/V2 guidance: Explains @ObservedV2/@Trace, @Param/@Event, V1 decorators, and the API 19 UIUtils interop functions, including the silent-failure modes of each. - End-to-end workflows: Provides implement, review, fix-compile-errors, migrate-from-android, and verify-on-device workflows with explicit gates using hvigorw, codelinter, hdc, and uitest. - Use Case: When porting an Android app, follow the per-concern mapping tables to translate Activities into NavDestinations, ViewModels into @ObservedV2 models, and JNI into Node-API, then verify one vertical slice on a real device. ## Quick Start Use the harmonyos skill to review my entry module's .ets files for ArkTS violations and state-management bugs against API 20.

Frequently Asked Questions about harmonyos

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

FAQPage Schema
How do I fix ArkTS compile errors in HarmonyOS NEXT?

Group diagnostics by arkts-* rule id rather than by file, then fix one category at a time: typing first, then object shape, statements, and functions. Confirm standard mode is active via compatibleSdkVersion >= 10 in build-profile.json5 before rewriting, and rebuild after each category.

How do I choose between TaskPool and Worker in HarmonyOS?

Default to TaskPool; its tasks are capped at three minutes of execution excluding awaited I/O. Choose Worker only for longer work, noting Workers cannot be cancelled, at most 64 run per process, and priority configuration requires API 18.

What is the difference between ArkUI state management V1 and V2?

V2 uses @ObservedV2 classes with @Trace per property plus @Param/@Event in @ComponentV2, while V1 uses @State/@Prop/@Link and @Observed/@ObjectLink for nested observation. Mixing decorators within one component is a compile error, and cross-generation data passing needs UIUtils interop APIs from API 19.

Why is my HarmonyOS UI not updating after state changes?

Stale UI usually means a missing @Trace on an @ObservedV2 property, V1 @State expecting nested observation it cannot provide, or data crossing a V1/V2 boundary without enableV2Compatibility. Check which generation each component belongs to and whether the observed property is actually traced.

Can I use the global router API in HarmonyOS NEXT?

Global router functions are deprecated since API 18 with @useinstead pointing to UIContext.getRouter(), available since API 10. New code should use Navigation with NavPathStack and NavDestination; router params also cannot carry functions.

What are the limitations of HarmonyOS permission declarations?

A user_grant permission requires a localized reason string and usedScene with when set to inuse or always in module.json5, enforced at AppGallery release verification. After user refusal, requestPermissionsFromUser shows no dialog, so the app must direct users to Settings and re-check with checkAccessToken before each protected call.