oh-skillhub 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,12 +7,13 @@ This package is designed to run through `npx`:
7
7
  ```bash
8
8
  npx oh-skillhub@latest
9
9
  npx oh-skillhub list
10
+ npx oh-skillhub install --all-common --agent codex --scope user
10
11
  npx oh-skillhub install --domain arkui --agent codex
11
12
  npx oh-skillhub install --domain arkui --agent all --scope user
12
13
  npx oh-skillhub clean --agent claude --scope user --dry-run
13
14
  ```
14
15
 
15
- Running without arguments starts a TUI selector. Choose an action first (`Install skills` or `Clean installed skills`). Install then asks for the target (`Codex`, `Claude`, `OpenCode`, or `All`) and skill groups. Clean asks for the target and installed skills to remove.
16
+ Running without arguments starts a TUI selector. Choose an action first (`Install skills` or `Clean installed skills`). Install then asks for the target (`Codex`, `Claude`, `OpenCode`, or `All`) and skill groups. The first skill group is `common / all`, which installs every skill under `skills/common`. Clean asks for the target and installed skills to remove.
16
17
 
17
18
  In an interactive terminal:
18
19
 
@@ -23,20 +24,23 @@ In an interactive terminal:
23
24
  When input is piped or the terminal does not support raw key input, enter numbers separated by spaces:
24
25
 
25
26
  ```bash
26
- printf "1\n1\n3 9\n" | npx oh-skillhub@latest
27
+ printf "1\n1\n1\n" | npx oh-skillhub@latest
28
+ printf "1\n1\n4 10\n" | npx oh-skillhub@latest
27
29
  printf "2\n2\n1\n\n" | npx oh-skillhub@latest
28
30
  ```
29
31
 
30
32
  The old piped installer format is still accepted:
31
33
 
32
34
  ```bash
33
- printf "1\n3 9\n" | npx oh-skillhub@latest
35
+ printf "1\n1\n" | npx oh-skillhub@latest
36
+ printf "1\n4 10\n" | npx oh-skillhub@latest
34
37
  ```
35
38
 
36
39
  ## Current Capabilities
37
40
 
38
41
  - List bundled OpenHarmony skills by domain or stage.
39
42
  - Resolve profile/domain selections such as `arkui`, `app-dev`, `cicd`, `testing`, and `security`.
43
+ - Install all common skills in one step with `common / all` in the TUI or `--all-common` in the CLI.
40
44
  - Download the selected skill directories from the OpenHarmony skills `release` branch and install the full skill contents.
41
45
  - Install skills into Codex, Claude Code, and OpenCode target directories.
42
46
  - Support `--agent codex|claude|opencode|all`.
@@ -47,15 +51,16 @@ printf "1\n3 9\n" | npx oh-skillhub@latest
47
51
  - Show clean as a first-class option in the default TUI.
48
52
  - Move cleaned skills to `.oh-skillhub/trash` by default, with `--purge` for permanent deletion.
49
53
  - Run a TUI matching the `skills/common/*` and `skills/domain/*` repository layout.
54
+ - Refresh the skill catalog from the GitCode `release` branch at runtime, with cached and bundled fallback data.
50
55
  - Keep anonymous telemetry events in a local retry queue.
51
56
 
52
- The installer uses sparse Git checkout so it downloads only the selected skill directories instead of the whole repository.
57
+ The installer refreshes the catalog with a shallow Git read of the `release` branch. It then uses sparse Git checkout so it downloads only the selected skill directories instead of the whole repository.
53
58
 
54
59
  ## Commands
55
60
 
56
61
  ```bash
57
62
  oh-skillhub list [--domain <name>] [--stage <name>]
58
- oh-skillhub install [skill...] [--domain <name>] [--preset <name>] [--agent codex|claude|opencode|all]
63
+ oh-skillhub install [skill...] [--domain <name>] [--preset <name>] [--all-common] [--agent codex|claude|opencode|all]
59
64
  oh-skillhub clean [skill...] [--agent codex|claude|opencode|all] [--scope user|project] [--dry-run] [--purge]
60
65
  oh-skillhub doctor [--agent codex|claude|opencode|all]
61
66
  oh-skillhub telemetry status
@@ -72,6 +77,8 @@ oh-skillhub telemetry status
72
77
  Examples:
73
78
 
74
79
  ```bash
80
+ npx oh-skillhub install --all-common --agent codex --scope user
81
+ npx oh-skillhub install --all-common --agent all --scope user --dry-run
75
82
  npx oh-skillhub install --domain arkui --agent claude --scope user
76
83
  npx oh-skillhub install --preset app-dev --agent opencode --scope project
77
84
  npx oh-skillhub install --domain security --agent all --dry-run
@@ -125,9 +132,8 @@ node bin/oh-skillhub.js install --domain arkui --agent all --scope user --dry-ru
125
132
 
126
133
  ## First-Version Limits
127
134
 
128
- - Uses a bundled manifest derived from the GitCode `release` branch examples.
129
- - Does not yet refresh the remote GitCode manifest at runtime.
130
- - Downloads and installs full skill directories for manifest entries, but does not yet support arbitrary remote skill discovery outside the bundled manifest.
135
+ - `list` and direct `install` commands use the bundled manifest for fast startup; the no-argument TUI refreshes the catalog from GitCode at runtime.
136
+ - Runtime refresh requires `git` on the user's PATH. If refresh fails, the TUI falls back to the cached catalog and then to the bundled manifest.
131
137
  - Telemetry collector upload is designed but not yet wired; events are queued locally.
132
138
 
133
139
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
4
 
5
- **Goal:** Build a dependency-light npm CLI that can be run with `npx` to list, dry-run install, install, doctor, and inspect telemetry status for OpenHarmony skills.
5
+ **Goal:** Build a dependency-light npm CLI that can be run with `npx` to list, dry-run install, install, one-click install all common skills, doctor, and inspect telemetry status for OpenHarmony skills.
6
6
 
7
7
  **Architecture:** Implement the CLI in plain Node.js CommonJS so the package works without a build step. Core behavior is split into small modules for manifest loading, profile resolution, agent target resolution, install planning, telemetry queueing, and command rendering.
8
8
 
@@ -69,7 +69,7 @@ Expected: PASS.
69
69
 
70
70
  - [ ] **Step 1: Write failing planner tests**
71
71
 
72
- Tests cover selecting by `--domain arkui`, `--stage development`, explicit skill name, `--all-common`, and deduping common baseline skills in a profile.
72
+ Tests cover selecting by `--domain arkui`, `--stage development`, explicit skill name, `--all-common`, one-click `common / all` TUI selection, and deduping common baseline skills in a profile.
73
73
 
74
74
  - [ ] **Step 2: Run test to verify it fails**
75
75
 
@@ -135,7 +135,7 @@ Use a tiny hand-rolled parser. Implement list, install dry-run, install local fi
135
135
 
136
136
  - [ ] **Step 4: Update README**
137
137
 
138
- Document `npx` usage, agent support, telemetry controls, and current first-version limits.
138
+ Document `npx` usage, `--all-common`, the `common / all` TUI shortcut, agent support, telemetry controls, runtime catalog refresh, and current first-version limits.
139
139
 
140
140
  - [ ] **Step 5: Run full verification**
141
141
 
@@ -144,4 +144,3 @@ Expected: PASS for all test files.
144
144
 
145
145
  Run: `npm pack --dry-run`
146
146
  Expected: package includes `bin/`, `src/`, `README.md`, `package.json`, and docs.
147
-
@@ -113,7 +113,7 @@ skills/domain/arkui/development/ohos-dev-arkui-code-review
113
113
 
114
114
  - 首次运行稳定。
115
115
  - 支持远端新增 skills 的自动发现。
116
- - 用户可以通过 `--offline`、`--refresh` 控制行为。
116
+ - 用户可以通过 `OH_SKILLHUB_OFFLINE=1` 或 `--offline` 使用缓存和包内 manifest。
117
117
  - 便于做版本锁定和校验。
118
118
 
119
119
  取舍:
@@ -145,7 +145,8 @@ npx oh-skillhub list --stage development
145
145
  npx oh-skillhub install --domain arkui
146
146
  npx oh-skillhub install --preset app-dev
147
147
  npx oh-skillhub install ohos-dev-cpp-coding-style
148
- npx oh-skillhub install --all-common
148
+ npx oh-skillhub install --all-common --agent codex --scope user
149
+ npx oh-skillhub install --all-common --agent all --scope user --dry-run
149
150
  npx oh-skillhub install --domain arkui --agent claude --scope user
150
151
  npx oh-skillhub install --preset app-dev --agent opencode --scope project
151
152
  npx oh-skillhub install --domain security --agent all
@@ -153,7 +154,7 @@ npx oh-skillhub telemetry status
153
154
  npx oh-skillhub doctor
154
155
  ```
155
156
 
156
- 无参数运行时进入 TUI 领域选择,默认安装到 Codex user scope
157
+ 无参数运行时进入 TUI。先选择操作,再选择目标 agent,最后选择 skill 分组。安装分组的第一项是 `common / all`,用于一键安装 `skills/common` 下的全部 skill
157
158
 
158
159
  ```bash
159
160
  npx oh-skillhub@latest
@@ -162,12 +163,14 @@ npx oh-skillhub@latest
162
163
  真实交互终端中使用方向键或 `j/k` 移动,按 `Space` 勾选或取消,按 `Enter` 安装。非 TTY 或管道输入时,使用空格分隔编号选择多个分组,例如:
163
164
 
164
165
  ```bash
165
- printf "3 9\n" | npx oh-skillhub@latest
166
+ printf "1\n1\n1\n" | npx oh-skillhub@latest
167
+ printf "1\n1\n4 10\n" | npx oh-skillhub@latest
166
168
  ```
167
169
 
168
- 推荐交互:
170
+ 推荐的一行命令:
169
171
 
170
172
  ```bash
173
+ npx oh-skillhub install --all-common --agent codex --scope user
171
174
  npx oh-skillhub install --domain arkui
172
175
  ```
173
176
 
@@ -727,10 +730,11 @@ telemetry-queue.jsonl
727
730
 
728
731
  刷新规则:
729
732
 
730
- - 默认缓存 24 小时。
731
- - `--refresh` 强制刷新 manifest。
732
- - `--offline` 只使用内置 manifest 和本地缓存。
733
- - `--ref <sha>` 用于可复现安装。
733
+ - 无参数 TUI 默认从 GitCode `release` 分支动态刷新 skill catalog。
734
+ - 刷新失败时先使用本地缓存,再降级到包内 bundled manifest。
735
+ - `OH_SKILLHUB_OFFLINE=1` 或 `--offline` 只使用缓存与内置 manifest
736
+ - `OH_SKILLHUB_SOURCE_DIR` 可指定本地 skill 仓用于测试或内网镜像。
737
+ - 直接 `list` 与 `install` 命令保持快速启动,当前使用 bundled manifest;其中 `install --all-common` 会选择 bundled manifest 中全部 `scope=common` 的 skill。
734
738
 
735
739
  ## 13. 测试策略
736
740
 
@@ -761,8 +765,10 @@ telemetry-queue.jsonl
761
765
  ```bash
762
766
  npx oh-skillhub list --domain arkui
763
767
  npx oh-skillhub install --domain arkui --target ./tmp-skills --dry-run
768
+ npx oh-skillhub install --all-common --agent codex --scope user --dry-run
764
769
  npx oh-skillhub install ohos-dev-cpp-coding-style --target ./tmp-skills
765
770
  npx oh-skillhub install --domain arkui --agent all --scope user --dry-run
771
+ npx oh-skillhub@latest
766
772
  npx oh-skillhub doctor --agent all
767
773
  npx oh-skillhub telemetry status
768
774
  npx oh-skillhub doctor --target ./tmp-skills
@@ -814,13 +820,13 @@ npx oh-skillhub doctor --target ./tmp-skills
814
820
  - `--scope user|project`
815
821
  - `--target`
816
822
  - `--dry-run`
817
- - `--refresh`
818
823
  - `--offline`
819
- - `--force`
820
824
  - `--no-telemetry`
821
825
 
822
826
  暂缓:
823
827
 
828
+ - `--refresh` 强制刷新。
829
+ - `--force` 覆盖安装。
824
830
  - 图形化交互。
825
831
  - 多 registry 源。
826
832
  - skill 评分与推荐。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-skillhub",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "OpenHarmony Skills installer for Codex, Claude Code, and OpenCode.",
5
5
  "type": "commonjs",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -1207,12 +1207,13 @@ function helpText() {
1207
1207
  "",
1208
1208
  "Commands:",
1209
1209
  " list [--domain <name>] [--stage <name>]",
1210
- " install [skill...] [--domain <name>] [--preset <name>] [--agent codex|claude|opencode|all]",
1210
+ " install [skill...] [--domain <name>] [--preset <name>] [--all-common] [--agent codex|claude|opencode|all]",
1211
1211
  " clean [skill...] [--agent codex|claude|opencode|all] [--scope user|project] [--dry-run] [--purge]",
1212
1212
  " doctor [--agent codex|claude|opencode|all]",
1213
1213
  " telemetry status",
1214
1214
  "",
1215
1215
  "Examples:",
1216
+ " npx oh-skillhub install --all-common --agent codex --scope user",
1216
1217
  " npx oh-skillhub install --domain arkui --agent all --scope user",
1217
1218
  ].join("\n");
1218
1219
  }