A Chrome extension that lets you point at page elements and have Claude Code fix them — no screenshots, no copy-pasting selectors.
➜ Install from the Chrome Web Store
- In VS Code, type
/browse localhost:3000(or any URL) - Chrome opens the page, workspace sources are registered automatically
- Open the Claude Code Browser side panel
- Click on elements to select them
- Ask Claude to fix, modify, or inspect them
- Claude sees the element, reads your source code, and makes the fix
- Click any element on the page to select it
- Captures CSS selector, XPath, full DOM path, and HTML snippet
- Smart target resolution — clicking an SVG icon selects the parent button
- Tooltip shows element description while hovering
- Toggle with the ⌖ button, cancel with Escape or second click
- Auto-injects on pages loaded before the extension
- Selected elements appear as inline
⦾ <button>chips in the chat editor - Mix text and element references naturally: "fix the color of ⦾
<p>and align ⦾<svg>" - Rich context sent to Claude: DOM path, position, XPath, CSS selector, HTML snippet
- Collapsible tree view of the page's DOM structure
- Click nodes to add them as chips in the chat
- Hovering highlights elements on the page (amber overlay)
- Element picker selection highlights the node in the tree
- Auto-refreshes on tab switch and page navigation
- Remembers expanded/collapsed state
- Configure project directories per domain (e.g.,
localhost→ your project paths) - Passed to Claude Code as
additionalDirectories— Claude can read/edit your source files - Persisted in
chrome.storage.localkeyed by domain - Auto-populated from VS Code —
/browseskill registers all workspace directories automatically - Add/remove paths manually
- Send messages while the agent is running — they queue up
- Queue items shown as compact rows above the chat input
- Drag-and-drop to reorder queued messages
- Edit button fills the chat input with the queued message for editing
- Remove button to cancel queued messages
- Auto-sends next queued message when agent finishes
- Queue preserved on interrupts (not auto-sent after stop)
- ContentEditable editor with inline element chips
- ⌖ — Element picker (toggle on/off)
- @ — Attach images (paste, drag-drop, or file picker)
- // — Slash commands (dynamically loaded from Claude Code skills)
- ■ Stop button — visible while agent runs, with 3s fallback
- ↑ Send button — always enabled, queues if agent is busy
- Dynamic placeholder: "Ask about this page..." / "Queue a message..."
- Real-time streaming responses from Claude Code
- Full Markdown + GFM rendering (tables, code blocks, lists, blockquotes)
- Links open in new tabs
- "interrupted" shown as subtle italic text (not red error)
- Browse and resume previous Claude Code sessions
- Session titles from Claude Code (custom titles, summaries, first prompt)
- New Chat button in the top bar
- Claude can interact with your browser directly — no separate CDP browser needed
browser_navigate— Navigate to a URLbrowser_snapshot— Get accessibility tree or DOM structurebrowser_screenshot— Capture PNG screenshotbrowser_click— Click elements by CSS selector or XPathbrowser_evaluate— Execute JavaScript on the page
/browse <url>skill — opens URL in Chrome and registers workspace sources- Detects all workspace directories (pwd +
--add-dirpaths) - Sources auto-sync to the extension within seconds
- Works with Claude Code CLI too
- Auto-detection screen when native host isn't installed
- One command to install everything:
npx claude-code-browser install - Cross-platform (macOS, Linux, Windows)
- Auto-installs Claude Code CLI if missing
- Registers native messaging host +
/browseskill - Content script auto-injects on pre-loaded pages
Chrome Extension (React) ←Native Messaging→ Node.js Host ←Agent SDK→ Claude Code
↕ chrome.debugger ↕
Browser Tools Custom Tool Definitions
(navigate, snapshot, (browser_navigate,
screenshot, click, browser_snapshot,
evaluate) browser_screenshot, etc.)
- Chrome Extension — React + Zustand + Vite, Manifest V3 with Side Panel API
- Native Messaging Host — Node.js, launched automatically by Chrome
- Claude Agent SDK — Programmatic control, streaming, sessions, custom tools
- No Playwright/MCP — Uses
chrome.debuggerAPI directly
- Node.js 18+
- Claude Code CLI —
npm install -g @anthropic-ai/claude-code - Google Chrome
npx claude-code-browser installThis single command:
- Checks Node.js and Claude Code CLI (installs if missing)
- Registers the native messaging host for Chrome
- Installs the
/browseskill for Claude Code - Opens the Chrome Web Store page for the extension (one-click install)
After installing, restart Chrome (Cmd+Q then reopen).
# 1. Clone and install
git clone https://github.com/cmaftuleac/claude-code-browser.git
cd claude-code-browser
npm install
# 2. Build the extension
npm run build:extension
# 3. Load extension in Chrome
# → Open chrome://extensions
# → Enable "Developer mode"
# → Click "Load unpacked"
# → Select: apps/extension/dist/
# → Note the extension ID shown
# 4. Build and install the native host
npm run build:host
node apps/host/dist/install.js install <your-extension-id>
# 5. Restart Chrome (Cmd+Q then reopen)Open the extension's side panel. You should see:
- Connected (green dot)
- Sessions list with your Claude Code sessions
- Sources panel
- Components (DOM tree) panel
If you see "Setup Required", run the install command shown on screen.
npx claude-code-browser uninstallRemoves the native messaging host and /browse skill.
/browse http://localhost:3000
This:
- Registers all your workspace directories as sources
- Opens the URL in Chrome
- Sources appear in the extension's Sources panel automatically
- Click the extension icon to open the side panel
- ⌖ Pick elements → they appear as chips in your message
- Type your question and send
- Claude reads the page, your source code, and responds
- Queue follow-up messages while Claude is working
| Key | Action |
|---|---|
| Enter | Send message (or queue if agent running) |
| Shift+Enter | New line |
| Escape | Cancel element picker |
claude-code-browser/
├── apps/
│ ├── extension/ # Chrome Extension (Manifest V3, React, Vite)
│ │ ├── src/
│ │ │ ├── background/ # Service worker (native messaging, content script injection)
│ │ │ ├── content/ # Content script (element picker, DOM tree, highlighting)
│ │ │ └── sidepanel/ # React app (chat, queue, DOM tree, sources, stores)
│ │ └── dist/ # Built extension (load this in Chrome)
│ ├── host/ # Native Messaging Host (Node.js)
│ │ └── src/
│ │ ├── host.ts # Main entry (message loop, source polling)
│ │ ├── agent-manager.ts # Claude Agent SDK integration
│ │ ├── browser-tools.ts # Custom browser tool definitions
│ │ └── install.ts # Cross-platform installer
│ └── server/ # (Legacy) WebSocket server
├── packages/
│ └── shared/ # Shared TypeScript types (ws-protocol)
├── skills/
│ └── browse/SKILL.md # /browse skill for Claude Code
└── package.json # Monorepo root (npm workspaces + Turborepo)
npm run build # Build everything
npm run build:extension # Build Chrome extension only
npm run build:host # Build native host only
npm run dev:extension # Watch mode for extensionAfter rebuilding the extension, click the refresh icon on chrome://extensions to reload.
Developed by Fineguide.AI — Corneliu Maftuleac.
MIT — free to use, modify, and distribute.
Copyright (c) 2026 Fineguide.AI (Corneliu Maftuleac). See LICENSE for full terms.




