Skip to content

About

"Chrome extension: select → save → send prompts to ChatGPT/Claude/Gemini. Local Markdown library, thumbnails, zip export, Apple Notes bridge."

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

onclick2prompt

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.


Screenshot

Screenshot 1 — Right-click menu on any page

onclick2prompt right-click menu showing Send to ChatGPT, Send to Claude, Send to Gemini, Save to library, Save & send to Claude, and Open library

Screenshot 2 — Library page with saved prompt

onclick2prompt Library page in Claude-inspired cream design with search bar, filter rail, a saved prompt card, and an Export .zip button


Features

  • 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 .md per prompt, and a thumbs/ 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/k navigate, Enter open, s send, c copy, d download, n Apple Notes, p pin, t tag, 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.

Install

1. From source (recommended while v1.1.0 is pre-Store)

  1. Clone or download this repository.
    git clone <this repo> onclick2prompt
    cd onclick2prompt
  2. Open Chrome → chrome://extensions/.
  3. Toggle Developer mode (top-right).
  4. Click Load unpacked and pick the onclick2prompt/ folder.
  5. The coral ✦ icon appears in your toolbar.

2. Package for distribution

npm run package
# Produces: onclick2prompt-v1.1.0.zip

That zip can be dragged directly into chrome://extensions/ for another machine, or uploaded to the Chrome Web Store developer dashboard.

3. Optional — enable Apple Notes export (macOS)

One-time setup, ~60 seconds. See the detailed guide in assets/shortcut/README.md. Quick version:

  1. Open Shortcuts.app → + to create a new shortcut.
  2. Name it exactly Onclick2Prompt.
  3. Add two actions: Receive any input (Text, from Any app) and Create Note with Shortcut Input as body.
  4. 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.


Usage

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 ?).


Configuration

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.

Environment & dependencies

Runtime environment

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.

Build / dev environment (only needed if you want to repackage)

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.

NPM packages

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

Browser APIs used

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>.


Project layout

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

Privacy

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.local holds only settings).
  • Exported .md / .zip files contain only what you saved.
  • host_permissions are scoped to ChatGPT, Claude, and Gemini only. The <all_urls> content-script match is used only to read window.getSelection() — no page scraping.

Roadmap (post-1.1.0)

Tracked in TECH.md. Candidates: tag auto-suggest, dark theme, Firefox port, iCloud-friendly export, two-way Apple Notes sync via Shortcuts.


License

MIT

About

"Chrome extension: select → save → send prompts to ChatGPT/Claude/Gemini. Local Markdown library, thumbnails, zip export, Apple Notes bridge."

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages