A Chrome extension that lets you create custom mods and patches for any live website using AI assistance.
https://chromewebstore.google.com/detail/improv-ai-userscript-crea/fjegfnolfbbhbekpchkdccpmanjemjbh
Can be combined with Browserbase/Stagehand to modify sites to make them easier to automate with AI, or to create repeatable actions triggered by custom buttons added to the site.
- AI-Powered Script Creation: Use OpenAI's API to generate custom userscripts
- Interactive Testing: The AI can execute JavaScript on the page and see results before committing
- User Approval Workflow: Review and approve changes before they're saved
- Automatic Script Management: Scripts automatically run on matching pages
- Built-in Chat Interface: Iterate with the AI to refine your scripts
- Click the extension icon to open the side panel
- Click "New Script" to start creating a userscript
- Describe what you want to change on the current page
- The AI will:
- Analyze the page (screenshot, HTML, console logs)
- Execute test JavaScript to try different solutions
- Ask for your approval after each attempt
- When satisfied, the AI saves the script to run automatically on future visits
-
Build the extension:
bun install bun run build
-
Load the extension in Chrome:
- Go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
builddirectory
- Go to
-
Configure API settings:
- Click the extension icon
- Click "Settings"
- Enter your OpenAI API key
- Optionally customize the API URL and model name
- Content Script: Executes on all pages, runs userscripts, handles JS execution requests
- Background Script: Routes messages between side panel and content scripts, captures screenshots
- Side Panel: React UI for managing scripts and chatting with the AI
- Storage: Uses
chrome.storage.localto persist userscripts and chat histories
The AI has access to two tools:
- execute_js(code: string): Execute JavaScript on the current page and see console output
- submit_final_userscript(matchUrls: string, jsScript: string): Save the final userscript
After each execute_js call, the user sees the output and can choose:
- Yes, save it: Saves the script for automatic execution
- Keep trying: Provide feedback and continue iterating
- Refresh & retry: Reset the conversation and try from scratch
{
id: string;
name: string;
matchUrls: string; // Regex pattern
jsScript: string;
createdAt: number;
updatedAt: number;
enabled: boolean;
}{
id: string;
userscriptId: string | null;
apiUrl: string;
modelName: string;
messages: ChatMessage[];
initialPrompt: string;
initialUrl: string;
initialScreenshot: string;
initialHtml: string;
initialConsoleLog: string;
createdAt: number;
updatedAt: number;
}bun run dev: Watch mode for developmentbun run build: Build for productionbun run pack: Create a packaged zip file
- TypeScript
- React
- Bun (build tool)
- Tailwind CSS
- Chrome Extensions Manifest V3
This extension does not connect to any cloud service and we don't collect any user PII or telemetry from extension users.
The only network requests the extension makes are to the LLM provider (OpenAI by default, using the key you provide), and to GreasyFork/OpenUserJS to fetch the list of applicable user scripts you can import. Only the domain portion of the URL is sent to GreasyFork/OpenUserJS (when the extension sidebar is open and no mod is actively being edited) to fetch matching userscripts for import.
Full page HTML and screenshot are sent to the LLM provider so that the model has context to know how to modify the page. OpenAI's privacy policy covering that data can be found here: https://openai.com/policies/row-privacy-policy/
- https://labs.google/disco
- https://www.tweeks.io/discover
- https://resources.arc.net/hc/en-us/articles/19212718608151-Boosts-Customize-Any-Website
- https://github.com/dorser/vibemonkey
- https://chromewebstore.google.com/detail/ai-website-editor/ajlgmdlaokipinhkcbodapinmfmhomof
- https://github.com/kanpuriyanawab/nebula
- https://cursor.com/blog/browser-visual-editor
- https://goedit.me/
- https://github.com/thetronjohnson/layrr