Google AI Studio Auto System Instructions

Automatically fill system instructions for new chats in Google AI Studio

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
Altron
今日安裝
0
安裝總數
25
評價
0 1 0
版本
1.0
建立日期
2025-04-25
更新日期
2025-04-25
尺寸
4.2 KB
授權條款
MIT
腳本執行於

Automatically fills system instructions for new chats in Google AI Studio.

THE INSTRUCTION STRING NEEDS TO BE CHANGED WITHIN THE SCRIPT.

Lifehack: ALWAYS check ANY user scripts you install for malware. Just paste the code into an AI chat and ask.

For your consideration, this script was made entirely by AI. Prompt to one-shot it: Please create a userscript that would automatically fill "custom instructions" (the system prompt) for any new chats in Google AI Studio. System instructions text area in current version of AI studio UI is hidden by default (and cannot be selected), to make it visible, you have to click document.querySelector('div.toolbar-container > div:nth-child(2) > button'), then wait for document.querySelector('textarea[aria-label="System instructions"]') to become selectable, select, then change its value, then hide it again by clicking the same button. The system prompt should only be filled when 1. it is empty; 2. a NEW chat has been opened (we need to remember old chat ids with localstorage). When a new chat opens, Studio updates the page URL to https://aistudio.google.com/app/prompts/[new chat id] Take into account that not all AI models support custom instructions, so sometimes we will fail to do this. It shouldn't break the script.