opencode-skills-doctor 0.6.2 → 0.7.0

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
@@ -116,6 +116,7 @@ All commands accept `--json`, `--lang en|zh`, `--budget`, `--root` and `--no-glo
116
116
  | **DeepSeek Harness** | `install --client dsh` adds the MCP entry and the `skills-doctor-audit` skill |
117
117
  | **Claude Code / Codex** | MCP server (`npx -y opencode-skills-doctor mcp`) |
118
118
  | **Grok CLI / Cursor** | their skill roots are scanned natively |
119
+ | **Hermes Agent** | MCP entry in `~/.hermes/config.yaml`; `~/.hermes/skills` is scanned |
119
120
 
120
121
  ## Why it is safe
121
122
 
@@ -339,7 +339,7 @@ Claude Code(项目里的 `.mcp.json`,或你的 MCP 配置):
339
339
  }
340
340
  ```
341
341
 
342
- Codex(`~/.codex/config.toml`):
342
+ Codex(`~/.codex/config.toml`,或 `codex mcp add skills-doctor -- npx -y opencode-skills-doctor mcp`):
343
343
 
344
344
  ```toml
345
345
  [mcp_servers.skills-doctor]
@@ -347,6 +347,8 @@ command = "npx"
347
347
  args = ["-y", "opencode-skills-doctor", "mcp"]
348
348
  ```
349
349
 
350
+ 已用 codex-cli 0.145 验证:`codex mcp list` 显示该 server 为 `enabled`(stdio)。
351
+
350
352
  其他 MCP 客户端:启动 `npx -y opencode-skills-doctor mcp` 并允许 `skills_doctor` 工具即可。
351
353
 
352
354
  它扫描 `.opencode/skills`、`.claude/skills`、`.agents/skills`(项目和全局),所以其他 agent 用的 skill 也能一起体检。
@@ -412,7 +414,29 @@ skills-doctor check --root . # 覆盖当前项目的 Grok skill
412
414
  skills-doctor check --root $HOME # 覆盖 ~/.grok/skills 等用户级 skill
413
415
  ```
414
416
 
415
- 不需要额外安装——Grok 原生加载 `SKILL.md`。如果该 Grok 版本支持 MCP,还可以把上面的 MCP server 接进去,让模型自己调用 `skills_doctor`。
417
+ 不需要额外安装——Grok 原生加载 `SKILL.md`。
418
+
419
+ Grok 1.0+ 也支持 MCP,注册一次即可:
420
+
421
+ ```powershell
422
+ grok mcp add skills-doctor -- npx -y opencode-skills-doctor mcp
423
+ grok mcp doctor skills-doctor # ✓ server started · handshake OK · 1 tool discovered
424
+ ```
425
+
426
+ Grok 的工具命名是 `<server>__<tool>`,所以调用 `skills_doctor__skills_doctor`;配置写入 `~/.grok/config.toml` 的 `[mcp_servers.skills-doctor]`。
427
+
428
+ ### Hermes Agent(Nous Research)
429
+
430
+ Hermes 从 `~/.hermes/config.yaml` 读取 MCP server:
431
+
432
+ ```yaml
433
+ mcp_servers:
434
+ skills_doctor:
435
+ command: "npx"
436
+ args: ["-y", "opencode-skills-doctor", "mcp"]
437
+ ```
438
+
439
+ Hermes 的工具命名是 `mcp_<server>_<tool>`,即 `mcp_skills_doctor_skills_doctor`。它的 skill 在 `~/.hermes/skills`(含导入的 `openclaw-imports/`)和项目 `.hermes/skills`,`check` 都会扫描。
416
440
 
417
441
  ## 检测规则
418
442
 
package/docs/REFERENCE.md CHANGED
@@ -10,7 +10,7 @@ Local scanner, linter, fixer, updater and **OpenCode plugin** for agent skills
10
10
  |---|---|
11
11
  | **What it is** | Audit, fix and update the skills your coding agent loads |
12
12
  | **Interfaces** | CLI · OpenCode plugin (1.x / 2.x) · MCP server (Claude Code, Codex, DSH, …) · Grok CLI compatible |
13
- | **Skill sources** | `.opencode/skills`, `.claude/skills`, `.agents/skills`, `.grok/skills`, `.cursor/skills`, `opencode.json(c)` entries, HTTP catalogs |
13
+ | **Skill sources** | `.opencode/skills`, `.claude/skills`, `.agents/skills`, `.grok/skills`, `.cursor/skills`, `.hermes/skills`, `opencode.json(c)` entries, HTTP catalogs |
14
14
  | **What it finds** | shadowed IDs, duplicates, long descriptions, oversized bodies, per-step token budget, broken file references, invalid frontmatter, empty bodies, stale skills |
15
15
  | **What it fixes** | archives shadowed definitions (reversible), hides low-frequency skills, syncs catalogs with drift detection |
16
16
  | **Reports** | terminal, JSON, or a self-contained HTML report (`--html [file] --open`) |
@@ -322,7 +322,7 @@ Claude Code (`.mcp.json` in the project, or your MCP config):
322
322
  }
323
323
  ```
324
324
 
325
- Codex (`~/.codex/config.toml`):
325
+ Codex (`~/.codex/config.toml`, or `codex mcp add skills-doctor -- npx -y opencode-skills-doctor mcp`):
326
326
 
327
327
  ```toml
328
328
  [mcp_servers.skills-doctor]
@@ -330,6 +330,8 @@ command = "npx"
330
330
  args = ["-y", "opencode-skills-doctor", "mcp"]
331
331
  ```
332
332
 
333
+ Verified with codex-cli 0.145: `codex mcp list` shows the server as `enabled` (stdio).
334
+
333
335
  Any other MCP client: run `npx -y opencode-skills-doctor mcp` and allow the `skills_doctor` tool.
334
336
 
335
337
  It scans `.opencode/skills`, `.claude/skills` and `.agents/skills` (project and global), so it can audit skills used by other agents too.
@@ -395,7 +397,29 @@ skills-doctor check --root . # covers your Grok project skills
395
397
  skills-doctor check --root $HOME # covers ~/.grok/skills and other user-level skills
396
398
  ```
397
399
 
398
- No install step is needed — Grok loads `SKILL.md` packages natively. If your Grok build has MCP enabled, you can additionally register the MCP server above to let the model call `skills_doctor` itself.
400
+ No install step is needed — Grok loads `SKILL.md` packages natively.
401
+
402
+ Grok 1.0+ also speaks MCP. Register the tool once:
403
+
404
+ ```powershell
405
+ grok mcp add skills-doctor -- npx -y opencode-skills-doctor mcp
406
+ grok mcp doctor skills-doctor # ✓ server started · handshake OK · 1 tool discovered
407
+ ```
408
+
409
+ Grok namespaces tools as `<server>__<tool>`, so call `skills_doctor__skills_doctor`. The config lands in `~/.grok/config.toml` as `[mcp_servers.skills-doctor]`.
410
+
411
+ ### Hermes Agent (Nous Research)
412
+
413
+ Hermes reads MCP servers from `~/.hermes/config.yaml`:
414
+
415
+ ```yaml
416
+ mcp_servers:
417
+ skills_doctor:
418
+ command: "npx"
419
+ args: ["-y", "opencode-skills-doctor", "mcp"]
420
+ ```
421
+
422
+ Hermes names tools `mcp_<server>_<tool>`, so the tool is `mcp_skills_doctor_skills_doctor`. Its skills live in `~/.hermes/skills` (including imported `openclaw-imports/`) and project `.hermes/skills`; `check` scans both.
399
423
 
400
424
  ## Rules
401
425
 
@@ -440,9 +464,11 @@ No install step is needed — Grok loads `SKILL.md` packages natively. If your G
440
464
  6. project `.cursor/skills`
441
465
  7. `~/.grok/skills`
442
466
  8. project `.grok/skills`
443
- 9. `~/.config/opencode/skills`
444
- 10. project `.opencode/skills`
445
- 11. the `skills` array in `opencode.json(c)` (2.x) or `skills.paths` (1.x); relative paths resolve from the working directory; supports `~/`, absolute paths and HTTP catalogs
467
+ 9. `~/.hermes/skills`
468
+ 10. project `.hermes/skills`
469
+ 11. `~/.config/opencode/skills`
470
+ 12. project `.opencode/skills`
471
+ 13. the `skills` array in `opencode.json(c)` (2.x) or `skills.paths` (1.x); relative paths resolve from the working directory; supports `~/`, absolute paths and HTTP catalogs
446
472
 
447
473
  ## JSON output
448
474
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-skills-doctor",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
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, Cursor and DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "exports": {
package/src/discover.mjs CHANGED
@@ -120,9 +120,11 @@ function isUnder(parent, child) {
120
120
  * 6. 项目 .cursor/skills
121
121
  * 7. ~/.grok/skills
122
122
  * 8. 项目 .grok/skills
123
- * 9. ~/.config/opencode/skills
124
- * 10. 项目 .opencode/skills(项目根 → cwd)
125
- * 11. opencode.json(c) 里的 skills 数组 / skills.paths
123
+ * 9. ~/.hermes/skills(Hermes Agent)
124
+ * 10. 项目 .hermes/skills
125
+ * 11. ~/.config/opencode/skills
126
+ * 12. 项目 .opencode/skills(项目根 → cwd)
127
+ * 13. opencode.json(c) 里的 skills 数组 / skills.paths
126
128
  */
127
129
  export function discoverSources({ cwd = process.cwd(), home = os.homedir(), includeGlobal = true } = {}) {
128
130
  const projectRoot = findProjectRoot(cwd) ?? path.resolve(cwd)
@@ -151,6 +153,9 @@ export function discoverSources({ cwd = process.cwd(), home = os.homedir(), incl
151
153
  if (includeGlobal) addSource("grok-global", "global", path.join(home, ".grok", "skills"))
152
154
  for (const dir of projectChain) addSource("grok-project", "project", path.join(dir, ".grok", "skills"))
153
155
 
156
+ if (includeGlobal) addSource("hermes-global", "global", path.join(home, ".hermes", "skills"))
157
+ for (const dir of projectChain) addSource("hermes-project", "project", path.join(dir, ".hermes", "skills"))
158
+
154
159
  if (includeGlobal) addSource("opencode-global", "global", path.join(home, ".config", "opencode", "skills"))
155
160
  for (const dir of projectChain) addSource("opencode-project", "project", path.join(dir, ".opencode", "skills"))
156
161