Skip to content

Repository files navigation

Claude Browser Inspector

A Chrome extension that lets you visually select any element on a webpage and use it as context when working with Claude AI.

Chrome Extension Manifest V3

How It Works

  1. Add target URLs in the extension popup (e.g., localhost:3000, example.com)
  2. Hold the activation shortcut (default: Alt) and hover over elements to highlight them
  3. Click to select an element
  4. Ask Claude what you need — tell it to check window.__selected for the element you picked and use it as context
  5. Press Esc to clear the selection

Requires Claude for Chrome extension to communicate with Claude.

Features

  • Persistent injection — the inspector survives page reloads automatically
  • Custom URL list — choose exactly which sites the inspector is active on
  • Configurable shortcut — change the activation modifier (Alt, Ctrl, Shift, Cmd, or any combination)
  • Instant toggle — enable/disable the inspector globally with one click
  • Zero data collection — all settings stored locally via Chrome sync storage

Installation

From source

  1. Clone this repository:
    git clone https://github.com/Jekins/claude-browser-inspector.git
    
  2. Open chrome://extensions in Chrome
  3. Enable Developer mode (top-right toggle)
  4. Click Load unpacked and select the cloned folder
  5. Pin the extension for quick access

URL Matching

The extension supports flexible URL patterns:

Input Matches
google.com google.com, www.google.com, mail.google.com, ...
localhost:3000 http://localhost:3000, https://localhost:3000
https://example.com Only https://example.com (strict protocol)
*.example.com Any subdomain of example.com
example.com/app Any page under /app path

Architecture

  • Manifest V3 with service worker (no persistent background page)
  • Injects the element picker into MAIN world via chrome.scripting.executeScript so window.__selected is accessible from the page console
  • Uses dynamic injection instead of registerContentScripts to support URL patterns with ports (which Chrome match patterns don't support)
  • Modifier config is updated in-place without re-injecting the entire inspector

Privacy

This extension does not collect, transmit, or share any data. All settings are stored locally. See Privacy Policy.

License

MIT

About

Chrome extension: select any element on a webpage and use it as context for Claude AI

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages