Guides

How to show Claude Code a bug you see on screen

To show Claude Code a bug, give it a screenshot with the broken part marked, the page address, and one sentence on what you expected, then ask it to fix that.

Updated

Claude Code works in your project's files. It can't see the page in your browser. So when something looks wrong, your job is to carry what you see over to it. The better you carry it, the fewer rounds of "can you tell me more?" you get.

The manual way: a Claude Code screenshot, step by step

  1. Take a screenshot of the broken part. On a Mac, Cmd+Shift+4 lets you drag a box. On Windows, Win+Shift+S. Keep enough around it that the agent can tell where on the page it is.
  2. Mark the broken bit. If the picture has several buttons or cards, draw a circle or box on the one that's wrong. The Mac screenshot preview and the Windows Snipping Tool both let you draw.
  3. Get it into Claude Code. Claude Code's docs list three ways: drag the image into the Claude Code window, copy it and paste with Ctrl+V (Alt+V on Windows and WSL), or type the path to the image file in your message.
  4. Write one short message. What you did, what happened, what you expected. Add the page address, like localhost:3000/settings.
  5. Paste any red error text. If the page broke after a click, open the browser console and copy the red lines too. See how to copy console errors for your AI agent.

A good message looks like this:

[screenshot]
On localhost:3000/settings, I changed my name and clicked Save.
Nothing happened and the old name came back after a reload.
Expected: the new name is saved and a "Saved" message shows.
This is only about the settings page.

Why each part matters

The marked picture tells Claude Code which element you mean. A plain screenshot of a whole page is fine for "the logo is huge", but for "this button is grey" the agent has to guess which button.

The page address narrows the search. A route like /settings usually maps to a file or folder with a similar name.

"Expected" is the most important line. "It's broken" makes the agent invent a goal. "It should save and show Saved" gives it one to aim at.

The scope ("only here" or "everywhere") stops the agent asking, or worse, changing a shared style that breaks other pages. There's a whole guide on why your agent asks if a change is local or global.

Need your browser, screen size and dark mode setting for the report? What browser am I using? copies them in one click. Got a screen recording of the bug instead? Video to GIF turns it into something you can attach.

The one-key way with Darnly

The manual way works. It's also six steps and an app switch, every time. Darnly is a free Chrome extension that does the carrying for you:

  1. Press Option+Shift+B on a Mac (Windows is coming soon).
  2. Click the broken part. A red box follows your cursor. The arrow keys make it bigger or smaller, W picks the whole page.
  3. Type what you expected and press Enter.

Darnly saves a report into .darnly/inbox/ in your project: a screenshot with the broken part boxed in red, the element's selector, text and styles, the page address, the steps you took to get there, and console errors and failed requests from the last 60 seconds. On localhost it can sometimes name the component and file that drew the element. Passwords, tokens and keys are replaced with [hidden] first.

The first time, link your project folder and click Set up this project. That adds a short AGENTS.md note, a skill and a hook, so Claude Code knows where to look and mentions new bugs when you start a session or send your next message. After that you type /darnly, or say yes when Claude Code offers. It fixes each one, writes a Fixed: line saying what it changed, and moves the report to .darnly/done/. The Darnly panel then says "1 bug fixed. Take a look."

Code in the cloud, or on another computer? Add the Darnly MCP server to Claude Code once with claude mcp add --transport http --scope user darnly https://api.darnly.dev/mcp, and it reads your bugs from the Darnly cloud inbox. Set up Darnly in Claude Code, or paste our setup prompt and let Claude Code do it.

Which one should you use?

To be honest about it: in our own test on 8 planted bugs in a real app, a pasted screenshot plus one sentence got every bug fixed, and so did Darnly. Darnly cost more per bug, because of its extra steps. So a screenshot is not the wrong way. Darnly is for when you don't want to leave the page, when the bug is in the console and not on screen, or when you'd rather collect five bugs and fix them in one go. The full numbers are in Darnly vs a plain screenshot.

Questions

How do I paste a screenshot into Claude Code?

Copy the image, click into the Claude Code prompt and press Ctrl+V (Alt+V on Windows and WSL). You can also drag the image file into the window, or type its path in your message.

Can Claude Code see my browser?

Not by itself. Claude Code reads and edits the files in your project. It only sees your screen when you give it a picture, or when you connect a browser tool to it.

What should I write next to the screenshot?

Three things: what you did, what happened, and what you expected instead. Add the page address, and say whether the fix should be only on this page or everywhere the same thing shows up.

Why does Claude Code fix the wrong thing?

Usually because the screenshot shows more than one thing that could be broken. Draw a box around the broken part, or name it in words, like "the Save plan button under the cards".

Does Darnly work with Claude Code?

Yes. When you link your project folder and click Set up this project, Darnly adds a skill and an AGENTS.md note that tell Claude Code where your bug reports are, plus a hook so Claude Code tells you when bugs are waiting. Then you type /darnly.