DeepSeek System Prompt Injector

Robust system prompt injection for DeepSeek AI chat ("chat.deepseek.com")

ئاپتورى
NoahTheGinger
بۈگۈن قاچىلانغىنى
0
جەمئىي قاچىلانغىنى
3
باھا نومۇرى
0 0 0
نەشرى
2.0.1
قۇرۇلغان ۋاقتى
2025-07-12
يېڭىلانغان ۋاقتى
2025-07-18
Size
17.0 KB
ئىجازەتنامىسى
MIT
قوللايدىغىنى

DeepSeek Chat - System Prompt Injector

Robust system prompt injection for every DeepSeek chat when using the browser app at "chat.deepseek.com".

DeepSeek Pirate Screenshot


Features

  • One-click prompt editing | Context-menu items: Set, Clear, Toggle, View
  • i18n | English 🇬🇧 / Simplified-Chinese 🇨🇳 auto-detected
  • Persistence | Saves prompt & enabled-state with GM_getValue / GM_setValue

How It Works

  1. Fetch & XHR: Patches window.fetch and XMLHttpRequest.send. If the URL matches any API_PATTERNS entry → the script rewrites body.prompt or unshifts a system message into body.messages[].
  2. WebSocket: Wraps each outgoing send call, JSON-parses strings, rewrites .prompt if present.

No network requests are made by the script itself, and nothing is sent outside your browser.


Limitations

  • Cross-origin iframes can’t be patched because of browser security.
  • Easily patched in future updates if the DeepSeek team chooses to do so.

Enjoy a more deterministic control over model responses in the DeepSeek chat client by using this userscript!

Fundamentally, DeepSeek isn't a model built to robustly reject these types of injections. After all, it's an open-source model built for the community, and this level of granular control is easily accessible to any developer directly from the official DeepSeek API. In fact, eliciting precise model behavioral outcomes within the DeepSeek chat client is already quite feasible with only user-level prompts at your control. The benefit of this userscript, more than anything, is the ability to programmatically and automatically elicit that level of control. It all happens in the background, and with some nice QoL features to make everything a smooth process.


Credits

This project was inspired by DeepSeek Traits by @xskutsu.
While the internal logic here is substantially different, their traits injector sparked the idea. 💚