hmos-system-capabilities

Guides HarmonyOS system capability development covering abilities, permissions, background tasks, and data management.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? HarmonyOS developers often guess at system APIs, permission flows, and Kit imports, producing code that fails against the actual SDK. This Skill provides a structured framework for using HarmonyOS system capabilities correctly, with a strict rule to verify every interface against official documentation before writing code. ## Core Features & Use Cases - Ability and Page Routing Guidance: Covers the Stage model, UIAbility lifecycle callbacks, router-based navigation, and multi-module (HAR/HSP) routing considerations. - Permission Model Reference: Explains permission declaration in module.json5, normal versus system_basic levels, and dynamic user authorization via abilityAccessCtrl with denial handling. - Capability Framework Map: Maps common needs (notifications, background tasks, ArkData storage, files, networking, media, distributed services, security) to the correct HarmonyOS Kits. - Use Case: When adding a local notification feature to a HarmonyOS app, follow the Skill to declare the right permission, use Notification Kit, verify the exact module import with dcli__api_lookup, and release resources in the correct lifecycle callback. ## Quick Start Ask the agent to implement a HarmonyOS feature such as requesting camera permission dynamically and showing a local notification, following the system capabilities guidelines.

Frequently Asked Questions about hmos-system-capabilities

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

FAQPage Schema
How do I request runtime permissions in HarmonyOS?

Declare the permission in module.json5 under requestPermissions, then call abilityAccessCtrl.createAtManager().requestPermissionsFromUser() for user-granted permissions like camera or location. Handle the result and provide guidance when the user denies access.

How does page navigation work in HarmonyOS Stage model?

Use router.pushUrl with the target page path to navigate and router.back() to return, or use the Navigation component. For multi-module apps with HAR or HSP packages, include the correct module path prefix in routes.

Should I use @ohos.* modules or @kit.* imports in HarmonyOS?

HarmonyOS SDK is migrating from @ohos.* modules to Kit-based aggregated imports, but never guess the export names. Verify the exact module and symbols for your compileSdkVersion using dcli__api_lookup before writing any import statement.

What is the difference between normal and system_basic permissions?

Normal permissions like INTERNET are granted automatically at install time, while system_basic and system_core permissions are restricted to system applications. User-sensitive permissions such as camera and microphone require dynamic runtime requests.

Why does my HarmonyOS app leak resources in the background?

Resources like timers, listeners, and database connections must be released in onDestroy or onBackground lifecycle callbacks. Failing to pair resource acquisition with lifecycle cleanup causes leaks and can conflict with system background task restrictions.