Skip to content

Strict typing, immutable state updates, and Stage model rules for building HarmonyOS NEXT apps with ArkTS and ArkUI.

CCM score
56 of 100
skills.sh installs
506
GitHub stars
301
last updated
Jun 3, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers ArkTS strict typing, ArkUI declarative components, and state management with decorators like @State, @Prop, and @Link
  • Enforces bans on any, type assertions, and direct mutation of @State objects, requiring immutable updates instead
  • Requires the Stage model (UIAbility) and forbids the deprecated FA model with PageAbility lifecycle
  • Provides a recommended project layout with layered pages, viewmodels, services, and repositories for phone, tablet, and watch apps

Install

$ npx -y skills add majiayu000/spellbook --skill harmonyos-app -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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.

// ❌ 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();

Details

Repository
github.com/majiayu000/spellbook
Categories
Mobile Apps, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What is harmonyos-app?

harmonyos-app is an agent skill listed on Claude Marketplaces in the Mobile Apps category. Its page on Claude Marketplaces links to the harmonyos-app source on GitHub.

How do I install harmonyos-app?

Run npx -y skills add majiayu000/spellbook --skill harmonyos-app -y in a project to install harmonyos-app. After that, the agent can use harmonyos-app in that project.

Which category is harmonyos-app in?

harmonyos-app is in the Mobile Apps category on Claude Marketplaces. Other listings in that category next to harmonyos-app include vercel-react-native-skills, animate-expo and write-swift.

Where is the source code of harmonyos-app?

The source code of harmonyos-app is on GitHub at https://github.com/majiayu000/spellbook. The majiayu000 account on GitHub publishes harmonyos-app.

More from majiayu000/spellbook

All 8

Similar to Harmonyos App

More Mobile Apps