zero360-TYN/dsh-sage-mode ↗★ 0
dsh-sage-mode
Sage mode: a user-toggled read-only advisory session mode — answers, advice, evaluation, teaching, brainstorming, and error analysis with read/search/web tools only. 适合需要安全地进行代码理解、教学或错误分析,避免模型误改代码的用户。
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zero360-TYN/dsh-sage-modeドキュメント
README 全文を読む ↗Usage
| Input | Effect |
|---|---|
/sage | Enter Sage mode: read-only tools only, advisory prompt injected |
/sage | Enter the mode and send that question as your next message (images/files allowed) |
/sage off | Leave; the full toolset is restored immediately |
Typical uses: understanding an unfamiliar implementation, learning a codebase, comparing
design options, brainstorming, pasting a stack trace. When you are ready to actually change
code, run /sage off.
Entering the mode changes what the model can call, not the sandbox: hidden tools are removed
from the request's tool catalog entirely, and anything that still reaches dispatch is refused
by a tools.guard() that returns "let the user run /sage off first".
Configuration
The row's defaults live in cordis.patch.yml. Your own overrides belong
in the profile's user layer ($DSH_HOME/profiles//cordis.patch.yml). A patch replaces
the targeted row's whole config, so restate every key you want to keep:
- id: sage-mode
name: dsh-sage-mode
config:
command: sage # command name (default: sage)
sectionOrder: 3255 # prompt section placement
allowedTools: [read, grep, web_search] # keep only these
optionalTools: # optional deps: adopt their read-only tools when present
dsh-ops: [ops_glob, ops_grep, ops_inspect_local_file]
section: | # the full advisory prompt
...
Unknown keys fail at load instead of being ignored, so a typo cannot silently disable your configuration. Missing keys fall back to their defaults.