用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/hackerFish/awesome-dsh-skills --skill dsh-plugin-client命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | dsh-plugin-client |
| description | 开发 DSH 插件的 client 半端(浏览器 UI)时使用:按已验证的 slot 与标准-kit 契约注册界面、双目标构建并包装客户端 bundle。 |
| whenToUse | 给 DSH 插件加 UI(设置页、输入条按钮、工具调用视图)、排查 client 插件未加载时。 |
package.json:exports 加 "./client": "./lib/client/index.js";dsh.client 声明 { "platform": "web", "inject": [...] }inject 按需列出依赖的 client 插件:@deepseek-ai/dsh-client-runtime(slots)、@deepseek-ai/dsh-client-locale(i18n)、以及插槽声明方(如 @deepseek-ai/dsh-client-ui-conversation、@deepseek-ai/dsh-client-ui-settings)src/client/index.ts,导出 export const inject = ['slots'] 与 export function apply(ctx)ctx.slots.inject('conversation.input.right', () => ctx.slots.register({
name: 'conversation.input.right', // 插槽名(single/list/chain 由声明方定)
id: 'my-button',
order: 10,
locale: 'my.ns', // 可选:声明后组件收到 t()
}, MyComponent))
useSessions/useWorkspaces;会话级 useSession、useInput(draft 快照)、inputActions(setDraft/submit/…);以及 sessionId、useProjection、renderSlot、tsettings.plugins.tab(设置页标签)、conversation.input.left/right(输入条按钮区)、tool.call.toolview(工具调用视图,keyed 注册)、conversation.composer.dock// tsup.config.ts:host 半端
{ entry: { 'host/index': 'src/host/index.ts' }, format: ['esm'], platform: 'node' }
// client 半端
{ entry: { 'client/index': 'src/client/index.ts' }, format: ['cjs'], platform: 'browser',
external: ['react', 'react-dom'] }
window.__ModuleLoader__.load({ id: '<包名>', factory: (require) => { ...CJS... } })(react 由宿主加载器提供,不打进 bundle)window.__ModuleLoader__ 执行 bundle,断言 apply/inject 导出与注册发生file: 协议是复制安装,改代码必须重装;link: 协议建 Junction 指向本地目录,改源码即时生效(开发推荐)GET /<prefix>/health 排查;页面 HTML 的 client 清单里应出现 "id":"<包名>" 与 rev