PromptShift is a Chrome extension that upgrades raw prompts directly where you type. It injects a floating "Enhance" control into text fields across websites and rewrites your prompt using proven prompt-engineering frameworks.
- Works in
textarea, textinput, andcontenteditablefields across websites. - One-click prompt enhancement powered by Gemini.
- Multiple enhancement strategies, including:
- Polish
- Chat
- Structured Output
- Persona
- CO-STAR
- Chain of Thought
- Socratic
- Agentic
- Tone controls (Professional, Friendly, Casual, Direct, Confident, Empathetic).
- Keyboard shortcuts:
- Enhance:
Ctrl+Shift+E(Cmd+Shift+Eon macOS) - Show/Hide pill:
Ctrl+Shift+Y(Cmd+Shift+Yon macOS)
- Enhance:
- Remembers selected framework and tone in Chrome local storage.
- React + TypeScript + Vite
- Chrome Extension Manifest V3
- Service worker + content script architecture
- Gemini API (
gemini-2.0-flash-lite) via REST
- Node.js 18+
- npm
- A Google Gemini API key from Google AI Studio
- Install dependencies:
npm install- Create
.env.localin the project root:
GEMINI_API_KEY=YOUR_API_KEY_HERE- Build the extension:
npm run build- Open
chrome://extensions. - Enable Developer mode.
- Click Load unpacked.
- Select the
dist/folder.
The extension icon is configured in manifest.json and generated from files in assets/icons/.
npm run dev: Runs Vite dev server for the popup app UI.npm run build: Builds popup + content script + service worker, and copies extension assets todist/.npm run preview: Previews the built popup app.
src/content.ts: Injected script for in-page UI and enhancement flow.src/service_worker.ts: Background worker that calls Gemini API.src/content.css: Styling for injected UI.manifest.json: Chrome extension configuration.assets/icons/: Extension icons used by Chrome.
assets/icons/logo-1024.png: Compressed source logo.assets/icons/icon16.pngassets/icons/icon32.pngassets/icons/icon48.pngassets/icons/icon128.png
Chrome uses these icon files for the extension entry and toolbar display.
- Never commit real API keys.
- Keep secrets in
.env.localonly. - Restrict your Gemini key in Google Cloud when possible.
- If you reload the extension, refresh any open tabs where you expect PromptShift to run.
- If enhancement fails, confirm
GEMINI_API_KEYis set and runnpm run buildagain. - If you hit rate limits, wait briefly and retry.
MIT