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

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

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

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
Define: a clear problem
HMW: How might we let a designer send element details to Claude in one click, without opening DevTools?
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
Prototype: build and test
v1: hover inspect + detail panel · v2: auto-copy Markdown on click · v3: ⌘+C shortcut + toast feedback
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
Point · click · get Markdown ready to paste
Four core features that get element details to Claude in one click

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

**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
What I decided, and why
Five key decisions that keep the extension working on any site without breaking

| Decision | Choice | Why |
|---|---|---|
| UI Isolation | Shadow DOM | Prevents style clashes with the inspected site. Whatever CSS the site uses, nothing breaks. |
| Panel Theme | Dark (#1e1e2e) | Less visual conflict with the site, and it looks like the dev tools designers already know |
| Clipboard | Offscreen Document | The content script has no clipboard permission → send through background → an offscreen document with a full DOM |
| Output Format | Compact Markdown | Claude reads structured text better than images: fewer tokens, easier to edit |
| Drop screenshots | Text-only | Testing showed the image clipboard is unreliable across browsers. Text works 100% of the time. |
Five rounds of refinement, from usable to good
Each round came from real use. Some added things, some cut them.

v1.0 — Hover + Panel + Manual Copy
Could inspect elements, but copying still needed a button press → slower than it should be
v1.0 + Screenshot: removed
Added auto-screenshot + element highlight capture → the image clipboard was unreliable, slowed the flow and made file downloads messy → removed
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
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
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
Content script → background → offscreen
Responsibilities split into three layers so clipboard copy works on every site

Content scripts talk to background via chrome.runtime.sendMessage, and background hands off to the offscreen document to do the copy
Tech Stack
Pure Manifest V3, no framework

What I learned
Four lessons from building a tool for myself

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.
