全部插件

dsh-prompt-profile

dsh-prompt-profile · 版本 0.1.0 · 更新于 2026年11月29日

为 DeepSeek Harness 提供可复用的 Markdown 提示词配置。每份配置可为单轮对话指定提供方、模型和推理强度,将命令参数填入正文,并在该轮结束后恢复先前的选择。

  • 逐版审核
  • 模型接入
  • MIT
  • 0次下载

说明

以下为插件作者提供的原文。

dsh-prompt-profile

dsh-prompt-profile hero

为 DeepSeek Harness 提供可复用的 Markdown prompt profile。一个 profile 可以为单轮对话选择 provider、model 和 reasoning effort,将命令参数渲染到 prompt 正文中,并在对话结束后恢复之前的选择。

为什么存在 💡

不同会话中经常需要重复选择模型和输入审查指令。dsh-prompt-profile 将这些组合保存为小型、可复用的 Markdown profile,可以应用于单轮对话,并在结束后保留 Agent 之前的模型选择。

功能 ✨

  • 从用户目录和项目目录发现 profile,项目 profile 优先。
  • 使用 shell 风格占位符将位置参数替换到 profile 正文中。
  • 为单轮对话选择 provider、model 和 reasoning effort。
  • 默认自动恢复 Agent 之前的选择,也可以按 profile 关闭恢复。
  • 列出可用 profile,并通过斜杠分隔的名称调用嵌套 profile。

安装 📦

sole plugin --profile demo add ./dsh-prompt-profile

在 ~/.dsh/prompt-profiles/ 下创建用户 profile,或在 <repo>/.dsh/prompt-profiles/ 下创建项目 profile:

---
description: Deep code review
provider: deepseek
model: deepseek-reasoner
reasoningEffort: high
restore: true
---
Review $1 for correctness, regressions, and missing tests. Extra context: ${@:2}

项目 profile 会覆盖相同相对名称的用户 profile。

使用 🚀

/prompt-profile list
/prompt-profile review src/index.ts "focus on cancellation"

嵌套文件使用斜杠分隔的名称。例如,.dsh/prompt-profiles/review/security.md 对应的名称是 review/security。

支持的占位符:

占位符值
$1、$2、…一个位置参数
$@、@$、$ARGUMENTS全部参数
${@:N}从第 N 个位置开始的参数
${@:N:L}从第 N 个位置开始的 L 个参数

Frontmatter 🧾

字段要求含义
description否/prompt-profile list 中显示的文本
provider与 model 一起使用Harness provider 路由
model与 provider 一起使用provider 所属的 model ID
reasoningEffort与 provider 和 model 一起使用adapter 所属的 reasoning effort ID
restore否本轮结束后恢复之前的选择;默认为 true

同时省略 provider 和 model,即可使用当前 Agent 的选择。

配置 ⚙️

- id: dsh-prompt-profile
  name: dsh-prompt-profile
  config:
    userDirectory: ~/.dsh/prompt-profiles
    projectDirectory: .dsh/prompt-profiles

开发 🧑‍💻

pnpm install
pnpm run check

范围 🎯

0.1 版本有意不包含 prompt chain、循环、skill 注入、subagent、worktree 和 best-of-N 编排。只有当 Harness 扩展点能够保留其生命周期和持久会话语义时,才应添加这些功能。

许可证 📄

MIT

致谢 🙏

核心思路来自 pi-prompt-template-model。首个 Harness 原生版本专注于最小可用单元:确定性发现、参数替换、作用域内的模型路由和恢复。

版本历史

  • 0.1.02026年11月29日 · 1.5 MB
dsh-prompt-profile · SoleAPI Agent 插件 | SoleAPI