Token导航 LogoToken导航

Agent Skill · 研究检索

harmonyos-build-deploy(Harmonyos 构建部署)

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

harmonyos-build-deploy 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 31,871。

总安装 2,620周安装 106GitHub Stars 6下载 823核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:harmonyos-build-deploy(Harmonyos 构建部署)
来源仓库:https://github.com/fadinglight9291117/arkts_skills
仓库路径:skills/harmonyos-build-deploy
安装命令:
npx skills add https://github.com/fadinglight9291117/arkts_skills --skill harmonyos-build-deploy
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fadinglight9291117/arkts_skills --skill harmonyos-build-deploy

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助 HarmonyOS 应用的构建和部署流程。适合在 Codex、Claude、Cursor、Gemini CLI 中检查配置、整理部署步骤或分析资源状态。通过 GitHub 安装,需明确目标环境、账号权限和资源组。区分本地测试与生产操作,涉及删除资源或修改网络配置时应先确认影响范围。

不能将工具输出直接当作最终结论,需人工复核部署脚本和环境变量。

来源仓库内路径:skills/harmonyos-build-deploy

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/fadinglight9291117/arkts_skills --skill harmon…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

harmonyos-build-deploy 怎么安装?

在终端执行 npx skills add https://github.com/fadinglight9291117/arkts_skills --skill harmonyos-build-…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

harmonyos-build-deploy 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

harmonyos-build-deploy 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/fadinglight9291117/arkts_skills --skill harmonyos-build-deploy 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

harmonyos-build-deploy 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

harmonyos-build-deploy 用的人多吗?

公开数据是累计安装 2,620 次,近一周安装 106 次,下载 823 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

harmonyos-build-deploy 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
harmonyos-build-deploy

Harmonyos 构建部署 · 本页

2,6206执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

HarmonyOS Build & Deploy

Complete workflow for building, cleaning, packaging, and installing HarmonyOS applications.

First Step: Confirm Operation with User

IMPORTANT: Before executing any build or deploy operation, confirm which specific operation(s) the user wants to perform. Ask the user to choose from:

OperationDescription
Clean build artifactsRemove previous build cache and outputs
Install dependenciesUse ohpm to install project dependencies
Build projectUse hvigorw to build HAP/APP packages
Install to deviceUse hdc to install the app on a device
Full pipelineClean → install deps → build → deploy to device

Why confirm first:

  • Different scenarios require different operations (e.g., incremental build vs clean build)
  • Avoid unnecessary time-consuming operations
  • Give user control over the workflow
  • Prevent accidental device installation

After user responds:

  • Execute only the selected operations
  • Report progress and results clearly

Quick Reference

# Build complete app (incremental)
hvigorw assembleApp --mode project -p product=default -p buildMode=release --no-daemon

# Install to device (Git Bash compatible)
# If you use Git Bash on Windows, disable MSYS path conversion for hdc commands.
export MSYS_NO_PATHCONV=1

INSTALL_DIR="//data/local/tmp/install_$(date +%s)"
hdc -t <UDID> shell "mkdir -p $INSTALL_DIR"
# Push files one-by-one to explicit remote file paths (most reliable on Git Bash)
for f in outputs/*.hap outputs/*.hsp; do
    [ -f "$f" ] && hdc -t <UDID> file send "$f" "$INSTALL_DIR/$(basename "$f")"
done

# Install (reinstall) HSPs first, then the HAP
for f in outputs/*.hsp outputs/*.hap; do
    [ -f "$f" ] && hdc -t <UDID> shell "bm install -p $INSTALL_DIR/$(basename \"$f\") -r"
done

hdc -t <UDID> shell "rm -rf $INSTALL_DIR"

Note: Build output path is outputs/.

Workflows

IMPORTANT: Build, clean, and deploy operations are long-running (build ~30s, file transfer ~20s). Always delegate these workflows to a subagent to avoid timeout. This also provides better error handling and clearer progress reporting to the user.

Clean Build & Deploy

Delegate to subagent with the following steps:

  1. Clean: hvigorw clean --no-daemon
  2. Install dependencies: ohpm install --all
  3. Build: hvigorw assembleApp --mode project -p product=default -p buildMode=release --no-daemon
  4. Deploy to device (see Push and Install below)
  5. Launch: hdc -t <UDID> shell "aa start -a EntryAbility -b <bundleName>"
  6. Report success/failure with details

Deploy Only (No Rebuild)

Delegate to subagent with the following steps:

  1. Read AppScope/app.json5 to get bundleName
  2. Check outputs/ for existing build outputs. If empty or missing, collect signed HAP/HSP from each module's build directory ({srcPath}/build/default/outputs/default/*-signed.*) into outputs/. See module-discovery.md for details.
  3. Deploy to device (see Push and Install below)
  4. Launch: hdc -t <UDID> shell "aa start -a EntryAbility -b <bundleName>"
  5. Report success/failure with details

Clean App Cache/Data

Delegate to subagent:

  1. Clean cache: hdc -t <UDID> shell "bm clean -n <bundleName> -c"
  2. Clean data: hdc -t <UDID> shell "bm clean -n <bundleName> -d"
  3. Report success/failure

Build Commands (hvigorw)

Incremental Build (Default)

Use incremental build for normal development - only changed modules are rebuilt:

# Build complete app (incremental)
hvigorw assembleApp --mode project -p product=default -p buildMode=release --no-daemon

Single Module Build

Build only a specific module for faster iteration:

# Build single HAP module
hvigorw assembleHap -p module=entry@default --mode module -p buildMode=release --no-daemon

# Build single HSP module
hvigorw assembleHsp -p module=my_feature@default --mode module -p buildMode=release --no-daemon

# Build single HAR module
hvigorw assembleHar -p module=library@default --mode module -p buildMode=release --no-daemon

# Build multiple modules at once
hvigorw assembleHsp -p module=module1@default,module2@default --mode module -p buildMode=release --no-daemon

Module name format: {moduleName}@{targetName}

  • moduleName: Directory name of the module (e.g., entry, my_feature)
  • targetName: Target defined in module's build-profile.json5 (usually default)

When to use single module build:

  • Developing/debugging a specific module
  • Faster build times during iteration
  • Testing changes in isolated module

Note: After single module build, you still need to run assembleApp to package the complete application for installation.

Clean Build (When Needed)

Only perform clean build when:

  • First time building the project
  • Encountering unexplained build errors
  • After modifying build-profile.json5 or SDK version
  • Dependency resolution issues
# Clean build artifacts
hvigorw clean --no-daemon

# Deep clean (for dependency issues)
ohpm clean && ohpm cache clean
ohpm install --all
hvigorw --sync -p product=default -p buildMode=release --no-daemon
hvigorw assembleApp --mode project -p product=default -p buildMode=release --no-daemon

Install Dependencies (ohpm)

# Install all dependencies (after clean or first clone)
ohpm install --all

# With custom registry
ohpm install --all --registry "https://repo.harmonyos.com/ohpm/"

Sync Project

Only needed after modifying build-profile.json5 or oh-package.json5:

hvigorw --sync -p product=default -p buildMode=release --no-daemon

Build Parameters

ParameterDescription
-p product={name}Target product defined in build-profile.json5
`-p buildMode={debug\release}`Build mode
-p module={name}@{target}Target module with --mode module
--mode projectBuild all modules in project
--mode moduleBuild specific module only
--no-daemonDisable daemon (recommended for CI)
--analyze=advancedEnable build analysis

Build Outputs

Build output path: outputs/

outputs/
├── entry-default-signed.hap
└── *.hsp

Module Types

TypeExtensionDescription
HAP.hapHarmony Ability Package - Application entry module
HSP.hspHarmony Shared Package - Dynamic shared library
HAR.harHarmony Archive - Static library (compiled into HAP)
APP.appComplete application bundle (all HAP + HSP)

Finding Modules

Modules are defined in build-profile.json5 at the project root. The module type is determined by the type field in {module}/src/main/module.json5:

type valueModule TypeBuild Command
"entry" / "feature"HAPassembleHap
"shared"HSPassembleHsp
"har"HARassembleHar

Module build outputs: {srcPath}/build/default/outputs/default/

For detailed module discovery, build output structure, and handling unwanted modules, see references/module-discovery.md.

Device Installation (hdc)

hdc (HarmonyOS Device Connector) is the CLI tool for device communication, similar to Android's adb.

Check Device

hdc list targets              # List connected devices (returns UDID)
hdc -t <UDID> shell "whoami"  # Test connection

Push and Install

# Create temp directory on device (Git Bash compatible)
# If you use Git Bash on Windows, disable MSYS path conversion for hdc commands.
export MSYS_NO_PATHCONV=1

INSTALL_DIR="//data/local/tmp/install_$(date +%s)"
hdc -t <UDID> shell "mkdir -p $INSTALL_DIR"

# Push files one-by-one to explicit remote file paths (most reliable on Git Bash)
for f in outputs/*.hap outputs/*.hsp; do
    [ -f "$f" ] && hdc -t <UDID> file send "$f" "$INSTALL_DIR/$(basename "$f")"
done

# Install (reinstall) HSPs first, then the HAP
for f in outputs/*.hsp outputs/*.hap; do
    [ -f "$f" ] && hdc -t <UDID> shell "bm install -p $INSTALL_DIR/$(basename \"$f\") -r"
done

# Clean up temp directory
hdc -t <UDID> shell "rm -rf $INSTALL_DIR"

Verify and Launch

# Check installation
hdc -t <UDID> shell "bm dump -n <bundleName>"

# Launch app (default ability)
hdc -t <UDID> shell "aa start -a EntryAbility -b <bundleName>"

Uninstall

hdc -t <UDID> shell "bm uninstall -n <bundleName>"

hdc Command Reference

CommandDescription
hdc list targetsList connected devices
hdc -t <UDID> shell "<cmd>"Execute shell command on device
hdc -t <UDID> file send <local> <remote>Push file/directory to device
hdc -t <UDID> file recv <remote> <local>Pull file/directory from device
hdc killKill hdc server
hdc startStart hdc server
hdc versionShow hdc version

Bundle Manager (bm)

Run via hdc -t <UDID> shell "bm...":

CommandDescription
bm install -p <path>Install from directory (all HAP/HSP)
bm install -p <file.hap>Install single HAP file
bm install -r -p <path>Reinstall (replace existing, keep data)
bm uninstall -n <bundleName>Uninstall application
bm dump -n <bundleName>Show package info
bm dump -aList all installed packages
bm clean -n <bundleName> -cClean application cache
bm clean -n <bundleName> -dClean application data

Ability Assistant (aa)

Run via hdc -t <UDID> shell "aa...":

CommandDescription
aa start -a <ability> -b <bundle>Start specific ability
aa force-stop <bundleName>Force stop application

Troubleshooting

ErrorCauseSolution
version code not sameHSP in output not in build-profile.json5Remove unwanted HSP files before install (see module-discovery.md)
install parse profile prop check errorSignature/profile mismatchCheck signing config in build-profile.json5; verify bundleName matches app.json5; check certificate not expired
install failed due to older sdk versionDevice SDK < app's compatibleSdkVersionUpdate device or lower compatibleSdkVersion
Device not foundConnection issueCheck USB; enable Developer Options (tap build number 7x) and USB debugging; hdc kill && hdc start; try different USB port/cable
signature verification failedInvalid or expired certificateRegenerate certificate in DevEco Studio; check validity period; ensure correct signing config for build type

Key Configuration Files

FileDescription
AppScope/app.json5App metadata (bundleName, versionCode, versionName)
build-profile.json5Modules list, products, signing configs
{module}/src/main/module.json5Module config (abilities, permissions)
{module}/oh-package.json5Module dependencies

Reference Files

Related Skills

  • arkts-development: ArkTS/ArkUI development patterns, state management, component lifecycle, and API usage. Use alongside this skill when developing HarmonyOS application code.

平台分布

Codex

37.93%
按下载量换算312

Claude

31.23%
按下载量换算257

Cursor

16.44%
按下载量换算135

Gemini CLI

9.06%
按下载量换算75

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/fadinglight9291117/arkts_skills --skill harmonyos-build-deploy 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills