opencode-skills-doctor 0.4.1 → 0.4.2
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 +6 -5
- package/docs/README.zh-CN.md +6 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Local scanner, linter, fixer, updater and **OpenCode plugin** for agent skills
|
|
|
22
22
|
| **Reports** | terminal, JSON, or a self-contained HTML report (`--html [file] --open`) |
|
|
23
23
|
| **Cost** | CLI: 0 tokens. Plugin: ~191 tokens/step for the tool definition, plus a one-time warning per session |
|
|
24
24
|
| **Requirements** | Node ≥ 20, zero runtime dependencies |
|
|
25
|
-
| **Quality** |
|
|
25
|
+
| **Quality** | 50 tests, CI on ubuntu/macos/windows × Node 20/22/24 |
|
|
26
26
|
|
|
27
27
|
## Why
|
|
28
28
|
|
|
@@ -59,7 +59,7 @@ skills-doctor check
|
|
|
59
59
|
What a run looks like:
|
|
60
60
|
|
|
61
61
|
```text
|
|
62
|
-
skills-doctor 0.
|
|
62
|
+
skills-doctor 0.4.1
|
|
63
63
|
sources: 5 (2 exist) definitions: 29 unique IDs: 29 advertised: 29 description budget: ~3074 tokens
|
|
64
64
|
|
|
65
65
|
[E] token-budget Advertised skill descriptions cost about 3074 tokens per model step, over 2x the 1200 budget
|
|
@@ -255,7 +255,7 @@ npx opencode-skills-doctor install
|
|
|
255
255
|
The installer detects your OpenCode version and wires everything up:
|
|
256
256
|
|
|
257
257
|
- **2.x** — adds `"plugins": ["opencode-skills-doctor"]` to `opencode.json(c)`;
|
|
258
|
-
- **1.x** — installs the package into `~/.config/opencode`, writes the local plugin entry,
|
|
258
|
+
- **1.x** — installs the package into `~/.config/opencode`, writes the local plugin entry, generates `/skills-doctor`, `/skills-report` and `/skills-upgrade` markdown commands, sets `"type": "module"`;
|
|
259
259
|
- backs up the config file as `<config>.bak-<timestamp>` before editing.
|
|
260
260
|
|
|
261
261
|
Use `--dry-run` to preview, `--config-dir <dir>` for a custom config location, and `--no-npm` to skip the package install.
|
|
@@ -265,6 +265,7 @@ Once installed you get:
|
|
|
265
265
|
- the `skills_doctor` tool (with an optional `html` argument to write a report to a path you choose);
|
|
266
266
|
- the `/skills-doctor` command (1.x: generated markdown command; 2.x: plugin command);
|
|
267
267
|
- the `/skills-report` command (2.x) that asks where to save the HTML report;
|
|
268
|
+
- the `/skills-upgrade` command (2.x) that checks for a newer skills-doctor;
|
|
268
269
|
- a one-time system-prompt warning when the skill description budget is exceeded.
|
|
269
270
|
|
|
270
271
|
### Uninstall
|
|
@@ -467,13 +468,13 @@ Executing code is free, but the tool definition is part of the model's context.
|
|
|
467
468
|
|
|
468
469
|
## Roadmap
|
|
469
470
|
|
|
470
|
-
- v0.
|
|
471
|
+
- v0.5: CI governance (baseline that only reports new issues, official GitHub Action), content-aware suggestions (which skills are never used), catalog signature verification
|
|
471
472
|
- Later: V1/Claude skill migration report
|
|
472
473
|
|
|
473
474
|
## Development and contributing
|
|
474
475
|
|
|
475
476
|
```powershell
|
|
476
|
-
npm test #
|
|
477
|
+
npm test # 50 tests (node test/doctor.test.mjs)
|
|
477
478
|
npm run bench # lint timing for 100/500/1000 skills
|
|
478
479
|
```
|
|
479
480
|
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -22,7 +22,7 @@ OpenCode skill 的**本地检测器 + 更新器 + 修复器**,并附带 **Open
|
|
|
22
22
|
| **报告** | 终端、JSON,或自包含 HTML(`--html [file] --open`) |
|
|
23
23
|
| **成本** | CLI 0 token;插件工具定义约 191/步,另有每会话一次预警 |
|
|
24
24
|
| **要求** | Node ≥ 20,零运行时依赖 |
|
|
25
|
-
| **质量** |
|
|
25
|
+
| **质量** | 50 个测试,ubuntu/macos/windows × Node 20/22/24 CI |
|
|
26
26
|
|
|
27
27
|
## 为什么需要它
|
|
28
28
|
|
|
@@ -59,7 +59,7 @@ skills-doctor check
|
|
|
59
59
|
跑出来大概是这样:
|
|
60
60
|
|
|
61
61
|
```text
|
|
62
|
-
skills-doctor 0.
|
|
62
|
+
skills-doctor 0.4.1
|
|
63
63
|
来源: 5 个(存在 2 个) 定义: 29 唯一 ID: 29 会展示: 29 描述预算: ~3074 tokens
|
|
64
64
|
|
|
65
65
|
[E] token-budget 模型每步要看到的 skill 描述约 3074 tokens,超过预算 1200 的 2 倍
|
|
@@ -255,7 +255,7 @@ npx opencode-skills-doctor install
|
|
|
255
255
|
安装器会自动识别 OpenCode 版本并接好:
|
|
256
256
|
|
|
257
257
|
- **2.x** —— 在 `opencode.json(c)` 里加 `"plugins": ["opencode-skills-doctor"]`;
|
|
258
|
-
- **1.x** —— 把包装进 `~/.config/opencode`、写本地插件入口、生成 `/skills-doctor` 命令、补 `"type": "module"`;
|
|
258
|
+
- **1.x** —— 把包装进 `~/.config/opencode`、写本地插件入口、生成 `/skills-doctor`、`/skills-report`、`/skills-upgrade` 三个 markdown 命令、补 `"type": "module"`;
|
|
259
259
|
- 改配置前会备份为 `<config>.bak-<timestamp>`。
|
|
260
260
|
|
|
261
261
|
支持 `--dry-run` 预览、`--config-dir <dir>` 指定配置目录、`--no-npm` 跳过装包。
|
|
@@ -265,6 +265,7 @@ npx opencode-skills-doctor install
|
|
|
265
265
|
- `skills_doctor` 工具(可选 `html` 参数,把报告写到指定路径);
|
|
266
266
|
- `/skills-doctor` 命令(1.x 是生成的 markdown 命令,2.x 是插件命令);
|
|
267
267
|
- `/skills-report` 命令(2.x)—— 会先问你要把 HTML 报告存到哪里;
|
|
268
|
+
- `/skills-upgrade` 命令(2.x)—— 检查 skills-doctor 自身是否有新版本;
|
|
268
269
|
- 当 skill 描述预算超标时,系统提示里会注入一次提醒(每个会话最多一次)。
|
|
269
270
|
|
|
270
271
|
### 卸载
|
|
@@ -467,13 +468,13 @@ token 是启发式估算,1200 是建议预算。可以用 `--budget` 或 `.ski
|
|
|
467
468
|
|
|
468
469
|
## Roadmap
|
|
469
470
|
|
|
470
|
-
- v0.
|
|
471
|
+
- v0.5:CI 治理(baseline 只报新增问题、官方 GitHub Action)、内容层建议(哪些 skill 从未被使用)、catalog 签名校验
|
|
471
472
|
- 后续:V1/Claude skill 兼容迁移报告
|
|
472
473
|
|
|
473
474
|
## 开发与贡献
|
|
474
475
|
|
|
475
476
|
```powershell
|
|
476
|
-
npm test #
|
|
477
|
+
npm test # 50 个测试(node test/doctor.test.mjs)
|
|
477
478
|
npm run bench # 100/500/1000 个 skill 的 lint 耗时
|
|
478
479
|
```
|
|
479
480
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-skills-doctor",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Audit, fix and update agent skills: token cost, broken references, shadowed duplicates, HTML reports, catalog sync. CLI, OpenCode plugin, MCP server; works with OpenCode, Claude Code, Codex, Grok CLI and Cursor skill layouts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|