<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Markus Pullmann</title>
    <description>The latest articles on DEV Community by Markus Pullmann (@mackshot).</description>
    <link>https://dev.to/mackshot</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4069985%2F8bc282bb-cf14-4398-9ae7-9b9997840a6e.jpg</url>
      <title>DEV Community: Markus Pullmann</title>
      <link>https://dev.to/mackshot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mackshot"/>
    <language>en</language>
    <item>
      <title>I Built a Zero-Dependency Browser Extension to Feed Context to AI Coding Agents</title>
      <dc:creator>Markus Pullmann</dc:creator>
      <pubDate>Sun, 09 Aug 2026 16:45:49 +0000</pubDate>
      <link>https://dev.to/mackshot/i-built-a-zero-dependency-browser-extension-to-feed-context-to-ai-coding-agents-2pdc</link>
      <guid>https://dev.to/mackshot/i-built-a-zero-dependency-browser-extension-to-feed-context-to-ai-coding-agents-2pdc</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; A Manifest V3 Chrome/Firefox extension that lets you click any DOM element and send structured context to Claude, Cursor, or any AI tool — no MCP server, no node_modules, no runtime dependencies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2irmp1c6zri8v9z1gh5y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2irmp1c6zri8v9z1gh5y.png" alt="Web to AI Agent popup with delivery options and capture modes" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The problem I kept hitting
&lt;/h2&gt;

&lt;p&gt;I use Claude and Cursor daily. Half the time I'm asking them about a webpage — a UI bug, a component I want to replicate, a layout I need to understand. The workflow is always the same:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open DevTools&lt;/li&gt;
&lt;li&gt;Inspect the element&lt;/li&gt;
&lt;li&gt;Copy the HTML&lt;/li&gt;
&lt;li&gt;Copy the selector&lt;/li&gt;
&lt;li&gt;Find the URL and title&lt;/li&gt;
&lt;li&gt;Paste it all into the AI chat&lt;/li&gt;
&lt;li&gt;Realize I forgot the surrounding context and go back&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Seven steps to give an AI what it needs. I wanted one.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I looked at first
&lt;/h2&gt;

&lt;p&gt;There are existing tools for this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;DOMLens&lt;/strong&gt; — point-and-click capture for Cursor/Claude Code. Works well, but Chrome-only and opinionated about your AI tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Element to LLM&lt;/strong&gt; — cross-browser, structured JSON snapshots. Heavier than I needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LoopIn, peek, Dokobot&lt;/strong&gt; — all require running a local MCP server or SQLite database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I didn't want to run a server. I didn't want &lt;code&gt;npm install&lt;/code&gt;. I wanted a browser extension that copies rich context to my clipboard and lets me paste it wherever — Claude, Cursor, ChatGPT, a local Ollama setup, whatever.&lt;/p&gt;

&lt;h2&gt;
  
  
  The design constraints
&lt;/h2&gt;

&lt;p&gt;I set a few hard rules before writing a line of code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero dependencies.&lt;/strong&gt; No package.json, no build framework, no bundler. The repo &lt;em&gt;is&lt;/em&gt; the extension — Chrome can load it directly as unpacked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dual browser.&lt;/strong&gt; Chrome and Firefox from one codebase, using Manifest V3 for both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clipboard-first.&lt;/strong&gt; The default delivery is copy-paste. No server, no bridge, no middleware.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-demand access.&lt;/strong&gt; Only &lt;code&gt;activeTab&lt;/code&gt; — the extension only sees a page when you click it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How it works / The flow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;You click the extension icon (or hit &lt;code&gt;Alt+Shift+C&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;An element picker overlay appears on the page&lt;/li&gt;
&lt;li&gt;You hover to preview, click to capture&lt;/li&gt;
&lt;li&gt;The extensions grabs the URL, title, selector, text, HTML, and optionally a cropped screenshot&lt;/li&gt;
&lt;li&gt;It formats everything into a prompt&lt;/li&gt;
&lt;li&gt;It goes to your clipboard (or into a local AI tab)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What gets captured
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Quick capture&lt;/strong&gt; gives the AI:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Page URL and title&lt;/li&gt;
&lt;li&gt;CSS selector for the element&lt;/li&gt;
&lt;li&gt;Element text content&lt;/li&gt;
&lt;li&gt;Element HTML&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Full capture&lt;/strong&gt; adds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Surrounding HTML (grandparent element) for context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bug report mode&lt;/strong&gt; adds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Viewport dimensions, user agent&lt;/li&gt;
&lt;li&gt;Console errors and warnings captured during selection&lt;/li&gt;
&lt;li&gt;Computed style summary (layout, spacing, typography, colors)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Accessibility mode&lt;/strong&gt; adds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ARIA role, labels, descriptions&lt;/li&gt;
&lt;li&gt;Focusability, disabled/hidden state&lt;/li&gt;
&lt;li&gt;Contrast estimate&lt;/li&gt;
&lt;li&gt;Semantic/landmark ancestors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also attach a cropped screenshot of the element with configurable format, compression, and padding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Shadow DOM and iframes
&lt;/h2&gt;

&lt;p&gt;The tricky part. Modern UI frameworks use Shadow DOM and iframes everywhere. The picker does recursive &lt;code&gt;elementFromPoint&lt;/code&gt; through open shadow roots, so you can capture internal elements of web components. For iframes, it translates frame-local coordinates to top-level viewport coordinates for screenshot cropping.&lt;/p&gt;

&lt;p&gt;Selectors for shadow-contained elements use a &lt;code&gt;host &amp;gt;&amp;gt;&amp;gt; internal&lt;/code&gt; notation — human-readable, not a native CSS selector, but useful for AI agents to understand the component boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt templates
&lt;/h2&gt;

&lt;p&gt;I added built-in templates for common tasks: describe a UI, summarize content, generate a Playwright test, extract data, audit accessibility, write implementation notes. You can edit them. The "no template" default just gives the raw context — useful when you want to write your own instructions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Manifest V3 is fine for simple extensions.&lt;/strong&gt; The service worker model works well when your background logic is stateless message handling. The biggest friction was Firefox's partial MV3 support — some permissions behave differently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clipboard is underrated.&lt;/strong&gt; The "just copy it" approach works with every AI tool. No integration, no API, no webhook. Paste into Claude, paste into Cursor, paste into a Slack message. The clipboard is the universal interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dependency-free means reviewable.&lt;/strong&gt; Every line of code is human-readable. No transpiled output, no bundled dependencies, no node_modules.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Element capture is harder than it looks.&lt;/strong&gt; Shadow DOM traversal, iframe coordinate translation, selector uniqueness, screenshot cropping with DPI scaling — each has edge cases that compound.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Redaction toggle (mask emails, tokens, passwords before copy)&lt;/li&gt;
&lt;li&gt;Preview/edit before send&lt;/li&gt;
&lt;li&gt;Markdown capture mode (cleaner than raw HTML for most AI tools)&lt;/li&gt;
&lt;li&gt;Character-based prompt size display&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chrome:&lt;/strong&gt; &lt;a href="https://chromewebstore.google.com/detail/web-to-ai-agent/alecaejbgojhghhhgaaapkcgmcpdkpaf" rel="noopener noreferrer"&gt;Chrome Web Store&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firefox:&lt;/strong&gt; &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/web-to-ai-agent/" rel="noopener noreferrer"&gt;Firefox Add-ons&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's free and has zero dependencies. If you use AI coding tools and frequently reference webpages, give it a shot and let me know what breaks.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Feedback and bug reports welcome.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>browserextension</category>
      <category>ai</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
