oh-skillhub:基于 OpenHarmony 的 skill 统一安装工具

openharmony统一分发管理工具

分支4Tags0

oh-skillhub

OpenHarmony skill 统一安装工具。通过 npx 一次性为 Codex、Claude Code、OpenCode 安装、更新和清理 OpenHarmony skill,并默认上报匿名安装统计,方便在看板中观察各类 skill 的使用情况。

npx oh-skillhub@latest

npx 会临时拉取并运行 npm 包,不需要提前全局安装 oh-skillhub。

不带参数运行时会进入交互式 TUI。你可以选择安装 skill、清理已安装 skill,随后选择目标 Agent 和具体领域。

适用场景

  • 想把 OpenHarmony skill 快速安装到 Codex、Claude Code 或 OpenCode。
  • 想按领域安装,例如 arkui、security、testing、cicd。
  • 想按 skills/common/<stage>/ 目录安装某一阶段的通用 skill,例如 --common design。
  • 想一键安装 skills/common 下的全部通用 skill。
  • 想清理某个 Agent 里已经安装过的 skill。
  • 想按中立源结构安装 ohos-delivery-kit 这类 OpenHarmony workflow 插件。
  • 想统计每个 skill、每个领域、每个 Agent 的安装次数。

快速开始

交互式安装:

npx oh-skillhub@latest

一行命令安装全部 common skill:

npx oh-skillhub@latest install --all-common --agent codex --scope user

给所有 Agent 安装 ArkUI 相关 skill:

npx oh-skillhub@latest install --domain arkui --agent all --scope user

安装某一阶段的通用 skill(skills/common/<stage>/):

npx oh-skillhub@latest install --common design --agent codex --scope user

安装 workflow 插件:

Plugin list is discovered from the remote openharmony-skills#release workspace manifest. Add or remove installable workflow plugins in .ohos-agent/workspace.yaml, not in oh-skillhub code:

npx oh-skillhub@latest plugin list
npx oh-skillhub@latest plugin list --verbose
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin status ohos-delivery-kit --agent all --scope user --verbose
npx oh-skillhub@latest plugin doctor ohos-delivery-kit --agent all --scope user

安装单个 skill:

npx oh-skillhub@latest install ohos-dev-cpp-coding-style --agent codex

查看已安装 skill 并试运行清理:

npx oh-skillhub@latest clean --agent claude --scope user --dry-run

交互式 TUI

运行 npx oh-skillhub@latest 后会先选择操作:

  • Install skills:安装 skill。
  • Clean installed skills:扫描并清理已安装 skill。

安装流程:

  1. 选择目标:Codex、Claude、OpenCode 或 All。
  2. 选择 skill 分组,例如 common / all、common / testing、domain / arkui、domain / test。domain 分组由 skills/domain/<folder>/ 实际目录决定。
  3. 按 Enter 确认安装。

快捷键:

  • Up / Down 或 j / k:移动光标。
  • Space:选择或取消选择。
  • Enter:确认当前页面。
  • Ctrl+C:退出。

如果终端不支持交互式按键,也可以用数字输入:

printf "1\n1\n1\n" | npx oh-skillhub@latest

常用命令

oh-skillhub list [--domain <name>] [--common <stage>] [--stage <name>] [--preset <name>] [--offline]
oh-skillhub install [skill...] [--name <skill>] [--domain <name>] [--common <stage>] [--preset <name>] [--all-common] [--agent codex|claude|opencode|all]
oh-skillhub update [skill...] [--agent codex|claude|opencode|all] [--scope user|project] [--offline]
oh-skillhub update-all [--agent codex|claude|opencode|all] [--scope user|project] [--offline]
oh-skillhub clean [skill...] [--agent codex|claude|opencode|all] [--scope user|project] [--dry-run] [--purge]
oh-skillhub doctor [--agent codex|claude|opencode|all]
oh-skillhub plugin list [--verbose]
oh-skillhub plugin install <plugin> [--agent codex|claude|opencode|all] [--scope user|project] [--dry-run] [--force] [--atomic] [--strict]
oh-skillhub plugin update <plugin> [--agent codex|claude|opencode|all] [--scope user|project] [--dry-run] [--force] [--atomic] [--strict]
oh-skillhub plugin uninstall <plugin> [--agent codex|claude|opencode|all] [--scope user|project] [--dry-run] [--atomic]
oh-skillhub plugin status <plugin> [--agent codex|claude|opencode|all] [--scope user|project] [--verbose]
oh-skillhub plugin doctor <plugin> [--agent codex|claude|opencode|all] [--scope user|project] [--scan-legacy] [--fix] [--force] [--all-scopes] [--allow-materialized-copy]
oh-skillhub plugin manifest <plugin> [--agent codex|claude|opencode|all] [--out <dir>] [--check] [--scope user|project]
oh-skillhub plugin gc [--scope user|project] [--dry-run]
oh-skillhub plugin repair [--scope user|project]
oh-skillhub plugin enable <plugin> --agent codex|claude|opencode [--scope user|project]
oh-skillhub plugin disable <plugin> --agent codex|claude|opencode [--scope user|project]
oh-skillhub plugin migrate <plugin> [--agent codex|claude|opencode|all] [--scope user|project] [--atomic]
oh-skillhub telemetry status

查看 skill

npx oh-skillhub@latest list
npx oh-skillhub@latest list --domain arkui
npx oh-skillhub@latest list --common cicd
npx oh-skillhub@latest list --stage testing
npx oh-skillhub@latest list --preset requirements
npx oh-skillhub@latest list --domain ohos-req

按领域安装

npx oh-skillhub@latest install --domain arkui --agent codex
npx oh-skillhub@latest install --domain security --agent all --scope user

--domain <name> 会匹配 skill.metadata.domain 字段和 skills/domain/<name>/ 目录路径。例如 --domain test 会安装 skills/domain/test/ 下的全部 skill,即使这些 skill 的 metadata.domain 是 arkts 或 capi。

按通用阶段安装

--common <stage> 安装 skills/common/<stage>/ 目录下的全部通用 skill,只匹配 scope: common,不会纳入 domain skill。

npx oh-skillhub@latest install --common development --agent codex
npx oh-skillhub@latest install --common design --agent all --scope user
npx oh-skillhub@latest install --common cicd --agent codex --scope user

常用阶段:cicd、design、development、requirements、testing、troubleshooting。

按预设安装

当前内置预设:

Preset 说明
baseline 常用 OpenHarmony 开发基础 skill
arkui ArkUI 开发与代码审查
app-dev ArkTS、NAPI、HDC 等应用开发场景
cicd CI/CD 与 GitCode 工作流
testing XTS、fuzz 等测试生成
security 安全开发与安全审查

示例:

npx oh-skillhub@latest install --preset app-dev --agent opencode --scope project
npx oh-skillhub@latest install --preset requirements --agent opencode --scope user
npx oh-skillhub@latest install "ohos-req-*" --agent opencode --scope user

安装 workflow 插件

install 也支持安装按中立源结构交付的插件包。当前支持:

Plugin 说明
ohos-delivery-kit OpenHarmony 交付件工作流插件,包含 ODK Skills、session router、templates、profiles、contracts、rules、adapters 和 validator

示例:

npx oh-skillhub@latest plugin install ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent all --dry-run

Uninstall workflow plugins:

npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent all --scope user --dry-run

Update workflow plugins from the latest remote source:

npx oh-skillhub@latest plugin update ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent all --scope user --dry-run

插件安装会优先读取仓库中的 workspace 清单,再按清单定位插件:

.ohos-agent/workspace.yaml
workflows/ohos-delivery-kit/plugin.yaml

plugin.yaml 中声明的 Skills、Prompt、Hook、Asset、Executable 和 command projection 会被转换成面向不同 Agent 的安装载荷。插件的 Skills、session router prompt、templates、profiles、contracts、runtime assets、CLI/executable 和生成的宿主投影都会放在同一个插件包目录:

<agent-skill-root>/.oh-skillhub/plugins/<plugin>/<agent>/
├── .codex-plugin/ 或 .claude-plugin/
├── .opencode/
├── .ohos-channel
├── skills/
├── prompts/
├── assets/
├── executables/
├── bin/
├── hooks/
└── generated/

安装过程会在 .oh-skillhub/installed.json 中记录插件文件摘要。V2 安装会在 projection 目录写入 .ohos-channel 标记文件,记录安装通道(openharmony-skills)、版本和时间戳,用于双通道冲突检测。

不同 Agent 会生成对应原生注册文件:

Agent 原生文件
Codex .codex-plugin/plugin.json、hooks/hooks.json、hooks/session-start
Claude Code .claude-plugin/plugin.json、hooks/hooks.json、hooks/run-hook、hooks/session-start
OpenCode package.json、.opencode/plugins/<plugin>.js、.opencode/commands/*.md

除 plugin install 外,plugin manifest 命令也可独立生成上表全部原生文件(含 marketplace.json、hooks、commands),供未走安装流程、直接从中性源仓库(openharmony-skills 通道)拷贝使用的场景补齐平台原生结构。

如果目标目录中已经存在未被 oh-skillhub 记录管理的插件包目录,安装会报告冲突并停止。确认要接管旧目录时再使用:

npx oh-skillhub@latest plugin install ohos-delivery-kit --agent codex

marketplace 通道冲突检测

plugin install 在安装前会检测目标是否已通过 marketplace 通道(oshunter/ohos-marketplace)安装了同名插件。检测覆盖:

Agent 检测点
Claude Code ~/.claude/known_marketplaces.json 中的 ohos-marketplace 条目、~/.claude/installed_plugins.json 中的 <plugin>@ohos-marketplace 引用
Codex config.toml 中 [plugins."<plugin>@ohos-marketplace"] 和 [marketplaces.ohos-marketplace] 段
OpenCode opencode.json 中含 ohos-marketplace 的 plugin 条目

如果检测到 marketplace 通道已安装,安装会被阻断并提示冲突详情。此时可以:

  • 先用 plugin uninstall 或 marketplace 侧命令卸载旧通道安装,再重新运行 plugin install。
  • 使用 --force 强制覆盖(不推荐,可能导致 packaging 结构混合残留):
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent claude --force

安装成功后,oh-skillhub 会在 projection 目录写入 .ohos-channel 标记文件,记录 channel: openharmony-skills、版本和安装时间,供 marketplace 通道侧检测。--dry-run 也会显示冲突和降级警告。

事务化安装与冲突阻断(opt-in)

以上 marketplace 通道冲突检测与降级警告是默认始终运行的。以下能力为 opt-in,需显式加开关才生效,不加任何开关时安装行为与默认一致:

开关 作用
--atomic 事务化安装/更新/卸载:scope 级排他锁防止并发损坏 registry;projection 先在 staging 构建再原子切换;任一 host 注册失败自动回滚已成功 host(卸载注册 + 恢复旧 projection);崩溃后下次操作通过 journal 恢复一致状态;提交后顺带 GC 回收旧 digest store
--no-gc 关闭 --atomic 提交后的顺带 GC(默认开启)
--strict 严格冲突阻断:同版本但内容不同(防不可追踪重发)、降级、同名独立 skill shadow 默认阻断;同内容重装直接 SKIP(真幂等,不重写 projection/registry)
--replace-same-version 配合 --strict 覆盖"同版本异内容"阻断
--allow-downgrade 配合 --strict 覆盖降级阻断
--all-scopes plugin doctor 同时检查另一 scope,报告 user/project shadow
--allow-materialized-copy plugin doctor 对 materialized-copy projection(链接失败回退为复制)由 fail 降为 warn

事务化示例:

npx oh-skillhub@latest plugin install ohos-delivery-kit --agent all --scope user --atomic --strict
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent all --scope user --atomic
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent codex --scope user --strict   # 同内容 -> SKIP
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent codex --scope user --strict --replace-same-version

事务化失败时会输出 atomic install aborted: host <agent> registration failed 并回滚,registry 不推进、已切换的 projection 恢复、staging 清空、锁释放。

维护命令

npx oh-skillhub@latest plugin gc --scope user --dry-run        # 预览 orphan store / dangling projection / trash / staging
npx oh-skillhub@latest plugin gc --scope user                   # 清理上述残留(含 pendingGc store)
npx oh-skillhub@latest plugin repair --scope user               # journal 崩溃恢复 + GC,恢复一致状态
npx oh-skillhub@latest plugin enable ohos-delivery-kit --agent claude --scope user    # 启用某 host,不卸载
npx oh-skillhub@latest plugin disable ohos-delivery-kit --agent claude --scope user   # 禁用某 host,不卸载
npx oh-skillhub@latest plugin migrate ohos-delivery-kit --agent all --scope user       # v2 安装 + 清理 legacy-copy 旧副本
  • plugin gc:回收不被任何 registry 引用的 store digest、dangling projection、残留 trash 与 staging,以及 pendingGc 标记的插件(最后一个 host 卸载后置 pendingGc,由 GC 真正删除 store + registry 条目)。
  • plugin repair:先 recoverJournal(回滚未完成事务或完成提交收尾),再跑一次 GC。
  • plugin enable/disable:只改 registry 中 host 的 enabled 字段,不删除 store 或 projection,与 install/uninstall 分离。
  • plugin migrate:执行一次 v2 安装,并清理目标 Agent 下未被 v2 接管的旧版(legacy-copy)payload 与 installed.json 记录,不动 host 注册配置。

Uninstall only removes plugin payloads managed by oh-skillhub and updates host registration/config. Files with a changed checksum are kept unless --force is provided:

npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent codex --scope user
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent codex --scope user --dry-run

oh-skillhub plugin update <plugin> refreshes the remote openharmony-skills#release source, regenerates the canonical store/projection payload, and updates the scope registry.

Workflow plugin diagnostics:

npx oh-skillhub@latest plugin install ohos-delivery-kit --agent all --scope user
npx oh-skillhub@latest plugin status ohos-delivery-kit --agent all --scope user --verbose
npx oh-skillhub@latest plugin doctor ohos-delivery-kit --agent all --scope user

plugin install is the Phase 2 entrypoint for the single-instance plugin lifecycle migration. It writes a canonical scope store under .oh-skillhub/store, generates host projections under .oh-skillhub/projections, and records ownership in .oh-skillhub/registry.json.

plugin status and plugin doctor report current legacy-copy payloads, v2 registry/store/projection state, host marketplace/config state, checksum mismatches, and independent skills that may shadow plugin skills.

扫描与清理跨源残留 (--scan-legacy)

plugin doctor --scan-legacy 检测某个插件在 V2 安装之外由旧版(dev repo、marketplace、oh-skillhub 旧版安装)留下的跨源残留,并可选地清理它们。检测覆盖三类来源 × 三个 Agent:

来源 Agent 检测点
dev-repo Codex config.toml 中 [plugins."<plugin>@<plugin>-local"]、[plugins."<plugin>@local"]、[marketplaces."<plugin>-local"]
marketplace Codex config.toml 中 [plugins."<plugin>@ohos-marketplace"]、[marketplaces."ohos-marketplace"]
oh-skillhub 旧版 Codex ~/.codex/skills/<canonical-skill> 残留目录
dev-repo / marketplace Claude ~/.claude/known_marketplaces.json、~/.claude/installed_plugins.json 条目
oh-skillhub 旧版 Claude ~/.claude/skills/<canonical-skill> 残留目录
dev-repo / marketplace OpenCode opencode.json 中 plugins 条目
oh-skillhub 旧版 OpenCode bare JS 文件、odk 目录、owned-files、.ohos-<plugin>-opencode-install.json manifest、skills/(复) 与 skill/(单) 目录

canonical skill 名来自插件源 workflows/<plugin>/skills/,不依赖已安装的 V2 载荷,因此即使插件已卸载也能定位残留。

npx oh-skillhub@latest plugin doctor ohos-delivery-kit --agent all --scan-legacy
npx oh-skillhub@latest plugin doctor ohos-delivery-kit --agent all --scan-legacy --fix
npx oh-skillhub@latest plugin doctor ohos-delivery-kit --agent all --scan-legacy --fix --force

清理行为:

  • --scan-legacy:仅检测并输出残留清单(dry-run)。
  • --fix:移除检测到的残留,默认移动到 ~/.oh-skillhub/trash/legacy/,便于恢复。需要 --scan-legacy。
  • --force:永久删除而非移到 trash。需要 --fix。

安全规则:

  • V2 自身残留(v2-self):当 V2 安装仍存在时,其对应的 host 注册条目不会被 --fix 自动移除,而是以 info 提示改用 plugin uninstall,避免误删正在使用的安装。V2 已卸载但残留配置(v2-stale)才会被直接清理。
  • canonical 不可用时的 pattern 兜底:当无法从插件源解析 canonical skill 列表时,退回到 ohos-* 目录名匹配的检测只用于展示(source 标为 pattern-scan、level 为 info),不参与清理,避免误删合法的独立 common skill。
  • 配置文件(config.toml、opencode.json、known_marketplaces.json)在清理前会自动备份到同目录的 .bak。
  • 清理完成后会自动运行一次 V2 doctor,确认无遗留告警。

无残留时的输出示例:

Plugin legacy doctor: ohos-delivery-kit
scope: user

canonical skills: ohos-clarify, ohos-design, ohos-plan, ...
v2 install: absent

summary: 0 residual(s), 3 info
INFO: codex:user no legacy residuals
INFO: claude:user no legacy residuals
INFO: opencode:user no legacy residuals

Agent-specific plugin commands:

npx oh-skillhub@latest plugin install ohos-delivery-kit --agent codex --scope user
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent codex --scope user
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent codex --scope user
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent claude --scope user
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent claude --scope user
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent claude --scope user
npx oh-skillhub@latest plugin install ohos-delivery-kit --agent opencode --scope user
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent opencode --scope user
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent opencode --scope user

Project-scope plugin commands:

npx oh-skillhub@latest plugin install ohos-delivery-kit --agent all --scope project
npx oh-skillhub@latest plugin update ohos-delivery-kit --agent codex --scope project
npx oh-skillhub@latest plugin uninstall ohos-delivery-kit --agent codex --scope project

从中性源生成平台原生 manifest

plugin manifest 不执行安装,只从中性 plugin.yaml 生成全套平台原生结构(manifest + hooks + marketplace + opencode 插件/命令),供裸 clone openharmony-skills 源仓后直接拷贝使用的通道补齐各平台原生 manifest 和版本号:

npx oh-skillhub@latest plugin manifest ohos-delivery-kit --agent all --out ./dist

该命令会读取 plugin.yaml 的 compatibility.targets.<agent>.strategy 并据此决定是否为对应 Agent 生成:generate-native-plugin / generate-install-payload / 缺省 → 生成;none / skip → 跳过。其中 claude-code 键会自动映射到内部 claude agent。

对比已安装版本与源版本,检测是否需要升级(三态:not-installed / up-to-date / upgrade-available):

npx oh-skillhub@latest plugin manifest ohos-delivery-kit --agent codex --check
npx oh-skillhub@latest plugin manifest ohos-delivery-kit --agent all --check

一键安装 common

交互式 TUI 中选择 common / all,或直接运行:

npx oh-skillhub@latest install --all-common --agent codex --scope user
npx oh-skillhub@latest install --all-common --agent all --scope user

如果只需要某一阶段,用 --common <stage>:

npx oh-skillhub@latest install --common design --agent codex --scope user

试运行

--dry-run 只展示计划,不会写入文件:

npx oh-skillhub@latest install --domain arkui --agent all --dry-run
npx oh-skillhub@latest clean --agent claude --scope user --dry-run

Agent 安装目录

Agent User scope Project scope
Codex $CODEX_HOME/skills,未设置时为 ~/.codex/skills <cwd>/.codex/skills
Claude Code ~/.claude/skills <cwd>/.claude/skills
OpenCode ~/.config/opencode/skills <cwd>/.opencode/skills

--agent all 会同时安装到 Codex、Claude Code 和 OpenCode。

清理 skill

扫描并交互式清理:

npx oh-skillhub@latest clean --agent claude --scope user

清理指定 skill:

npx oh-skillhub@latest clean --agent claude --scope user ohos-test-capi-xts-generation

默认清理方式是移动到 .oh-skillhub/trash,便于恢复。需要永久删除时使用:

npx oh-skillhub@latest clean --agent claude --scope user --purge

skill 来源与下载方式

默认 skill 仓库:

https://gitcode.com/openharmonyinsight/openharmony-skills/tree/release

工具会从 release 分支读取最新目录结构,并按需下载被选中的完整 skill 目录,而不是只生成一个 SKILL.md 占位文件。运行时优先使用远端最新目录;如果网络或 GitCode 访问失败,会回退到本地缓存和 npm 包内置清单。

要求:

  • Node.js 18+
  • 本机可运行 npx
  • 建议安装 git,用于刷新远端 skill 目录和按需下载

安装统计

oh-skillhub 默认会上传匿名安装事件到统计服务,用于统计:

  • 每个 skill 的安装次数
  • 每个领域和阶段的安装次数
  • Codex、Claude Code、OpenCode 的安装分布
  • 最近安装事件

默认上报地址:

https://skillhub.openharmonyhub.cn/api/oh-skillhub/events

查看统计看板:

https://skillhub.openharmonyhub.cn/dashboard

看板标题为 OH SkillHub skill安装看板,支持按时间、Agent、领域、skill 名称筛选。

查看 telemetry 状态:

npx oh-skillhub@latest telemetry status

如果上传失败,事件会进入本地队列,后续命令会继续尝试上报:

~/.cache/oh-skillhub/telemetry-queue.jsonl

禁用单次命令上报:

npx oh-skillhub@latest install --domain arkui --no-telemetry

禁用当前 shell 的所有上报:

OH_SKILLHUB_NO_TELEMETRY=1 npx oh-skillhub@latest

PowerShell:

$env:OH_SKILLHUB_NO_TELEMETRY="1"
npx oh-skillhub@latest

隐私说明

Telemetry 只记录匿名安装统计,不包含:

  • 用户名
  • 邮箱
  • 本地安装路径
  • 本地仓库内容
  • skill 文件内容
  • 业务代码内容

匿名客户端 ID 保存在本机缓存目录中,仅用于估算独立客户端数量。

私有 collector

如果需要接入自己的统计服务,可以覆盖上报地址:

Bash:

OH_SKILLHUB_TELEMETRY_URL=https://skillhub.example.com/api/oh-skillhub/events \
npx oh-skillhub@latest

PowerShell:

$env:OH_SKILLHUB_TELEMETRY_URL="https://skillhub.example.com/api/oh-skillhub/events"
npx oh-skillhub@latest

仓库内的 collector/ 是统计服务端实现,不会随 npm 包发布。部署说明见 collector/README.md。

开发

运行测试:

npm test
npm test --prefix collector

本地运行 CLI:

node bin/oh-skillhub.js list --domain arkui
node bin/oh-skillhub.js install --domain arkui --agent all --scope user --dry-run

本地运行 collector:

cd collector
npm install
npm test
npm start

故障排查

确认 Agent 目录:

npx oh-skillhub@latest doctor --agent all

安装前先看计划:

npx oh-skillhub@latest install --domain arkui --agent all --dry-run

网络或 GitCode 访问失败时:

  • 确认本机能访问 GitCode。
  • 确认 git 在 PATH 中。
  • 重新运行命令,工具会复用本地缓存。

如果清理前不确定会删除什么,先使用 --dry-run。

plugin install/update --atomic 输出 atomic install aborted: host <agent> registration failed 时,表示该 host 的原生 CLI 注册失败并已自动回滚(registry 未推进、projection 恢复)。常见原因是该 host CLI 自身配置不可用(例如 codex 报 failed to load configuration,需检查 ~/.codex/config.toml),并非 oh-skillhub 的问题。修好 host 配置后重试,或先用 --agent <可用 agent> 单端安装。

Claude Code plugin lifecycle

For Claude Code, oh-skillhub plugin install <plugin> --agent claude builds the canonical store projection and registers a local Claude marketplace. It does not run claude plugin install, claude plugin update, or claude plugin uninstall.

After oh-skillhub reports successful marketplace registration, manage the plugin with Claude Code's native commands:

claude plugin install ohos-delivery-kit@ohos-delivery-kit-local
claude plugin update ohos-delivery-kit@ohos-delivery-kit-local
claude plugin uninstall ohos-delivery-kit@ohos-delivery-kit-local
claude plugin list

oh-skillhub plugin uninstall <plugin> --agent claude attempts claude plugin uninstall and removes the local marketplace before deleting the projection.

Codex plugin lifecycle

For Codex, oh-skillhub plugin install <plugin> --agent codex builds the canonical store projection, registers a local Codex marketplace, and enables the plugin in CODEX_HOME/config.toml:

[plugins."ohos-delivery-kit@ohos-delivery-kit-local"]
enabled = true

After installation, restart Codex or open a new Codex task.

oh-skillhub plugin uninstall <plugin> --agent codex removes the local marketplace, deletes the plugin enable section from CODEX_HOME/config.toml, and deletes the projection.

OpenCode plugin lifecycle

For OpenCode, oh-skillhub plugin install <plugin> --agent opencode builds the canonical store projection and delegates registration to OpenCode's native plugin installer:

opencode plugin <generated-plugin-path> --force --global

After installation, restart OpenCode or open a new OpenCode session.

oh-skillhub plugin uninstall <plugin> --agent opencode removes the generated plugin path from OpenCode config and deletes the projection.

项目介绍

openharmony统一分发管理工具

定制我的领域