HarmonyOS NEXT offline skill pack for DeepSeek Harness: 3700+ ArkTS/ArkUI/NDK documentation indices with DevEco simulator, UI testing, and performance trace automation scripts.
$ dsh plugin --profile web add github:linhay/harmony-next.skillsRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
harmony-next.skills is DeepSeek Harness's official HarmonyOS NEXT offline skill pack, bundling 3700+ ArkTS/ArkUI/NDK documents, DevEco toolchain documentation, and a set of executable Python automation scripts into a skill that can be instantly recalled during conversations, enabling the AI to provide verifiable HarmonyOS answers even without network access.
harmony-next skill into DSH conversations; the AI follows the hierarchical index SKILL.md → KITS.md/TASK_MAP.md → INDEX.md to hit real document paths, then reads only 1-3 target files to answerJsEtsAPIReference/ including modules/topics/types/errors/guides, plus IDE debugging, signing, publishing, multi-device adaptation, performance, and other topicsempty-ability-app template with Smoke UI and hdc + uitest verification pathsblocked JSON (with decision/failureCode/missingConfig) when script execution encounters missing environment, enabling AI to gracefully degrade to official CLI instead of infinite loopsnode:fs, node:url (index.js); scripts side depends on Python 3, optionally cv2/numpy/PIL/requests/scipy/skimage/werkzeug/opencc for UI/UX health checkspackage.json uses dsh.bundle.patch to point to cordis.patch.yml, injecting a provider named dsh-harmony-next; index.js's apply(ctx) registers a provider on ctx.skills that returns the harmony-next Skill definitionindex.js (DSH-side hook) + harmony-next/SKILL.md (skill content and frontmatter)When you need AI programming assistants (DSH, Gemini CLI, Claude Code, Codex, etc.) to answer HarmonyOS NEXT questions by looking up evidence in offline documents rather than guessing @ohos.* modules, ArkUI components, or DevEco commands based on model memory. Typical users are engineers doing ArkTS/ArkUI business development, NDK integration, emulator automation, or DevEco Studio debugging.
| Dependency | Minimum Version | Notes |
|---|---|---|
| DeepSeek Harness | 0.1.0-rc.6+ | Bundle real-device verification based on @deepseek-ai/dsh@0.1.0-rc.6, recorded by docs/agent-portability.md:89 |
| Node.js | Not declared | Source doesn't declare engines field; index.js only uses built-in modules like node:fs/node:url |
| Python | 3.x (recommended) | 6 tool scripts are Python 3 implementations; users need this when invoking scripts |
| DevEco Studio | Matches local | Only emulator/HDC/UI automation/Profiler script paths depend on it; pure document queries don't depend on it |
| Platform | Cross-platform | Bundle itself is cross-platform; script verified paths mainly on macOS, Windows/Linux need self-verification |
| Native modules | None | index.js doesn't depend on any native modules |
dsh plugin --profile web add github:linhay/harmony-next.skills
This plugin requires no additional configuration.
After installation, index.js reads frontmatter fields like description, metadata.version, whenToUse from harmony-next/SKILL.md, and registers them to DSH's ctx.skills provider list with bundled source and rank=600; the two boolean fields disable-model-invocation and user-invocable are also automatically parsed from frontmatter (former defaults to off, latter to on).
Q: What exactly does this plugin do?
A: It injects a skill named harmony-next into DSH. After entering the conversation, the AI searches the local 3700+ HarmonyOS documents following the path SKILL.md → KITS/TASK_MAP → INDEX, and calls Python scripts as needed for DevEco emulator launch, HDC evidence collection, UI/UX health checks, and Profiler trace auditing.
Q: Why can't I see a new tool icon after installation?
A: Normal. This bundle only registers Skills, not MCP/tools/apps; you should see the harmony-next skill using the / command or skills list.
Q: Do I need to install DevEco Studio first to use it?
A: Not for pure document scenarios like querying APIs, writing ArkUI components, or viewing NDK header files; you only need local DevEco when running emulator, HDC, UI automation, or performance trace scripts.
Q: What if the documentation data doesn't match Huawei's official website?
A: The built-in references/ is an offline snapshot of API 12-23, not fetched in real-time; when users ask about "latest version" or encounter new APIs, the skill rules require comparing with GitHub Releases and checking Huawei's online documentation.
Q: Can the emulator scripts run on Windows or Linux?
A: The scripts themselves are cross-platform, but the repository-verified paths for hvd_manager.py launch, device_evidence_bundle.py mainly work on macOS DevEco installations; Windows/Linux need self-verification of DevEco installation paths, image root directories, and HDC port mappings.
Q: How much space does the bundle take?
A: The references/ offline documents alone are about 54 MB, plus 10 scripts and tests, making it significantly larger than ordinary skill packs; ensure sufficient disk space before installation.
Q: How to uninstall?
A: Like other profile bundles, remove dsh-harmony-next from the DSH profile's bundle layer; you can also manually delete ~/.dsh/skills/harmony-next/ or .dsh/skills/harmony-next/ directories.
Beginner — the bundle is ready to use after installation with no configuration or hooks needed; if only using document retrieval, you don't even need to touch the scripts; running emulators or trace toolchains requires step-by-step configuration of the local DevEco environment.
references/ is a snapshot of API 12-23; when encountering "latest interfaces" or new APIs, must check official online documentation (harmony-next/SKILL.md:18-20)hvd_manager.py download-image returns blocked; currently verified path is still DevEco Studio SDK Manager UI operation (harmony-next/SKILL.md:88)--accept-license after user has read the agreement; scripts won't check this for you by default (harmony-next/scripts/hvd_manager.py:670-671)cv2/numpy/PIL, scripts directly error with missingConfig=["uxPythonDependencies"] instead of degrading (harmony-next/SKILL.md:72)devecostudio://, UxTestService, hdc/uitest automation, etc.) are version-sensitive capabilities; plugin ID, paths, ports, and parameters must be re-confirmed before use; documentation explicitly states "not wrapping private interfaces into stable public APIs" (harmony-next/SKILL.md:177-181)给 Gemini CLI、Claude Code、Codex 等 AI 编程助手使用的 HarmonyOS NEXT 离线参考技能库。
面向 API 12-23 的本地知识源,覆盖 ArkTS、ArkUI、NDK、工具链、调试、发布与多端适配。
AI 编程助手在 HarmonyOS 开发中经常碰到的几类问题:
@ohos.* 模块的真实文档hdc、uitest 等本地自动化的验证路径不清晰本仓库把这些不确定性变成可定位、可跳转、可验证的本地文件查询。
没有 skill:模型凭记忆猜 @ohos.* 模块、ArkUI 组件名或 DevEco 命令,答案看起来合理但缺少来源。
使用本 skill:先按 SKILL.md → KITS.md / TASK_MAP.md → INDEX.md 命中文档路径,再打开目标 Markdown,最后给出代码片段和 hdc / uitest / wrapper 脚本验证命令。
SKILL.md → KITS/TASK_MAP → INDEX 层层递进检索empty-ability-app 模板,可直接复制用于 smoke 测试| 入口 / 模块 | 用途 |
|---|---|
SKILL.md | 技能规则唯一来源:告诉 Agent 如何检索、哪些内容优先信文档 |
references/KITS.md | 按 Kit 导航(AbilityKit、ArkUI、ArkData…) |
references/TASK_MAP.md | 按任务反查(UI、网络、媒体、NDK…) |
references/INDEX.md | 全库文件索引(3,708 个 Markdown 路径) |
JsEtsAPIReference/INDEX.md | API 分桶索引(modules、topics、errors…) |
references/templates/empty-ability-app | 可复制的 HarmonyOS NEXT smoke fixture(最小工程) |
docs/agent-portability.md | Agent 安装与适配路径说明 |
harmony-next/references/ | 所有 Markdown 正文(含 3,678 个 API 文档) |
自动化与诊断脚本(按需使用):
| 脚本 | 功能 | 入口命令示例 |
|---|---|---|
commandline_tools_manager.py | Command Line Tools 下载与安装 | python3 harmony-next/scripts/commandline_tools_manager.py install ... |
device_evidence_bundle.py | 设备证据采集与 WebView DevTools 转发诊断 | python3 harmony-next/scripts/device_evidence_bundle.py webview-devtools ... |
device_ui_action.py | 单次 UI 操作与前后证据采集 | python3 harmony-next/scripts/device_ui_action.py tap ... |
ux_audit_pipeline.py | 一键离线 UI/UX 体检 | python3 harmony-next/scripts/ux_audit_pipeline.py doctor ... |
profiler_trace_audit.py | 离线 Trace 性能审计 | python3 harmony-next/scripts/profiler_trace_audit.py audit ... |
hvd_manager.py | HVD 设备管理 | python3 harmony-next/scripts/hvd_manager.py doctor ... |
特殊领域文档:
DevEco模拟器私有接口与AI自动化.mdArkWeb WebView CDP调试与字段到达证明.mdDevEco Studio IDE私有接口与AI自动化.mdminimal-project-scaffold.mdnpx skills add linhay/harmony-next.skills
当前仓库只有一个 skill,直接运行上面的命令会自动安装 harmony-next。如果想先查看可用技能:
npx skills add linhay/harmony-next.skills --list
gemini skills install https://github.com/linhay/harmony-next.skills --path harmony-next --scope user
npx skills add linhay/harmony-next.skills --skill harmony-next -a claude-code -g -y --copy
或手动添加仓库目录:
git clone https://github.com/linhay/harmony-next.skills.git
claude --add-dir /path/to/harmony-next.skills/harmony-next
npx skills add linhay/harmony-next.skills --skill harmony-next -a codex -g -y --copy
本仓库当前还不是 Codex plugin;
npx skills只会把 skill 安装到 Codex 可扫描的 skill 目录,不会安装 MCP/tools/apps。
也可手动放入官方路径(常用如 $HOME/.agents/skills/harmony-next;完整路径见 docs/agent-portability.md)。
本仓库提供官方 DSH profile bundle dsh-harmony-next。推荐通过 DSH profile 安装:
# 从 GitHub 安装
dsh plugin --profile demo add github:linhay/harmony-next.skills
# 或从本地 checkout 安装
dsh plugin --profile demo add /path/to/harmony-next.skills
# 检查 bundle layer
dsh --profile demo --dump-config
Bundle 只注册 harmony-next skill 及其离线参考资源,不安装 MCP、tools 或 apps。DSH bundle 的 manifest 是根目录的 package.json,patch 是 cordis.patch.yml。
如果只需要 filesystem skill,也可以手动安装到 DSH 的兼容根目录:
# DSH_SOURCE 指向本仓库的本地 checkout
DSH_SOURCE=/path/to/harmony-next.skills
# 项目级 skill
mkdir -p .dsh/skills/harmony-next
cp -R "$DSH_SOURCE/harmony-next/." .dsh/skills/harmony-next/
# 或用户级 skill(默认 ~/.dsh/skills)
mkdir -p "$HOME/.dsh/skills/harmony-next"
cp -R "$DSH_SOURCE/harmony-next/." "$HOME/.dsh/skills/harmony-next/"
DSH 也支持 .agents/skills、$DSH_AGENTS_HOME/skills 等兼容根目录;发现优先级和更新方式见 docs/agent-portability.md。
各 Host 只负责加载 skill;HarmonyOS 检索规则以 harmony-next/SKILL.md 为准。
SKILL.md → KITS.md / TASK_MAP.md → INDEX.md → 目标 Markdown
设计原则:先定规则,再按 Kit 或任务缩小范围,用索引命中真实路径,最后只打开 1-3 个文件读细节。
hdc/uitest 自动化、抓包诊断涉及 DevEco 模拟器、IDE 私有接口、设备日志、截图、抓包、HVD 创建/删除等操作时,必须先阅读对应的私有接口文档。这些流程要求:
blocked 输出私有接口文档入口:
DevEco 模拟器私有接口 触发词:DevEco Studio、HarmonyOS Emulator、免 IDE 启动、HVD、hdc、uitest、aa、bm、snapshot_display 等。
规则:先读 SKILL.md 的私有接口章节,每次执行前重新验证版本和能力;在用户已授权的本地环境内,自动化策略用于描述执行模式、产物目录和脱敏契约;wrapper 脚本阻塞时建议先尝试官方 CLI 路径采集证据。
DevEco Studio IDE 私有接口 触发词:CodeGenie、MCP、devecostudio://、inspect.sh、ArkUI Inspector、Profiler、UxTestService 等。
规则:默认只做静态只读分析(插件 XML、jar、配置、离线 trace 等);启动 IDE/GUI、本地服务、设备连接、MCP 配置等需记录目标、产物和脱敏边界;离线 trace 审计和 UI/UX 体检只使用已验证的 wrapper 脚本和规则子集。
完整细节请务必查阅上述两份文档。
| 版本 | 关键更新 |
|---|---|
v1.3.35 | 增加 DeepSeek Harness(DSH)官方 profile bundle 与 filesystem skill fallback 适配 |
v1.3.30 | 模拟器应用沙箱速查与 HVD doctor 的 DevEco Emulator 优先级修正 |
Unreleased | 一键离线 UI/UX 体检 CLI(ux_audit_pipeline.py) |
Unreleased | 设备调试证据包 CLI(device_evidence_bundle.py) |
Unreleased | 离线 Trace 性能审计 CLI(profiler_trace_audit.py) |
Unreleased | HVD launch 改进:trace socket 守护、镜像校验、许可协议处理 |
Unreleased | WebView DevTools 诊断、CDP 字段证明、单次 UI 操作证据与 Emulator 崩溃分类 |
v1.3.23 | Release workflow 更新到 Node 24 |
v1.3.7 | 新增可复制最小测试工程模板;SDK 版本适配验证(含 6.0.2(22));uitest smoke |
v1.3.6 | 模拟器非交互自动化策略 |
v1.3.5 | DevEco Studio IDE 私有接口参考 |
v1.2.0 | API 23 纳入;索引重建;链接兼容审计 |
参考库更新后运行校验:
python3 harmony-next/scripts/check_packaging_docs.py
python3 harmony-next/scripts/reference_compat.py generate
python3 harmony-next/scripts/reference_compat.py check
python3 harmony-next/scripts/reference_compat.py audit
python3 -m unittest discover -s harmony-next/tests -p 'test_*.py' -v
感谢 LINUX DO 的支持。