harmonyos-app

Solid

HarmonyOS application development expert. Use when building HarmonyOS apps with ArkTS, ArkUI, Stage model, and distributed capabilities. Covers HarmonyOS NEXT (API 12+) best practices.

AI & Automation 154 stars 19 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
73
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# HarmonyOS Application Development ## Core Principles - **ArkTS First** — Use ArkTS with strict type safety, no `any` or dynamic types - **Declarative UI** — Build UI with ArkUI's declarative components and state management - **Stage Model** — Use modern Stage model (UIAbility), not legacy FA model - **Distributed by Design** — Leverage cross-device capabilities from the start - **Atomic Services** — Consider atomic services and cards for lightweight experiences - **One-time Development** — Design for multi-device adaptation (phone, tablet, watch, TV) --- ## Hard Rules (Must Follow) > These rules are mandatory. Violating them means the skill is not working correctly. ### No Dynamic Types **ArkTS prohibits dynamic typing. Never use `any`, type assertions, or dynamic property access.** ```typescript // ❌ FORBIDDEN: Dynamic types let data: any = fetchData(); let obj: object = {}; obj['dynamicKey'] = value; // Dynamic property access (someVar as SomeType).method(); // Type assertion // ✅ REQUIRED: Strict typing interface UserData { id: string; name: string; } let data: UserData = fetchData(); // Use Record for dynamic keys let obj: Record<string, string> = {}; obj['key'] = value; // OK with Record type ``` ### No Direct State Mutation **Never mutate @State/@Prop variables directly in nested objects. Use immutable updates.** ```typescript // ❌ FORBIDDEN: Direct mutation @State user: User = { name: 'John', age: 25 }; updateAge() { this.user.age = 26; // UI ...

Details

Author
majiayu000
Repository
majiayu000/spellbook
Created
6 months ago
Last Updated
1 weeks ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category