ToolingProjects

Design Inspector for Claude

Design Inspector for Claude came from noticing my own pain point and solving it with Design Thinking: empathize, prototype, then iterate through real use

6 min read

Inspect → Copy → Paste to Claude: a Chrome extension that lets a UX designer inspect an element on any web page and copy its details as Markdown for Claude AI in a single click

Chrome ExtensionManifest V3Shadow DOMOffscreen APIDesign ThinkingAI Workflow
Background

Every time I wanted to tell Claude "fix this element", I had to gather the details by hand

As a UX designer who uses Claude as a design assistant, I hit the same problem every day: to say "please fix this element", I had to open DevTools → find the details → copy the CSS → format it → paste it into the prompt every single time

That took 2–3 minutes per element and happened dozens of times a day. It added up to far more time than I expected.

A dark-theme code editor with a terminal and project files
Before the tool: switching between DevTools, the editor and the prompt every time I needed to say which element to fix · Photo: Bernd Dittrich / Unsplash
Design Thinking Process

From my own pain point to an extension I use every day

Five Design Thinking stages, from watching my own workflow to refining through real use

The extension popup: Active status, a Disable button and Copy Sections options
The actual popup: turn the inspector on or off and choose what to copy (Element & Path · CSS Styles · Classname)
01

Empathize: understand the pain point

Watched my own workflow with Claude · The slowest step was preparing element details for Claude · Constant switching between DevTools, code editor and Claude prompt

02

Define: a clear problem

HMW: How might we let a designer send element details to Claude in one click, without opening DevTools?

03

Ideate: explore the options

Bookmarklet: simple, but lacks the permissions it needs · Chrome extension: full API access, works on every site · Studied the Element Inspector extension as a reference

04

Prototype: build and test

v1: hover inspect + detail panel · v2: auto-copy Markdown on click · v3: ⌘+C shortcut + toast feedback

05

Test & Iterate: use it for real, then improve

Markdown too long → trimmed to ~200 tokens · Screenshots slowed the flow → removed, text only · Clipboard API failed in the content script → moved to an offscreen document

Features

Point · click · get Markdown ready to paste

Four core features that get element details to Claude in one click

Hovering over an "awaiting payment" status box shows a colored box-model overlay and a tooltip with the tag, size and font
Real hover inspect: colored overlay for margin / padding / content + a tooltip with tag, size and font (sample page)
  • Hover Inspect Point at an element to see a colored box-model overlay (margin/padding/content) with a tooltip showing tag, size and font
  • Detail Panel Click an element to open a right-hand panel with a box-model diagram, computed styles, an HTML snippet and CSS variables
  • Auto Copy Markdown Click or press ⌘+C to copy the element's details to the clipboard as Markdown, ready to paste into a Claude prompt
  • Visual Feedback A blue flash highlight + a floating toast pill at the bottom confirm whether the copy worked
Output

The output

One click on one element gives the full picture. Claude can tell right away which element it is, which file it lives in and how it is styled:

The Markdown the extension actually copies to the clipboard, pasted into the input with a design-change instruction
Real Markdown from a single click (you can follow it with an instruction in any language)
**Element:** `div.vd-status-hero--warning` (844×132)
**File:** http://localhost/voucher-detail.html
**Path:** `div.real-content > div#status-hero > div.vd-status-hero`
**Styles:** padding: 14px 16px | font: 400 16px/26px IBM Plex Sans Thai | bg: #FEF9EB | radius: 12px
```html
<div class="vd-status-hero vd-status-hero--warning">
  <div class="vd-status-hero__title">Awaiting payment</div>
  ...
</div>
```

~200 tokens per element: compact enough for Claude to understand without eating the context window

Design Decisions

What I decided, and why

Five key decisions that keep the extension working on any site without breaking

Dark-theme detail panel on the right showing box model, layout, typography and a Copy for Claude button
Detail panel inside Shadow DOM with a dark #1e1e2e theme, so it never clashes with the CSS of the page being inspected
DecisionChoiceWhy
UI IsolationShadow DOMPrevents style clashes with the inspected site. Whatever CSS the site uses, nothing breaks.
Panel ThemeDark (#1e1e2e)Less visual conflict with the site, and it looks like the dev tools designers already know
ClipboardOffscreen DocumentThe content script has no clipboard permission → send through background → an offscreen document with a full DOM
Output FormatCompact MarkdownClaude reads structured text better than images: fewer tokens, easier to edit
Drop screenshotsText-onlyTesting showed the image clipboard is unreliable across browsers. Text works 100% of the time.
Iteration Journey

Five rounds of refinement, from usable to good

Each round came from real use. Some added things, some cut them.

The selected element highlighted in blue, with a "Copied to clipboard" toast at the bottom
The v3 result: a blue flash on the element + a "Copied to clipboard" toast that confirms the status immediately
01

v1.0 — Hover + Panel + Manual Copy

Could inspect elements, but copying still needed a button press → slower than it should be

02

v1.0 + Screenshot: removed

Added auto-screenshot + element highlight capture → the image clipboard was unreliable, slowed the flow and made file downloads messy → removed

03

Clipboard Fix — Offscreen Document

navigator.clipboard did not work in the content script because the user gesture expires after an async call → fixed by sending the copy to an offscreen document via background

04

Shorter Markdown: from verbose to compact

The original Markdown had a table + ASCII box model, about 400 tokens → condensed to one-line styles, about 200 tokens, saving 50% of context

05

v1.1 — Cleanup & Ship

Removed 224 lines of dead code (screenshot.js, styles.css), made error handling consistent, cut the file count from 7 to 5

Architecture

Content script → background → offscreen

Responsibilities split into three layers so clipboard copy works on every site

Actual code from background.js and offscreen.js that relays the message and copies in the offscreen document
Real code: the content script sends a message → background → an offscreen document that can write to the clipboard
Content Scripts (injected per page)
overlay.js — hover/click visualpanel.js — detail panel UImarkdown.js — generate outputinspector.js — controller/state
chrome.runtime.sendMessage
background.js (service worker)
route messages, manage offscreen
↓
offscreen.js (clipboard access)
execCommand('copy') → clipboard

Content scripts talk to background via chrome.runtime.sendMessage, and background hands off to the offscreen document to do the copy

Tech Stack

Tech Stack

Pure Manifest V3, no framework

A Manifest V3 manifest.json file with its list of permissions
manifest.json (Manifest V3): only 5 permissions requested · organization name blurred
Chrome Extension Manifest V3Shadow DOMOffscreen APIContent ScriptsService WorkerClipboard APIgetComputedStyle()CSS Variable Detection
Learnings

What I learned

Four lessons from building a tool for myself

Paper wireframe sketches of several mobile screens on a desk
Good tools start from watching your own workflow · Photo: Amélie Mourichon / Unsplash

Clipboard ≠ Simple: Content scripts have no direct clipboard permission. You need to understand the user gesture lifecycle and use an offscreen document as a proxy.

Less > More: The screenshot feature looked good on paper but was slow and unreliable in practice. The tool is better without it.

Shadow DOM Isolation: If you inject UI into a page, use Shadow DOM. Otherwise the site's CSS and the extension's CSS will clash, guaranteed.

Design for AI Context: Output for AI has to respect a token budget. More data is not better; it needs to be compact and structured.

Tan · Natpakan Sirirat

Product Designer & AI Builder — designing user experiences and building AI tools that actually work.

0%