DeepSeek System Prompt

Adds an inline system prompt editor & toggle to DeepSeek chat. The prompt is injected as a system message before every new chat.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
作者
Hazel Hopps
1日のインストール数
0
累計インストール数
2
評価
0 0 0
バージョン
1.2
作成日
2026/04/30
更新日
2026/05/02
大きさ
19.2KB
ライセンス
MIT
対象サイト

Adds a System Prompt button directly into the DeepSeek chat interface — right next to the DeepThink and Search toggles — giving you full control over model behavior without touching the API.

✨ Features

  • Inline UI — A "System" button appears in the chat toolbar. Click it to open a floating editor panel. No context menus, no prompt() dialogs.
  • Persistent storage — Your system prompt and enabled/disabled state are saved across sessions via GM_getValue / GM_setValue.
  • One-click toggle — Enable or disable the system prompt with a switch. The toolbar button shows an active indicator dot when a prompt is set and enabled.
  • Keyboard shortcutsCtrl+Enter to save, Escape to close the panel.
  • Click-outside to dismiss — Click anywhere outside the panel to close it.

🔧 How It Works

The script intercepts outgoing API requests at the network level:

  1. fetch — Patches window.fetch to intercept chat completion requests.
  2. XMLHttpRequest — Patches XHR.send for legacy request paths.
  3. WebSocket — Wraps outgoing send calls to inject the prompt into real-time messages.

When a matching API request is detected, the script prepends a { role: "system", content: "..." } message to the messages[] array — the standard way system prompts work in the OpenAI/DeepSeek API.

No data leaves your browser. The script makes zero external network requests. Everything runs locally in your userscript manager.

📸 Usage

  1. Install the script
  2. Go to chat.deepseek.com
  3. Click the System button next to DeepThink / Search
  4. Type your system prompt (e.g. "You are a senior software engineer. Always provide code examples.")
  5. Toggle Enabled, then click Save
  6. Start a new chat — your system prompt is automatically included

⚠️ Limitations

  • Only works on the browser client at chat.deepseek.com — not the API or mobile app.
  • Cross-origin iframes cannot be patched due to browser security.
  • DeepSeek could patch this out in a future update if they choose to, though the model itself is open-source and system prompts are a standard API feature.

🙏 Credits

Inspired by DeepSeek System Prompt Injector by NoahTheGinger — which uses a similar network interception approach but with context-menu-based UI. This script reimplements the concept with a fully inline editor panel.