A personal Chrome extension. Press a hotkey, click any element on the page, and a Claude-Code-friendly markdown description of that element lands on your clipboard.
git clone <repo-url> picker
cd picker
git checkout claude/element-clipboard-extension-N14xP
- Open
chrome://extensionsand enable Developer mode (top right). - Click Load unpacked and select the
pickerfolder. - Press
Ctrl+Shift+E(Windows/Linux) orCmd+Shift+E(Mac) on any tab. - Hover, click the element you want, paste the result into Claude Code.
If the hotkey conflicts with another extension, rebind it at chrome://extensions/shortcuts.
- Open
chrome://extensions. - Enable Developer mode (top right).
- Click Load unpacked and select this folder.
- Optional: set or change the hotkey at
chrome://extensions/shortcuts. Default isCmd+Shift+E(mac) /Ctrl+Shift+E(Linux/Windows).
No build step. No npm install. Edit and reload from chrome://extensions.
- Press the hotkey on any tab. A blue banner appears at the top: Element picker active — Esc to cancel.
- Hover. The element under the cursor gets a blue outline plus a small label showing
tag.class · WxH. - Click the element you want. The picker captures it, copies markdown to the clipboard, and a green toast confirms.
- Paste into Claude Code.
Esc cancels at any point. Pressing the hotkey while the picker is active also cancels.
- Page URL + title + viewport + detected framework (
react/vue/svelte/angular/unknown) - A best-effort CSS selector path
- Tag, id, classes, relevant attributes (aria/data/role/name/href/etc.)
- Bounding box geometry
- React component name + source
file:line:colwhen fiber_debugSourceis present (Vite/CRA dev builds) - Up to 5 ancestors as a structural breadcrumb
- Trimmed text content (≤ 200 chars)
- Curated computed styles, only those that differ from a fresh element of the same tag
outerHTML(truncated past 4000 chars)
Sections with nothing useful are omitted rather than shown empty.
manifest.json— MV3 manifest, declares the keyboard command and theactiveTab/scripting/clipboardWritepermissions.background.js— service worker. On the keyboard command, injects the picker into the active tab in theMAINworld viachrome.scripting.executeScript.lib/selector.js— builds the CSS selector path.lib/styles.js— captures non-default computed styles.lib/react-fiber.js— climbs React fiber tree to find component name + dev source.lib/format.js— assembles the markdown blob.lib/overlay.js— picker UI (highlight, label, banner, toast).content.js— orchestrator. Re-injection toggles the picker off if it's already active.
The lib files attach functions to window.__ELP; content.js reads from there. Running in MAIN world is required so the React fiber lookup can read property keys defined by the page's React runtime.
- Cross-origin iframes — not traversed (Chrome can't, anyway).
- Same-origin iframes / shadow DOM —
elementFromPointreturns the host element. Stops there. - No screenshot, no Vue/Svelte source mapping, no settings UI, no local-server bridge.