opencode-skills-doctor 0.5.1 → 0.5.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 +11 -1
- package/docs/README.zh-CN.md +11 -1
- package/package.json +2 -1
- package/skills/dsh-skills-doctor/SKILL.md +54 -0
package/README.md
CHANGED
|
@@ -354,10 +354,20 @@ DSH ships an MCP client bundle (`@deepseek-ai/dsh-mcp-client`). Add one entry to
|
|
|
354
354
|
args: ["-y", "opencode-skills-doctor", "mcp"]
|
|
355
355
|
```
|
|
356
356
|
|
|
357
|
-
Restart DSH. The tool shows up as `mcp__skills_doctor__skills_doctor`.
|
|
357
|
+
Restart DSH. The tool shows up as `mcp__skills_doctor__skills_doctor` and accepts `directory`, `budget`, `lang`, `global` and `html`.
|
|
358
358
|
|
|
359
359
|
On Windows, if the stdio spawn cannot resolve `npx`, use `command: cmd` and `args: ["/c", "npx", "-y", "opencode-skills-doctor", "mcp"]`.
|
|
360
360
|
|
|
361
|
+
#### Optional skill (tells the model when to audit)
|
|
362
|
+
|
|
363
|
+
The repo ships a DSH skill at `skills/dsh-skills-doctor/`:
|
|
364
|
+
|
|
365
|
+
```powershell
|
|
366
|
+
Copy-Item -Recurse skills\dsh-skills-doctor "$env:USERPROFILE\.dsh\skills\"
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
DSH watches skill roots, so `skills-doctor-audit` appears in the catalog without a restart. The skill runs `check`/`plan`, explains the token impact, and only proposes fixes — it never edits skills without confirmation.
|
|
370
|
+
|
|
361
371
|
## How it works
|
|
362
372
|
|
|
363
373
|
**Audit pipeline**
|
package/docs/README.zh-CN.md
CHANGED
|
@@ -354,10 +354,20 @@ DSH 自带 MCP 客户端 bundle(`@deepseek-ai/dsh-mcp-client`)。在 profile
|
|
|
354
354
|
args: ["-y", "opencode-skills-doctor", "mcp"]
|
|
355
355
|
```
|
|
356
356
|
|
|
357
|
-
重启 DSH。工具会以 `mcp__skills_doctor__skills_doctor`
|
|
357
|
+
重启 DSH。工具会以 `mcp__skills_doctor__skills_doctor` 出现,参数支持 `directory`、`budget`、`lang`、`global`、`html`。
|
|
358
358
|
|
|
359
359
|
Windows 上如果 stdio 起不来 `npx`,改成 `command: cmd`、`args: ["/c", "npx", "-y", "opencode-skills-doctor", "mcp"]`。
|
|
360
360
|
|
|
361
|
+
#### 可选技能包(告诉模型什么时候该体检)
|
|
362
|
+
|
|
363
|
+
仓库自带一个 DSH skill:`skills/dsh-skills-doctor/`:
|
|
364
|
+
|
|
365
|
+
```powershell
|
|
366
|
+
Copy-Item -Recurse skills\dsh-skills-doctor "$env:USERPROFILE\.dsh\skills\"
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
DSH 会监听 skill 目录,`skills-doctor-audit` 无需重启就会出现在目录里。它会跑 `check`/`plan`、解释 token 影响,并且只提出修复建议 —— 不经确认不会改 skill 文件。
|
|
370
|
+
|
|
361
371
|
## 工作原理
|
|
362
372
|
|
|
363
373
|
**审计流程**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-skills-doctor",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.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": {
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"bin",
|
|
38
38
|
"src",
|
|
39
39
|
"docs",
|
|
40
|
+
"skills",
|
|
40
41
|
"README.md",
|
|
41
42
|
"SECURITY.md",
|
|
42
43
|
"SECURITY.zh-CN.md"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skills-doctor-audit
|
|
3
|
+
description: Audit installed agent skills for per-step token cost, shadowed duplicates, broken references and budget overruns, then propose concrete fixes.
|
|
4
|
+
whenToUse: Use when the user mentions too many skills, context bloat, token cost, duplicate or missing skills, or asks for a skill health check.
|
|
5
|
+
metadata:
|
|
6
|
+
author: wangyuchen5110
|
|
7
|
+
source: opencode-skills-doctor
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill audit workflow
|
|
11
|
+
|
|
12
|
+
Audit the user's installed skills and turn the result into a short, actionable answer.
|
|
13
|
+
Never modify skill files without explicit confirmation.
|
|
14
|
+
|
|
15
|
+
## 1. Run the read-only audit
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
npx -y opencode-skills-doctor check --json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Read `summary.advertisedTokens` (cost per model step), `summary.advertised` and `findings[]`.
|
|
22
|
+
If the command fails, fall back to `opencode-skills-doctor` when installed globally, or ask the user to run it from the repo.
|
|
23
|
+
|
|
24
|
+
## 2. Explain the top findings
|
|
25
|
+
|
|
26
|
+
Report at most three findings, in plain language, each with its token impact:
|
|
27
|
+
|
|
28
|
+
- `token-budget` — descriptions cost roughly N tokens on **every** model step;
|
|
29
|
+
- `shadowed` — the same skill ID loads from several places, only one wins;
|
|
30
|
+
- `long-description` / `large-body` — descriptions or bodies that are paid on every step / every invocation;
|
|
31
|
+
- `broken-reference` — a `references/` or `scripts/` file the skill points at is missing.
|
|
32
|
+
|
|
33
|
+
## 3. Show what can actually be saved
|
|
34
|
+
|
|
35
|
+
```powershell
|
|
36
|
+
npx -y opencode-skills-doctor plan --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Report `recommended.savings` (per step), `recommended.final` and `recommended.stepsSavings`
|
|
40
|
+
(per 100 steps). Explain the difference: trimming descriptions keeps discoverability; hiding a skill
|
|
41
|
+
(`autoinvoke: false`) removes it from the advertised list but keeps `@id` loading.
|
|
42
|
+
|
|
43
|
+
## 4. Propose fixes — do not apply silently
|
|
44
|
+
|
|
45
|
+
- Hide low-frequency skills: `npx -y opencode-skills-doctor fix --hide id1,id2`
|
|
46
|
+
- Archive shadowed duplicates (reversible): `npx -y opencode-skills-doctor fix`
|
|
47
|
+
- Trim descriptions manually, keeping them discoverable
|
|
48
|
+
- Ask first, then re-run `check` to confirm the new cost
|
|
49
|
+
|
|
50
|
+
## 5. Optional shareable report
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
npx -y opencode-skills-doctor check --html skills-report.html --open
|
|
54
|
+
```
|