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.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
Hazel Hopps
Installazioni giornaliere
1
Installazioni totali
2
Valutazione
0 0 0
Versione
1.2
Creato il
30/04/2026
Aggiornato il
02/05/2026
Dimensione
19,2 KB
Licenza
MIT
Applica a

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.