Bundle
dsh-marketing-toolkit
DSH 营销工具箱:在侧边栏底部(Settings 旁,官方 sidebar.footer.action 席位)增加「🎯 营销工具箱」模块,一键打开封面图生成 / 朋友圈文案 / 短视频脚本 / 开头黄金3秒检验四个预设营销 Agent 通道;后续工具在 lib/client.js 顶部 CHANNELS 数组中逐步添加。
- Source
- 1wanganshi
- License
- MIT
- Updated
- Updated 6 days ago
Readme
# dsh-marketing-toolkit
DSH(DeepSeek Harness)插件:在左侧导航栏「新会话」下方增加「🎯 **营销工具箱**」模块,一键打开四个预设营销 Agent 通道:
| 工具 | 产出 |
|------|------|
| 🖼️ 封面图生成 | 公众号 / 视频号 / 小红书高点击率封面 |
| 📱 朋友圈文案 | 痛点 / 故事 / 数据三种风格 + 评论区话术 |
| 🎬 短视频脚本 | 分镜表(画面 + 台词 + 时长 + BGM) |
| ⚡ 开头黄金3秒检验 | 完播率诊断 + 3 个改写方案 |
点击任一工具会:复用(或创建)当前工作区的空白会话(与 New Session 同语义)→ 跳转到该会话 → 自动发送一条点名 `marketing-toolkit` 技能的开场提示词,由 Agent 加载对应技能通道后按规范执行。
## 添加新工具(扩展方式)
编辑 [`lib/client.js`](lib/client.js) 顶部的 `CHANNELS` 数组,加一行即可,面板网格与启动流程完全数据驱动:
```js
{
id: 'my-new-tool',
icon: '🧪',
title: '新工具名',
desc: '一句话说明',
kickoff: '请先加载技能(skill)marketing-toolkit,然后…',
}
```
## 安装
```bash
dsh plugin --profile web add "D:/vibecoding/工作区1/dsh-marketing-toolkit"
```
然后把 `"dsh-marketing-toolkit"` 加入 profile `package.json` 的 `dsh.profile.bundles` 数组(`dsh plugin add` 只装依赖不激活),再重启 web 实例(桌面版为重启 DeepSeek Harness 应用)。
> 手动安装等价流程:在 profile 的 `package.json` 中加
> `"dsh-marketing-toolkit": "file:D:/vibecoding/工作区1/dsh-marketing-toolkit"`
> 到 `dependencies`,加 `"dsh-marketing-toolkit"` 到 `dsh.profile.bundles`,然后在 profile 目录执行 `pnpm install`。
## 更新插件代码后
`file:` 依赖在安装时拷贝进 profile 的 node_modules,因此修改工作区源码后需要重新安装:
```bash
cd <DSH_HOME>/profiles/web && pnpm install
```
然后重启 web 实例(或刷新页面等待 HMR)。
## 回滚
```bash
dsh plugin --profile web remove dsh-marketing-toolkit
```
或从 profile 的 `package.json` 删除依赖与 `dsh.profile.bundles` 条目后重启。
## 结构
- `package.json` — `dsh.bundle.patch` + `dsh.client.platform = web`
- `cordis.patch.yml` — 将插件行(id: marketing-toolkit)插入 profile roster
- `lib/index.js` — 宿主半侧(无宿主特性,仅占位 + 稳定插件名)
- `lib/client.js` — 浏览器半侧:侧边栏入口 + 启动面板 + 会话交接(纯 DOM,零构建依赖)
- bundle 格式为 `window.__ModuleLoader__.load({ id, factory })`(dsh-client-modules 的惰性 CJS 注册格式,无需打包器)
## 依赖
- 技能 `marketing-toolkit`(`~/.agents/skills/marketing-toolkit/SKILL.md`)提供四个工具的执行规范。
- 生图通道使用已配置的 `dsh-imagegen` 渠道。
## 运行时 API(已对照 rc.1 源码核实)
- `ctx.get("sessions")` → `ISessions`:`list.getSnapshot().current`、`create({workspaceId?})`、`open(id)`、`binding(id).session`
- `ctx.get("conversation")` → `IConversation`:`sendSession(session, text, [], "queue")`
- `ctx.get("workspaces")` → `IWorkspaces`:`list.getSnapshot().items[]`(`workspaceId/sessionIds/updatedAt`)
- `ctx.get("uiWorkspace")` → `UiWorkspace`:`connectWorkspace(workspaceId)` 复用工作区空白会话(服务为可选,缺失时回退 `sessions.create`)
Install
dsh plugin --profile web add github:1wanganshi/dsh-marketing-toolkit#525b7324ba1bb98bd9aaeb5bbdc6af318c8dd4de
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-marketing-toolkit from the hub