.deepseek/command/*.md)dsc 支持用户自定义 slash 命令。在项目或 home 目录下创建 .deepseek/command/*.md 文件,
即可在 TUI 中用 /命令名 触发。
---
description: short description of the command
model: deepseek-v4-pro
agent: planner
subtask: true
---
Your template here. Use $1, $2 for positional args.
Use $ARGUMENTS for the full argument string.
Use !`shell command` for shell injection.
Use @path/to/file for file content injection.
| 字段 | 类型 | 说明 | 当前生效 |
|---|---|---|---|
description |
string | 命令描述(用于补全提示) | 是 |
model |
string | 执行时临时切换的模型 | 是 |
agent |
string | 指定 agent(未生效) | 否(Phase 21) |
subtask |
bool | 是否作为子任务运行 | 否(Phase 21) |
--- 分隔符时,整个文件内容作为模板。model: "deepseek-v4-pro" 或 model: deepseek-v4-pro)。按以下顺序处理:
| 语法 | 说明 | 示例 |
|---|---|---|
$1, $2, … |
位置参数(从 $1 开始) |
/fix bug auth.go → $1=bug, $2=auth.go |
$N 吸收 |
最高位占位符吸收其后所有剩余参数(空格连接) | /review a b c → $1="a b c" |
$ARGUMENTS |
原始参数串 | /run x y → $ARGUMENTS="x y" |
| 无占位符 | 若模板无 $N 也无 $ARGUMENTS 且有参数,追加到新行 |
模板 summarize + 参数 pkg/x → summarize\npkg/x |
!`cmd` |
执行 shell 命令,替换为 stdout | !`git diff` → diff 输出 |
@path |
读取文件内容替换 | @README.md → 文件内容 |
[command failed: ...]。@path 文件不存在时保留原样 @path,不报错。.deepseek/command/ 的路径去掉 .md 后缀得到。/:.deepseek/command/git/sync.md → 命令名 git/sync。$CWD/.deepseek/command 和 $HOME/.deepseek/command。.deepseek/command/commit.md:
---
description: stage all, commit, and push
model: deepseek-v4-pro
---
commit and push with a conventional commit message
## DIFF
!`git diff --cached`
## MESSAGE
$ARGUMENTS
使用:在 TUI 中输入 /commit fix: resolve auth bug。
以下内置命令不可被覆盖:/help, /clear, /quit, /models, /tape, /sessions,
/export, /undo, /compact。