dsh-run2skill 0.1.1-alpha → 0.2.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.en.md +137 -0
- package/README.md +78 -31
- package/lib/client.js +409 -168
- package/lib/index.d.ts +3887 -308
- package/lib/index.js +18448 -6067
- package/package.json +13 -4
package/README.en.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# dsh-run2skill
|
|
2
|
+
|
|
3
|
+
[中文](README.md) | English
|
|
4
|
+
|
|
5
|
+
Have you run into any of these situations?
|
|
6
|
+
|
|
7
|
+
- You teach an agent the same workflow today, then teach it again in a new session tomorrow.
|
|
8
|
+
- You keep correcting the agent step by step: “Do not edit that file,” “write the test first,” or “this check is required.”
|
|
9
|
+
- The agent finally learns the right approach, but the lesson disappears when the conversation ends.
|
|
10
|
+
|
|
11
|
+
`dsh-run2skill` turns the corrections, constraints, and workflows you explicitly teach a DeepSeek Harness (DSH) agent into reviewable, reusable native Skills.
|
|
12
|
+
|
|
13
|
+
> You teach once while doing real work. Run2Skill prepares a Skill draft from the reusable parts. Nothing is saved until you approve it.
|
|
14
|
+
|
|
15
|
+
Run2Skill does not let an agent silently create permanent rules for itself. Every draft shows its source, intended scope, and complete content before you decide whether to save or discard it. Only an approved draft is written to DSH's native Skill directory.
|
|
16
|
+
|
|
17
|
+
> The current stable release is `0.2.0`. It supports DSH Web `0.1.0-rc.7` and `0.1.0-rc.8`.
|
|
18
|
+
|
|
19
|
+
## See the complete flow
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
1. **Find the draft** — Run2Skill only notifies you when action is required and places the draft under **Settings → Plugins → Run2Skill**.
|
|
24
|
+
2. **Review its evidence and scope** — inspect the rationale, filtered conversation evidence, target scope, and the complete `SKILL.md` that would be written.
|
|
25
|
+
3. **Save only after approval** — successful results appear under Recent activity and remain ordinary native DSH Skills.
|
|
26
|
+
|
|
27
|
+
<details>
|
|
28
|
+
<summary>View the three key screenshots</summary>
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
</details>
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
First install DSH and Node.js `^22.19.0 || >=24.0.0`, and make sure both `dsh` and `pnpm` are available in your terminal. Then run:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
dsh plugin --profile web add dsh-run2skill@0.2.0
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Restart DSH Web. Open **Settings → Plugins**; the plugin is loaded when the **Run2Skill** tab appears.
|
|
47
|
+
|
|
48
|
+
Run2Skill does not need a separate model key. When it analyzes a Skill draft, it uses the model already selected for the current DSH session. If the session has no available model, learning stops and reports the reason instead of silently switching providers.
|
|
49
|
+
|
|
50
|
+
## Use it while you work
|
|
51
|
+
|
|
52
|
+
Continue talking to DSH normally. For example:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Save this workflow as a Skill so it can be reused later.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
You can also give an explicit correction, describe a durable constraint, or teach a reusable ordered workflow during ordinary work. You do not need to stop and manually reconstruct a `SKILL.md` file.
|
|
59
|
+
|
|
60
|
+
Run2Skill performs a lightweight check after a conversation turn. It does not run a model retrospective on every turn; deeper analysis begins only after an explicit learning signal is found.
|
|
61
|
+
|
|
62
|
+
When something needs your attention, DSH shows one native notification. To review a draft:
|
|
63
|
+
|
|
64
|
+
1. Open **Settings → Plugins → Run2Skill**.
|
|
65
|
+
2. Review the draft, its intended scope, evidence, and complete content.
|
|
66
|
+
3. Approve and save it, discard it, or retry a failed save.
|
|
67
|
+
4. After a successful save, it is an ordinary native DSH Skill and remains usable even if Run2Skill is later uninstalled.
|
|
68
|
+
|
|
69
|
+
Drafts can target the current project (`PROJECT`) or the current user (`USER`). The current release writes only to DSH's default Skill storage. If you replace or disable that storage, Run2Skill stops safely instead of guessing a path.
|
|
70
|
+
|
|
71
|
+
## What it learns
|
|
72
|
+
|
|
73
|
+
Run2Skill focuses on reusable experience that you state explicitly:
|
|
74
|
+
|
|
75
|
+
- **Correction:** “Do not fix the implementation first; write a failing test.”
|
|
76
|
+
- **Durable constraint:** “All GitHub copy in this project must be written in Chinese.”
|
|
77
|
+
- **Workflow:** “Check the upstream version, run compatibility probes, then update the evidence.”
|
|
78
|
+
- **Explicit save request:** “Save this process as a Skill.”
|
|
79
|
+
|
|
80
|
+
It does not turn every successful agent action into a permanent rule. It learns what you clearly taught, rather than trying to guess your intent.
|
|
81
|
+
|
|
82
|
+
## You remain in control
|
|
83
|
+
|
|
84
|
+
You can turn **Automatic learning** off under **Settings → Plugins → Run2Skill**:
|
|
85
|
+
|
|
86
|
+
- On: explicit corrections, durable constraints, and workflows may produce Skill drafts.
|
|
87
|
+
- Off: ordinary automatic learning pauses, while an explicit “save this as a Skill” request still works.
|
|
88
|
+
|
|
89
|
+
Run2Skill is local-first. It does not store model keys or copy the whole session. Only the necessary, filtered, truncated, and redacted context is sent to the session's selected model for analysis. Every Skill draft requires your approval before it is saved.
|
|
90
|
+
|
|
91
|
+
The settings page also provides **Clear all cache**. It removes Run2Skill-owned intermediate cache, pending Skill drafts, failures, and non-sensitive diagnostics, but never removes:
|
|
92
|
+
|
|
93
|
+
- original DSH session records;
|
|
94
|
+
- already published native Skills;
|
|
95
|
+
- provider, agent, or other DSH settings.
|
|
96
|
+
|
|
97
|
+
See [Storage and upgrades](docs/storage-and-upgrades.md) for the detailed retention and migration rules.
|
|
98
|
+
|
|
99
|
+
## Update and uninstall
|
|
100
|
+
|
|
101
|
+
Install another explicit version:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
dsh plugin --profile web add dsh-run2skill@<version>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Uninstall:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
dsh plugin --profile web remove dsh-run2skill
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Restart DSH Web after either command. Uninstalling does not delete published Skills and keeps Run2Skill data by default. Use **Clear all cache** on the settings page before uninstalling if you want to remove that data.
|
|
114
|
+
|
|
115
|
+
## Troubleshooting
|
|
116
|
+
|
|
117
|
+
- **The Run2Skill tab is missing:** confirm that you use the DSH `web` profile and restarted DSH Web after installation.
|
|
118
|
+
- **“Run2Skill is currently limited” (`DEGRADED`):** do not manually delete storage files. Retry, then report the issue if the state persists.
|
|
119
|
+
- **“This Run2Skill version is incompatible” (`INCOMPATIBLE`):** verify your DSH version and restore a compatible Run2Skill version.
|
|
120
|
+
- **No Skill draft appears:** confirm that the current session has an available model, or say “Save this workflow as a Skill.”
|
|
121
|
+
- **A `PROJECT` draft cannot be saved:** the current session must belong to a project workspace recognized by DSH.
|
|
122
|
+
- **You changed DSH Skill storage:** the current release supports only the default storage and stops safely instead of guessing where to write.
|
|
123
|
+
|
|
124
|
+
Report problems through [GitHub Issues](https://github.com/qkycir-123/dsh-run2skill/issues). Do not attach keys, complete sessions, private paths, or logs containing sensitive information.
|
|
125
|
+
|
|
126
|
+
## Learn more
|
|
127
|
+
|
|
128
|
+
- [Changelog](CHANGELOG.md)
|
|
129
|
+
- [DSH compatibility](docs/compatibility.md)
|
|
130
|
+
- [Storage and upgrades](docs/storage-and-upgrades.md)
|
|
131
|
+
- [Product requirements](docs/product/prd.md)
|
|
132
|
+
- [Architecture baseline](docs/architecture/baseline.md)
|
|
133
|
+
- [Single-owner design for one Skill-save intent](docs/design/single-owner-skill-save.md)
|
|
134
|
+
- [Contributing](CONTRIBUTING.md)
|
|
135
|
+
- [Maintainer compatibility probes](probes/README.md)
|
|
136
|
+
|
|
137
|
+
This project is licensed under the [MIT License](LICENSE). Licenses for dependencies embedded in the client bundle are listed in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
package/README.md
CHANGED
|
@@ -1,24 +1,55 @@
|
|
|
1
1
|
# dsh-run2skill
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
中文 | [English](README.en.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
你是否遇到过这些场景?
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- 同一套工作流,今天教 Agent 一遍,明天换个 Session 又教一遍;
|
|
8
|
+
- Agent 每走一步都需要你纠正:“别改那个文件”“先跑测试”“这个步骤不能省”;
|
|
9
|
+
- 终于把 Agent 教会了,对话一结束,经验也跟着下班了。
|
|
10
|
+
|
|
11
|
+
如果你已经受够了在对话框里重复当师傅,`dsh-run2skill` 就是来做这件事的:
|
|
12
|
+
|
|
13
|
+
> 把你在 DeepSeek Harness(DSH)里明确教给 Agent 的纠正、约束和工作流,整理成可审核、可复用的原生 Skill。
|
|
14
|
+
|
|
15
|
+
一句话说:**你负责在真实工作里教一次,run2skill 负责把值得复用的部分整理成技能草稿;你点头,它才落盘。**
|
|
16
|
+
|
|
17
|
+
它不会让 Agent 偷偷给自己立规矩。每份技能草稿都可以先看来源、适用范围和完整内容,然后由你决定确认保存还是放弃草稿。只有确认后,它才会写入 DSH 的原生 Skill 目录。
|
|
18
|
+
|
|
19
|
+
> 当前稳定版为 `0.2.0`。目前支持 DSH Web 版的 `0.1.0-rc.7` 和 `0.1.0-rc.8`。
|
|
20
|
+
|
|
21
|
+
## 看一遍完整流程
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
1. **发现技能草稿**:Run2Skill 只在有事项需要处理时提醒你,并把草稿放在 **设置 → 插件 → Run2Skill**。
|
|
26
|
+
2. **核对来源与范围**:查看生成理由、经过过滤的对话证据、保存范围以及将要写入的完整 `SKILL.md`。
|
|
27
|
+
3. **确认后才保存**:成功结果会进入“最近活动”;保存下来的内容是普通的 DSH 原生 Skill。
|
|
28
|
+
|
|
29
|
+
<details>
|
|
30
|
+
<summary>查看三张关键界面截图</summary>
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+

|
|
37
|
+
|
|
38
|
+
</details>
|
|
8
39
|
|
|
9
40
|
## 安装
|
|
10
41
|
|
|
11
42
|
先确认你已经安装 DSH、Node.js `^22.19.0 || >=24.0.0`,并能在终端运行 `dsh` 和 `pnpm`。然后执行:
|
|
12
43
|
|
|
13
44
|
```bash
|
|
14
|
-
dsh plugin --profile web add dsh-run2skill@0.
|
|
45
|
+
dsh plugin --profile web add dsh-run2skill@0.2.0
|
|
15
46
|
```
|
|
16
47
|
|
|
17
48
|
重启 DSH Web。打开 **Settings → Plugins**,看到 **run2skill** 卡片就说明插件已加载。
|
|
18
49
|
|
|
19
|
-
run2skill
|
|
50
|
+
run2skill 不需要单独填写模型密钥。需要分析技能草稿时,它沿用当前 DSH 会话已经选择的模型;如果当前会话没有可用模型,学习会停止并显示原因,不会偷偷换用其他模型。
|
|
20
51
|
|
|
21
|
-
##
|
|
52
|
+
## 用法:你继续干活,它负责记笔记
|
|
22
53
|
|
|
23
54
|
平时照常和 DSH 对话即可。例如:
|
|
24
55
|
|
|
@@ -26,33 +57,48 @@ run2skill 不需要单独填写模型密钥。需要分析提案时,它沿用
|
|
|
26
57
|
把这个流程保存成 Skill,以后可以复用。
|
|
27
58
|
```
|
|
28
59
|
|
|
29
|
-
|
|
60
|
+
你也可以在正常工作中明确纠正做法、说明长期约束,或给出有顺序的可复用流程。不用为了“教它”停下当前任务,也不用自己打开 `SKILL.md` 边回忆边编辑。
|
|
30
61
|
|
|
31
|
-
|
|
62
|
+
run2skill 会在一轮对话完成后做轻量检查。它不是每轮都拉着模型开复盘会;只有命中明确的学习信号后,才会进入后续分析。
|
|
63
|
+
|
|
64
|
+
当有需要你处理的事项时,DSH 会显示一条原生通知;平时页面顶部不会常驻 run2skill 状态框。处理技能草稿时:
|
|
32
65
|
|
|
33
66
|
1. 打开 **Settings → Plugins → run2skill**。
|
|
34
|
-
2.
|
|
35
|
-
3.
|
|
36
|
-
4.
|
|
67
|
+
2. 在待处理列表中查看技能草稿、适用范围和内容差异。
|
|
68
|
+
3. 选择确认并保存、放弃草稿,或在保存失败后重试。
|
|
69
|
+
4. 保存成功后,结果就是普通的 DSH 原生 Skill;即使以后卸载 run2skill,它仍然可以被 DSH 使用。
|
|
70
|
+
|
|
71
|
+
技能草稿可以保存到当前项目(`PROJECT`)或当前用户(`USER`)范围。当前版本只会写入 DSH 默认的 Skill 存储目录;如果你改过 Skill 的存储方式或关闭了默认目录,run2skill 会停止保存,不会猜测写入位置。
|
|
72
|
+
|
|
73
|
+
## 它会学什么
|
|
74
|
+
|
|
75
|
+
run2skill 目前专注于你**明确表达**的可复用经验:
|
|
76
|
+
|
|
77
|
+
- **纠正**:“不要直接修实现,先写失败测试。”
|
|
78
|
+
- **长期约束**:“这个项目的所有 GitHub 文案都使用中文。”
|
|
79
|
+
- **工作流**:“先核对上游版本,再跑兼容性探针,最后更新证据。”
|
|
80
|
+
- **显式保存请求**:“把这个流程保存成 Skill。”
|
|
81
|
+
|
|
82
|
+
它不会因为 Agent 偶尔成功一次,就自作主张地把所有操作写成永久规则。它学的是你明确教过的东西,不是猜你的心思。
|
|
37
83
|
|
|
38
|
-
|
|
84
|
+
## 你仍然握着方向盘
|
|
39
85
|
|
|
40
|
-
|
|
86
|
+
在 **Settings → Plugins → run2skill** 中可以关闭**自动学习**:
|
|
41
87
|
|
|
42
|
-
|
|
88
|
+
- 开启:明确的纠正、长期约束和工作流可以生成技能草稿。
|
|
89
|
+
- 关闭:暂停普通自动学习;你明确说“保存为 Skill”时仍然可以生成技能草稿。
|
|
43
90
|
|
|
44
|
-
|
|
45
|
-
- 关闭:暂停普通自动学习;你明确说“保存为 Skill”时仍然可以生成提案。
|
|
91
|
+
run2skill 是本地优先插件。它不会保存模型密钥,也不会复制完整会话;送去模型分析的只是经过筛选、截断和敏感信息清理的必要内容。技能草稿保存前始终需要你确认。
|
|
46
92
|
|
|
47
|
-
run2skill
|
|
93
|
+
换句话说:run2skill 可以帮你整理经验,但不会替你签字。
|
|
48
94
|
|
|
49
|
-
|
|
95
|
+
设置页也提供**清理所有缓存**功能。它会删除 Run2Skill 自己产生的中间缓存、待处理技能草稿、失败与非敏感诊断记录,但不会删除:
|
|
50
96
|
|
|
51
|
-
- DSH
|
|
97
|
+
- DSH 的原始会话记录;
|
|
52
98
|
- 已发布的原生 Skill;
|
|
53
|
-
-
|
|
99
|
+
- Provider、Agent 或其他 DSH 设置。
|
|
54
100
|
|
|
55
|
-
更详细的保留与升级规则见 [数据存储与升级](
|
|
101
|
+
更详细的保留与升级规则见 [数据存储与升级](docs/storage-and-upgrades.md)。
|
|
56
102
|
|
|
57
103
|
## 更新与卸载
|
|
58
104
|
|
|
@@ -68,27 +114,28 @@ dsh plugin --profile web add dsh-run2skill@<version>
|
|
|
68
114
|
dsh plugin --profile web remove dsh-run2skill
|
|
69
115
|
```
|
|
70
116
|
|
|
71
|
-
两种操作后都请重启 DSH Web。卸载不会删除已经发布的 Skill,也默认保留 run2skill
|
|
117
|
+
两种操作后都请重启 DSH Web。卸载不会删除已经发布的 Skill,也默认保留 run2skill 的数据;如果你希望清除这些数据,请在卸载前先使用设置页中的**清理所有缓存**。
|
|
72
118
|
|
|
73
119
|
## 遇到问题
|
|
74
120
|
|
|
75
121
|
- **看不到 run2skill 卡片**:确认使用的是 DSH `web` profile,并在安装后重启了 DSH Web。
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
122
|
+
- **提示“run2skill 当前功能受限”**(内部状态码:`DEGRADED`):不要手工删除存储文件;重试后仍无法恢复时,可在 GitHub Issues 报告。
|
|
123
|
+
- **提示“run2skill 当前版本不兼容”**(内部状态码:`INCOMPATIBLE`):确认 DSH 是否为受支持版本,再恢复与它兼容的 run2skill 版本。
|
|
124
|
+
- **没有生成技能草稿**:确认当前会话有可用模型;也可以直接说“把这个流程保存成 Skill”。
|
|
125
|
+
- **无法保存到当前项目**(`PROJECT`):当前会话必须位于 DSH 能识别的项目工作区。
|
|
126
|
+
- **改过 Skill 的存储目录或存储方式**:当前版本只支持 DSH 默认设置,会选择安全停止,不会猜测写入位置。
|
|
80
127
|
|
|
81
128
|
欢迎在 [GitHub Issues](https://github.com/qkycir-123/dsh-run2skill/issues) 报告问题。请不要附上密钥、完整 Session、私人路径或包含敏感信息的日志。
|
|
82
129
|
|
|
83
130
|
## 进一步了解
|
|
84
131
|
|
|
85
|
-
- [版本变化](
|
|
86
|
-
- [DSH 兼容性](
|
|
87
|
-
- [数据存储与升级](
|
|
132
|
+
- [版本变化](CHANGELOG.md)
|
|
133
|
+
- [DSH 兼容性](docs/compatibility.md)
|
|
134
|
+
- [数据存储与升级](docs/storage-and-upgrades.md)
|
|
88
135
|
- [产品需求](docs/product/prd.md)
|
|
89
136
|
- [架构基线](docs/architecture/baseline.md)
|
|
90
137
|
- [同一 Skill 保存意图的单一生成所有者设计](docs/design/single-owner-skill-save.md)
|
|
91
|
-
- [贡献指南](
|
|
92
|
-
- [维护者兼容性探针](
|
|
138
|
+
- [贡献指南](CONTRIBUTING.md)
|
|
139
|
+
- [维护者兼容性探针](probes/README.md)
|
|
93
140
|
|
|
94
141
|
本项目采用 [MIT License](LICENSE)。Client bundle 内嵌依赖的许可声明见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
|