v1.1.0 · Chrome extension (Manifest V3)
Capture great prompts from any webpage. Select text → send it straight
to ChatGPT, Claude, or Gemini, or save it to a local Markdown library
you can search, tag, re-send, and export as a .zip.
Designed in the Claude.ai visual language: warm cream background, serif titles, one coral accent, zero telemetry, zero backend.
- Floating pill on selection — discreet coral dot appears next to selected text. Click to reveal ChatGPT · Claude · Gemini · Save · Save & send.
- Right-click submenu — mirrors every action in the native context menu (see screenshot 1). The Save & send to … label always reflects your chosen default AI.
- Local Markdown library — every save is a plain Markdown file with YAML front-matter (title, source URL, tags, created date, thumbnail path, word count). Stored in IndexedDB; never leaves your machine.
- Thumbnail capture — when the selection sits near an image, the
extension grabs the nearest
<img>, resizes it to ≤ 256 px, and attaches it to the prompt. - Bulk export — the Export .zip button produces an archive with
index.md, one.mdper prompt, and athumbs/folder. The zip opens in Finder, Keka,rar/unrar, 7-Zip, etc. - Send to Apple Notes (macOS) — one-click bridge via a user-installed
macOS Shortcut (see
assets/shortcut/README.md), with automatic clipboard fallback for large payloads or non-Mac systems. - Keyboard-first library —
/search,j/knavigate,Enteropen,ssend,ccopy,ddownload,nApple Notes,ppin,ttag,Delete(with 6-second undo toast),?shortcuts help. - Zero dependencies — no build step, no runtime libraries, no analytics. The extension runs on vanilla ES modules.
- Clone or download this repository.
git clone <this repo> onclick2prompt cd onclick2prompt
- Open Chrome →
chrome://extensions/. - Toggle Developer mode (top-right).
- Click Load unpacked and pick the
onclick2prompt/folder. - The coral ✦ icon appears in your toolbar.
npm run package
# Produces: onclick2prompt-v1.1.0.zipThat zip can be dragged directly into chrome://extensions/ for
another machine, or uploaded to the Chrome Web Store developer
dashboard.
One-time setup, ~60 seconds. See the detailed guide in
assets/shortcut/README.md. Quick version:
- Open Shortcuts.app → + to create a new shortcut.
- Name it exactly
Onclick2Prompt. - Add two actions: Receive any input (Text, from Any app) and Create Note with Shortcut Input as body.
- Save.
Test:
open "shortcuts://run-shortcut?name=Onclick2Prompt&input=text&text=Hello"From then on, the Notes button on any Library card pushes the Markdown straight into Apple Notes. Payloads over ~6 KB fall back to the clipboard automatically.
| Action | Where | How |
|---|---|---|
| Send selection to AI | Any webpage | Select text → click the coral Prompt pill → pick a platform. Or right-click → Send to … |
| Save selection | Any webpage | Pill → Save to library. Or right-click → Save to onclick2prompt library |
| Save + send in one step | Any webpage | Pill → Save & send. Uses your Default platform setting. |
| Open the library | Anywhere | Toolbar icon → Open library. Or press ⌘⇧L / Ctrl⇧L |
| Save from keyboard | Any webpage | Select text → ⌘⇧S / Ctrl⇧S |
| Re-send a saved prompt | Library | Click Send to … on a card, or press s when the card is selected |
| Tag a prompt | Library | Click the tag row on a card (or press t). Comma-separated input; Enter saves. |
| Pin / unpin | Library | Pin icon (top-right of a card) or press p |
| Delete with undo | Library | Trash icon or Delete/Backspace. A toast with Undo stays for 6 s. |
| Export everything | Library | Export .zip in the top bar respects the current search/filter. |
| Send to Apple Notes | Library | Notes icon or the dropdown in the split send button, or press n |
All library keyboard shortcuts are listed in the in-app ⌨︎ dialog
(click the keyboard icon in the top bar, or press ?).
Open the popup (toolbar icon) to change:
| Setting | Values | Notes |
|---|---|---|
| Default platform | Claude · ChatGPT · Gemini | Used by Save & send and the Send to <X> primary button. |
| Save on send | on / off | When on, every Send also saves a copy. |
| Apple Notes mode | Auto · Shortcut only · Clipboard only | Auto picks Shortcut ≤ 6 KB, else clipboard. |
| Shortcut name | string | Rename if your macOS Shortcut isn't called Onclick2Prompt. |
| Component | Minimum | Why |
|---|---|---|
| Chromium-based browser | Chrome 116 / Edge 116 / Brave 1.60 / Arc | MV3 service_worker: { "type": "module" }, OffscreenCanvas, chrome.downloads, chrome.commands, CSS color-mix(). |
| macOS | 13 Ventura+ (only for Apple Notes bridge) | Shortcuts.app + shortcuts:// URL scheme. Windows/Linux run everything else unchanged. |
| Tool | Version | Purpose |
|---|---|---|
zip CLI |
any | npm run package wraps /usr/bin/zip. Preinstalled on macOS / Linux. |
| Node.js | 20.x or newer (optional) | Running node --check on the source as a lint pass. Not required to use the extension. |
| Python 3 | any (optional) | Validating manifest.json / package.json with json.load. |
None. onclick2prompt ships as plain ES modules. package.json declares
name, version, description, keywords, license, and a single
scripts.package command. There is no dependencies, no
devDependencies, no node_modules/, no bundler, no transpiler.
Everything in lib/ is hand-written:
| File | Role |
|---|---|
lib/id.js |
Time-sortable IDs + slugify |
lib/storage.js |
IndexedDB wrapper + settings helpers |
lib/markdown.js |
YAML front-matter serializer |
lib/zip.js |
~180-line STORE-mode .zip writer (CRC32, UTF-8, UNIX 0644) |
lib/platforms.js |
Platform registry (id / label / URL) |
lib/messages.js |
ACT message action constants |
lib/apple-notes.js |
shortcuts:// URL builder + clipboard fallback |
chrome.runtime, chrome.storage.local, chrome.tabs,
chrome.contextMenus, chrome.commands, chrome.downloads,
chrome.scripting, plus standard Web APIs IndexedDB,
OffscreenCanvas, Shadow DOM, navigator.clipboard, <dialog>.
onclick2prompt/
├── manifest.json MV3
├── background/service-worker.js Routing, save, context menus, commands
├── content/
│ ├── capture.js Nearest-image thumbnail capture
│ ├── selection.js Shadow-DOM floating pill + menu
│ └── selection.css Placeholder (styles live in shadow root)
├── lib/ Vanilla helpers (see table above)
├── ui/
│ ├── popup.html | popup.css | popup.js 300px launcher + settings
│ ├── library.html | library.css | library.js Full-page library
│ └── tokens.css Shared Claude-style design tokens
├── assets/shortcut/README.md Apple Shortcut setup guide
├── icons/ 16 / 48 / 128 PNG
├── TECH.md Architecture & roadmap
├── README.md
└── package.json
Nothing leaves your machine unless you explicitly click a Send to AI button (which opens that platform's web UI in a new tab with your prompt in a URL parameter).
- No analytics, no crash reporting, no telemetry.
- All prompts + thumbnails live in your browser's IndexedDB
(
chrome.storage.localholds only settings). - Exported
.md/.zipfiles contain only what you saved. host_permissionsare scoped to ChatGPT, Claude, and Gemini only. The<all_urls>content-script match is used only to readwindow.getSelection()— no page scraping.
Tracked in TECH.md. Candidates: tag auto-suggest,
dark theme, Firefox port, iCloud-friendly export, two-way Apple Notes
sync via Shortcuts.
MIT

