wjingshan/dsh-plan-guard--plugins-dsh-script-lint ↗★ 0
dsh-script-lint
DSH 插件:在 write/edit 缝上拦住踩过的 shell / PowerShell 坑(set -e 命令替换陷阱、递归 grep 裸变量、.ps1 缺 BOM) 适合需要防止Agent在编写Shell或PowerShell脚本时引入常见陷阱。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wjingshan/dsh-plan-guard#63c7d14bf75aa30abefb76ebeb90aa43c94e5999&path:plugins/dsh-script-lint配置
某条判据嫌吵,可以单独关掉,不必卸载整个插件:
- insert:
- id: script-lint
name: 'dsh-script-lint'
config:
disabledRules: ['PS1_NO_BOM'] # 留空 = 三条全开
报错信息会点名管道里所有脆弱段(不只第一段)—— 因为 pipefail 下任何一段失败都算失败,只说第一段会让人去修错行。