<?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: k-wada</title>
    <description>The latest articles on DEV Community by k-wada (@k-wada).</description>
    <link>https://dev.to/k-wada</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%2F4069023%2F8cbfd45f-fe5f-43e7-9098-3cab0480a40f.png</url>
      <title>DEV Community: k-wada</title>
      <link>https://dev.to/k-wada</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/k-wada"/>
    <language>en</language>
    <item>
      <title>After Shipping 8 Chrome Extensions, These Are the 5 Rules I Always Give AI Agents</title>
      <dc:creator>k-wada</dc:creator>
      <pubDate>Sat, 08 Aug 2026 17:01:20 +0000</pubDate>
      <link>https://dev.to/k-wada/after-shipping-8-chrome-extensions-these-are-the-5-rules-i-always-give-ai-agents-13al</link>
      <guid>https://dev.to/k-wada/after-shipping-8-chrome-extensions-these-are-the-5-rules-i-always-give-ai-agents-13al</guid>
      <description>&lt;p&gt;AI agents can build Chrome extensions surprisingly fast.&lt;/p&gt;

&lt;p&gt;After shipping eight extensions, though, I found that the biggest risks usually do not come from whether the code runs.&lt;/p&gt;

&lt;p&gt;They come from what the agent quietly adds while trying to be helpful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;another permission&lt;/li&gt;
&lt;li&gt;an external request&lt;/li&gt;
&lt;li&gt;a new dependency&lt;/li&gt;
&lt;li&gt;a refactor I did not ask for&lt;/li&gt;
&lt;li&gt;a change in what user data is read or stored&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of those can affect security, privacy, maintenance, and Chrome Web Store review.&lt;/p&gt;

&lt;p&gt;So before I ask an AI agent to implement anything, I now give it a small set of rules.&lt;/p&gt;

&lt;p&gt;These are the five I use most often.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Do not add or broaden permissions without asking
&lt;/h2&gt;

&lt;p&gt;Chrome extension permissions are part of the product.&lt;/p&gt;

&lt;p&gt;If the agent adds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"permissions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"storage"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="s2"&gt;"tabs"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or expands &lt;code&gt;host_permissions&lt;/code&gt;, that is not just an implementation detail.&lt;/p&gt;

&lt;p&gt;It changes what the extension is allowed to access and may change what users see during installation or what I need to explain during review.&lt;/p&gt;

&lt;p&gt;So I explicitly tell the agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not add or broaden permissions without asking me first.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If a new permission is necessary, I want the agent to stop and explain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;which permission is needed&lt;/li&gt;
&lt;li&gt;why it is needed&lt;/li&gt;
&lt;li&gt;what feature requires it&lt;/li&gt;
&lt;li&gt;whether there is a narrower alternative&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The default should be &lt;strong&gt;minimum permissions&lt;/strong&gt;, not “whatever makes implementation easier.”&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Do not add network communication
&lt;/h2&gt;

&lt;p&gt;A small local extension can easily become something very different if an agent introduces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an external API&lt;/li&gt;
&lt;li&gt;analytics&lt;/li&gt;
&lt;li&gt;telemetry&lt;/li&gt;
&lt;li&gt;a CDN&lt;/li&gt;
&lt;li&gt;remote configuration&lt;/li&gt;
&lt;li&gt;cloud storage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes these are useful.&lt;/p&gt;

&lt;p&gt;But they should never appear accidentally.&lt;/p&gt;

&lt;p&gt;For many of my extensions, I deliberately keep the design simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Web page
   ↓
Chrome extension
   ↓
chrome.storage.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No server.&lt;/p&gt;

&lt;p&gt;No account.&lt;/p&gt;

&lt;p&gt;No external transmission.&lt;/p&gt;

&lt;p&gt;That makes both the implementation and the privacy story easier to understand.&lt;/p&gt;

&lt;p&gt;So my second rule is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not add external network requests, analytics, telemetry, or CDN dependencies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If network access is truly required, I want that to become a design decision before it becomes code.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Do not modify unrelated files or features
&lt;/h2&gt;

&lt;p&gt;This one became more important as I started using coding agents for larger changes.&lt;/p&gt;

&lt;p&gt;Suppose I ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Add a function that stores selected text in chrome.storage.local.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;An agent may notice nearby code and decide to improve it too.&lt;/p&gt;

&lt;p&gt;The result might work.&lt;/p&gt;

&lt;p&gt;But now one small task has changed five files.&lt;/p&gt;

&lt;p&gt;That makes review harder.&lt;/p&gt;

&lt;p&gt;It also becomes difficult to answer a simple question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What exactly changed because of this request?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I usually add:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not modify unrelated files, features, or architecture.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For small Chrome extensions, I prefer changes that are easy to understand and easy to reverse.&lt;/p&gt;

&lt;p&gt;I would rather make five small changes than one clever change that touches the entire project.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Do not add dependencies unless they are really necessary
&lt;/h2&gt;

&lt;p&gt;AI agents are very good at finding packages.&lt;/p&gt;

&lt;p&gt;That does not mean I want them.&lt;/p&gt;

&lt;p&gt;If a 20-line utility function can solve the problem, adding another npm dependency may not be worth it.&lt;/p&gt;

&lt;p&gt;Every dependency creates more things to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;supply-chain risk&lt;/li&gt;
&lt;li&gt;updates&lt;/li&gt;
&lt;li&gt;licenses&lt;/li&gt;
&lt;li&gt;bundle size&lt;/li&gt;
&lt;li&gt;build complexity&lt;/li&gt;
&lt;li&gt;future maintenance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My rule is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Do not add new dependencies unless they are necessary. If you think one is needed, explain why before adding it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is especially useful for browser extensions because many features can be implemented with the browser APIs and plain JavaScript.&lt;/p&gt;

&lt;p&gt;Small tools benefit from staying small.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Stop before changing the data flow
&lt;/h2&gt;

&lt;p&gt;This is the most important rule.&lt;/p&gt;

&lt;p&gt;If an implementation changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what data is read&lt;/li&gt;
&lt;li&gt;where data is stored&lt;/li&gt;
&lt;li&gt;how long it is stored&lt;/li&gt;
&lt;li&gt;whether data leaves the browser&lt;/li&gt;
&lt;li&gt;which pages the extension can access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I do not want the agent to decide that silently.&lt;/p&gt;

&lt;p&gt;I tell it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If your change affects what data is read, stored, or transmitted, stop and explain the change before implementing it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This turns data flow into an explicit design decision.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Selected text
    ↓
Content script
    ↓
chrome.storage.local
    ↓
Extension UI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the agent wants to change that into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Selected text
    ↓
Content script
    ↓
External API
    ↓
Extension UI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;that is not a small implementation change.&lt;/p&gt;

&lt;p&gt;It is a different product architecture.&lt;/p&gt;

&lt;p&gt;I want to know before the code changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt I actually reuse
&lt;/h2&gt;

&lt;p&gt;Here is the short version I give coding agents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;When modifying this Chrome extension:

- Do not add or broaden permissions without asking me first.
- Do not add external network requests, analytics, telemetry, or CDN dependencies.
- Do not modify unrelated files or features.
- Do not add new dependencies unless they are necessary.
- If your change affects what data is read, stored, or transmitted, stop and explain the change before implementing it.
- Keep the implementation compatible with Manifest V3.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I usually add the task itself underneath this block.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task:

Add the ability to save selected text to chrome.storage.local.

Do not change the list UI or reordering behavior.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part is that the agent receives both:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;what I want it to do&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;what it is not allowed to decide on its own.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  I still verify everything myself
&lt;/h2&gt;

&lt;p&gt;These rules reduce surprises.&lt;/p&gt;

&lt;p&gt;They do not replace review.&lt;/p&gt;

&lt;p&gt;Before publishing, I still check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[ ] Are all permissions necessary?
[ ] Did any host permissions become broader?
[ ] Are there unexpected network requests?
[ ] Did the agent add a dependency?
[ ] Do I know exactly what data is read?
[ ] Do I know exactly what data is stored?
[ ] Does any data leave the browser?
[ ] Does the Chrome Web Store declaration match the implementation?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also load the extension through:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chrome://extensions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and use it on real pages before submitting it.&lt;/p&gt;

&lt;p&gt;An extension can pass tests and still feel annoying, request too much access, or behave differently from the store description.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed after eight extensions
&lt;/h2&gt;

&lt;p&gt;AI has definitely made implementation faster for me.&lt;/p&gt;

&lt;p&gt;But after shipping eight Chrome extensions, I spend less time asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can the agent build this?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and more time asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What decisions should the agent not be allowed to make?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That distinction has become one of the most useful parts of my workflow.&lt;/p&gt;

&lt;p&gt;AI agents are good at completing tasks.&lt;/p&gt;

&lt;p&gt;My job is to define the boundaries around those tasks.&lt;/p&gt;

&lt;p&gt;For Chrome extensions, those boundaries are especially important because permissions, network access, dependencies, and data handling affect not only the code, but also what users are being asked to trust.&lt;/p&gt;

&lt;p&gt;I am building and documenting these experiments as part of &lt;strong&gt;Legacy Tools&lt;/strong&gt;, a collection of small browser tools.&lt;/p&gt;

&lt;p&gt;The full development workflow I use — from choosing an idea to Chrome Web Store review — is also available on the Legacy Tools site.&lt;/p&gt;

</description>
      <category>chromeextension</category>
      <category>webdev</category>
      <category>agents</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
