Windsurf prompt

Chrome Extension MV3

Manifest V3 Chrome extension with popup, content script, background service worker, and storage.

Build a Chrome extension for {{extension_name}}.

## Purpose: {{purpose}}
## What it modifies/reads: {{target_pages}}
## User interaction: {{user_interaction}}

### Manifest V3 Structure
```json
{
  "manifest_version": 3,
  "name": "{{extension_name}}",
  "version": "1.0.0",
  "description": "{{purpose}}",
  "permissions": ["{{permissions}}"],
  "host_permissions": ["{{host_permissions}}"],
  "action": { "default_popup": "popup.html" },
  "background": { "service_worker": "background.js" },
  "content_scripts": [{
    "matches": ["{{target_pages}}"],
    "js": ["content.js"]
  }]
}
```

### Popup (popup.html + popup.js)
UI built with vanilla JS or React (bundled).
Shows current state and controls for {{user_interaction}}.
Reads/writes to chrome.storage.sync for persistence.

### Content Script (content.js)
Runs on {{target_pages}}.
Reads DOM content or modifies the page.
Communicates with background via chrome.runtime.sendMessage.
Inject UI elements if needed.

### Background Service Worker (background.js)
Handles long-running tasks.
chrome.runtime.onMessage listener for content/popup messages.
Optional: alarm-based scheduling for periodic tasks.
Manages API calls (avoid CORS issues from content script).

### Storage
chrome.storage.sync: user settings (synced across devices, 100KB limit).
chrome.storage.local: larger data (5MB limit).

### Options Page
Settings UI for extension configuration.
Save/load from chrome.storage.sync.

### Packaging
webpack or esbuild config for bundling.
.crxignore for clean package.
README with installation and usage instructions.

Fill in: {{extension_name}}, {{purpose}}, {{target_pages}}, {{user_interaction}}, {{permissions}}, {{host_permissions}}. In Loopy you fill these in a form and copy the finished prompt in one click.