A highly configurable, auto-hiding, lockable, slide-out panel that remembers its position, with draggable prompts, themes, import/export, and more for Gemini.
The Gemini Prompt Panel is a browser extension that enhances the user experience on the Gemini website by adding a versatile and feature-rich slide-out panel. The primary motivation behind this extension is to boost productivity by providing quick access to frequently used prompts and actions, while being unobtrusive. The core purpose is to offer a highly customizable and persistent interface for managing and using prompts efficiently.
- What it does: Adds a panel that can be positioned on the left or right side of the screen.
- How it improves the target interface: The panel can be locked in place or set to auto-hide, ensuring it doesn't obstruct the main content while remaining easily accessible.
- Example usage:
// The panel's position and visibility are managed through CSS classes .gemini-prompt-panel.left-side { left: 0; } .gemini-prompt-panel.right-side { right: 0; } .gemini-prompt-panel.visible { transform: translateX(0); }
- What it does: Allows users to create, save, and manage a list of custom prompts.
- How it improves the target interface: Users can quickly insert pre-defined text into the Gemini prompt input, with an option to automatically send the prompt.
- Example usage:
// Default prompts array const DEFAULT_PROMPTS = [ { name: 'Explain Code', text: 'Explain this code line by line:', autoSend: false }, { name: 'Refactor Code', text: 'Refactor this code to be more efficient:', autoSend: true } ];
- What it does: Lets a saved prompt define follow-up steps that run after Gemini finishes responding.
- How it improves the target interface: Multi-step workflows can pass the previous response into the next prompt using
{previous_response}.
- What it does: Adds panel buttons for Gemini 1.5 Flash, 2.0 Pro, and 2.5 Pro.
- How it improves the target interface: Users can switch models from the prompt panel without hunting through Gemini's header.
- What it does: Adds a panel button that selects Gemini Canvas mode for the current prompt.
- How it improves the target interface: Canvas can be activated from the prompt panel before sending a drafted prompt.
- What it does: Lets a saved prompt store a Gemini Gem URL and open that Gem before inserting or sending the prompt.
- How it improves the target interface: Persona-specific prompts can route themselves to the matching Gem without manual navigation.
- What it does: Adds a panel button that selects Gemini Deep Research and launches it when the composer already has text.
- How it improves the target interface: Research prompts can move from drafting to Deep Research without leaving the prompt panel.
- What it does: Adds a panel button that reads file/image clipboard items and dispatches them to Gemini's composer.
- How it improves the target interface: Screenshots and copied files can be attached from the prompt panel without manual upload steps.
- What it does: Supports pulling prompts from a Gist and pushing local prompt changes back with a GitHub token.
- How it improves the target interface: Prompt libraries can be backed up and shared from the same panel workflow.
- What it does: Imports remote curated prompt JSON lists with PromptCompanion-style fields.
- How it improves the target interface: Teams can seed the panel from shared marketplace catalogs without manual JSON file handling.
- What it does: Generates copyable prompt URLs that import a single prompt when opened on Gemini.
- How it improves the target interface: Individual prompts can be shared with teammates without exchanging full backup files.
- What it does: Builds a Chrome/Firefox MV3 extension package from the userscript with GM compatibility shims, an options page, and
chrome.storage.syncprompt storage. - How it improves the target interface: Users can install GeminiBuddy as an unpacked extension or ZIP package and keep prompts synced across browser profiles.
- What it does: The order of the prompt buttons can be rearranged via drag and drop.
- How it improves the target interface: This allows users to prioritize and organize their prompts for a more personalized and efficient workflow.
- What it does: The panel supports light, dark, and auto-detect themes.
- How it improves the target interface: This ensures the panel's appearance is consistent with the Gemini website's theme or the user's preference, providing a seamless visual experience.
- What it does: Users can import prompts from a JSON file, export their current prompts to a backup file, and reset the prompts to the default settings.
- How it improves the target interface: This makes it easy to share prompt collections and manage custom prompts across different browsers or installations.
- A modern web browser that supports userscripts (e.g., Chrome, Firefox, Edge).
- A userscript manager extension such as Tampermonkey or Greasemonkey.
- Install a Userscript Manager: If you don't have one, install a userscript manager like Tampermonkey for your browser.
- Install the Script:
- Navigate to the
GeminiBuddy.user.jsfile in this repository. - Click the "Raw" button to view the raw file content.
- Your userscript manager should automatically detect the userscript and prompt you to install it.
- Click "Install" to add the Gemini Prompt Panel to your browser.
- Navigate to the
- Developer Mode (for local development):
- Clone this repository to your local machine.
- Open the Tampermonkey dashboard in your browser.
- Go to the "Utilities" tab.
- Under "File", use "Choose File" to import the
GeminiBuddy.user.jsfrom your local clone.
- MV3 Extension Build:
- Run
node chrome_extension/build-extension.js. - Load
chrome_extension/dist/geminibuddy-mv3as an unpacked extension, or use the generated ZIP inchrome_extension/dist.
- Run
Once installed, the Gemini Prompt Panel will automatically appear on the Gemini website (https://gemini.google.com/*).
- Activation: Hover your mouse over the handle on the left or right edge of the screen to reveal the panel.
- Locking: Click the lock icon in the panel header to keep the panel permanently visible.
- Using Prompts: Click on any prompt button to insert its text into the Gemini input field. If 'auto-send' is enabled for that prompt, it will also be submitted automatically.
- Adding a New Prompt: Click the "Add New Prompt" button to open a form where you can define a new prompt.
The panel's settings can be accessed by clicking the gear icon in the header.
- Theme: Choose between "Auto", "Light", and "Dark" themes.
- Panel Position: Set the panel to appear on the "Left" or "Right" side of the screen.
- Prompt Management:
- Import: Import prompts from a
.jsonfile. - Export: Export your current prompts to a
gemini-prompts-backup.jsonfile. - Reset: Reset your prompts to the default settings.
- Import: Import prompts from a
Settings and prompts are stored in your browser's local storage using the following keys:
gemini_custom_prompts_v2gemini_panel_themegemini_panel_positiongemini_panel_position_top
(Here you would include screenshots or animated GIFs of the panel in action, for example: )
GeminiBuddy.user.js: The main userscript file containing all the JavaScript code for the extension.chrome_extension/manifest.json: MV3 package metadata for Chrome and Firefox.chrome_extension/gm-shim.js: Compatibility bridge fromGM_*calls tochrome.storage.syncand extension fetch.chrome_extension/options.html: Extension options page for sync-backed prompt and settings management.README.md: The file you are currently reading.
- UI Builder (
build...functions): A set of functions responsible for creating the HTML elements for the panel, settings modal, and prompt form. - State Manager: The script uses global variables and
GM_setValue/GM_getValueto manage the state of prompts, theme, and panel position. - Event Handlers: Various event listeners for mouse interactions (click, drag, hover), and a
MutationObserverto detect when new code blocks or responses are added to the page.
- Parameters: None
- Return value:
void - Purpose: The main function that initializes and builds the entire prompt panel, appends it to the DOM, and sets up all event listeners.
- Parameters:
text(string): The prompt text to be inserted.sendPrompt(boolean): Iftrue, the prompt is automatically sent.
- Return value:
void - Purpose: Injects the prompt text into the Gemini chat input and optionally clicks the send button.
- Parameters: None
- Return value:
void - Purpose: Saves the current array of prompts to the browser's storage using
GM_setValue.
- Parameters: None
- Return value:
void - Purpose: Loads the prompts from storage using
GM_getValue, populates the panel with the prompt buttons.
- Please use the GitHub issue tracker for this repository.
- When reporting a bug, include your browser and userscript manager versions, and provide steps to reproduce the issue.
- Fork the repository and create a new branch for your feature or bug fix.
- Follow the existing coding style.
- Submit a pull request with a clear description of your changes.
- The project follows a standard JavaScript coding style.
- Use meaningful variable and function names.
- Comment complex sections of code.
- Added a Chrome/Firefox MV3 extension build with GM compatibility shims, sync-backed storage, an options page, and ZIP packaging.
- Added per-prompt share links that import shared prompts from URL hashes.
- Added remote prompt marketplace JSON import with flexible PromptCompanion-style field mapping.
- Added token-backed push support for bidirectional GitHub Gist prompt sync.
- Added clipboard attachment paste for image/file clipboard items.
- Added a Deep Research launcher that selects Gemini Deep Research and sends the current prompt when ready.
- Added per-prompt Gem URLs that navigate to the target Gem and replay the prompt after Gemini initializes.
- Added a Canvas shortcut button that activates Gemini Canvas mode for the current prompt.
- Added quick model-switch buttons for Gemini 1.5 Flash, 2.0 Pro, and 2.5 Pro.
- Added chained prompt workflows with follow-up steps and previous-response handoff.
- Fixed clipboard access by separating the post navigator state from
window.navigator.
- Initial release of the Gemini Prompt Panel.
This project is licensed under the MIT License.
This userscript is not officially affiliated with, endorsed by, or in any way associated with Google or the Gemini project. It is an independent, open-source tool created to enhance the user experience.