← 返回 Skills 市场
louiseleven

harmonyOS developer

作者 LouisEleven · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
427
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install harmonyos
功能描述
Develop ArkTS apps with HarmonyOS SDK using ArkUI components, manage state, handle navigation, network, storage, permissions, and app signing.
使用说明 (SKILL.md)

HarmonyOS Developer Skills

Core Rules

  • Use .equals() for string comparison, not ==
  • HarmonyOS uses ArkTS/TypeScript
  • UI built with ArkUI framework
  • App signing requires certificate configuration

Development Environment

  • IDE: DevEco Studio
  • Language: ArkTS (TypeScript superset)
  • SDK: HarmonyOS SDK
  • API: HarmonyOS Next API

ArkUI Basics

Components

// Basic component
@Entry
@Component
struct Index {
  @State message: string = 'Hello World'

  build() {
    Column() {
      Text(this.message)
        .fontSize(50)
        .fontWeight(FontWeight.Bold)
    }
    .alignItems(HorizontalAlign.Center)
    .width('100%')
    .height('100%')
  }
}

State Management

// @State - Component internal state
@State count: number = 0

// @Prop - Parent component prop
@Prop message: string

// @Link - Two-way binding
@Link childCount: number

// @Observed + @ObjectLink - Deep observation
@Observed
class Person {
  name: string = ''
  age: number = 0
}

@ObjectLink person: Person

Lifecycle

// Component lifecycle
aboutToAppear() {}    // About to display
onDidBuild() {}       // Build complete
aboutToDisappear() {} // About to destroy

Common Components

  • Text - Text display
  • Image - Image display
  • Button - Interactive button
  • Column/Row - Layout containers
  • List - Scrollable list
  • Grid - Grid layout
  • Stack - Stacked layout
  • Swiper - Carousel
  • TabContent - Tab pages

Layouts

// Linear layout
Column() { }  // Vertical
Row() { }     // Horizontal

// Flex layout
Flex() { 
  direction: FlexDirection.Row 
}

// Grid layout
Grid() { 
  columnsTemplate: '1fr 1fr 1fr' 
}

// Stack
Stack() { }

Routing

import router from '@ohos.router'

// Navigate
router.pushUrl('pages/Detail')

// Go back
router.back()

// With params
router.pushUrl({
  url: 'pages/Detail',
  params: { id: 123 }
})

// Get params
const params = router.getParams()

Network Requests

import http from '@ohos.net.http'

let httpRequest = http.createHttp()
httpRequest.request(
  'https://api.example.com/data',
  {
    method: http.RequestMethod.GET,
    header: { 'Content-Type': 'application/json' }
  },
  (err, data) => {
    if (!err) {
      console.log(JSON.stringify(data.result))
    }
  }
)

Local Storage

import preferences from '@ohos.data.preferences'

// Write
let preferences = await preferences.getPreferences(context, 'myPrefs')
await preferences.put('username', 'tom')
await preferences.flush()

// Read
let value = await preferences.get('username', 'default')

Permissions

import abilityAccessCtrl from '@ohos.abilityAccessCtrl'

// Declare in module.json5
// "requestPermissions": [
//   { "name": "ohos.permission.INTERNET" }
// ]

// Request at runtime
let atManager = abilityAccessCtrl.createAtManager()
atManager.requestPermissionsFromUser(context, ['ohos.permission.INTERNET'])

Common Permissions

  • ohos.permission.INTERNET - Network access
  • ohos.permission.GET_NETWORK_INFO - Network status
  • ohos.permission.CAMERA - Camera access
  • ohos.permission.WRITE_MEDIA - Media write
  • ohos.permission.READ_MEDIA - Media read

Build & Signing

  1. DevEco Studio → Build → Build Hap
  2. Configure signing in Project Structure → Signing Configs
  3. Requires .p12 certificate and .cer public key
  4. Use debug signing for development, release for production

Quick Reference

Need Solution
State management @State, @Prop, @Link, @Observed
Lists List + ListItem
Network @ohos.net.http
Storage @ohos.data.preferences
Routing router.pushUrl()
Toast promptAction.showToast()
Dialog dialog.showDialog()

Learning Resources

安全使用建议
This skill is a text-only developer guide and appears coherent for HarmonyOS/ArkTS development. Before using: (1) confirm you trust the skill/source since source/homepage are unknown; (2) never paste real private keys or .p12 passphrases into public chats — keep signing certificates private and use official DevEco tooling; (3) when following network examples, replace placeholder URLs with trusted endpoints; (4) if the skill is later updated to include an install script or code files, re-evaluate for downloads, unexpected URLs, or requests for credentials.
功能分析
Type: OpenClaw Skill Name: harmonyos Version: 1.0.0 The skill bundle contains standard metadata and a comprehensive Markdown document (`SKILL.md`) detailing HarmonyOS development concepts, code examples, and official resources. There are no instructions for the AI agent to perform unauthorized actions, exfiltrate data, establish persistence, or engage in any other malicious behavior. The network and storage code examples are illustrative and use generic placeholders, not targeting sensitive data or external malicious endpoints. No prompt injection attempts or obfuscation were detected.
能力评估
Purpose & Capability
The name and description claim HarmonyOS/ArkTS development guidance; the SKILL.md contains ArkUI components, state management, routing, network, storage, permissions, and signing instructions — all expected for this purpose. The skill requests no binaries, environment variables, or installs that would be out-of-scope. Note: the skill's source/homepage are unknown, but the content itself matches the stated purpose.
Instruction Scope
The instructions are limited to development guidance (code samples, SDK APIs, permission declarations, signing steps). They do not instruct the agent to read arbitrary host files, access unrelated environment variables, or transmit sensitive agent data to external endpoints. Network examples use a placeholder domain (api.example.com).
Install Mechanism
There is no install specification and no code files — this is instruction-only, so nothing is written to disk or fetched at install time. That is the lowest-risk install profile.
Credentials
The skill declares no required environment variables, credentials, or config paths. The SKILL.md references typical development artifacts (module.json5, .p12 signing certificate) that are expected for app signing and are proportional to the described tasks.
Persistence & Privilege
always is false and disable-model-invocation is false (normal). The skill does not request persistent system presence or modify other skills' configuration. As an instruction-only skill it has no privileged install-time behavior.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install harmonyos
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /harmonyos 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
HarmonyOS Developer Skills A comprehensive skill set for building HarmonyOS applications using ArkTS and ArkUI. Topics covered: - Development environment setup (DevEco Studio, SDK) - ArkUI components and layouts (Text, Image, Button, Column, Row, List, Grid, etc.) - State management (@State, @Prop, @Link, @Observed) - Component lifecycle - Routing and navigation - Network requests (@ohos.net.http) - Local storage (@ohos.data.preferences) - Permissions and user authorization - Build and signing configuration Perfect for developing apps for HarmonyOS Next and OpenHarmony devices.
元数据
Slug harmonyos
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

harmonyOS developer 是什么?

Develop ArkTS apps with HarmonyOS SDK using ArkUI components, manage state, handle navigation, network, storage, permissions, and app signing. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 427 次。

如何安装 harmonyOS developer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install harmonyos」即可一键安装,无需额外配置。

harmonyOS developer 是免费的吗?

是的,harmonyOS developer 完全免费(开源免费),可自由下载、安装和使用。

harmonyOS developer 支持哪些平台?

harmonyOS developer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 harmonyOS developer?

由 LouisEleven(@louiseleven)开发并维护,当前版本 v1.0.0。

💬 留言讨论