Vibe Coding a Chrome Extension: 5 Steps to Pass Review
Originally published on ExtensionLaunch. Vibe coding a Chrome extension takes an afternoon now: describe the tool, let Claude Code, Cursor, Codex or Antigravity write it, and load it unpacked. Getting that build through
Originally published on ExtensionLaunch.
Vibe coding a Chrome extension takes an afternoon now: describe the tool, let Claude Code, Cursor, Codex or Antigravity write it, and load it unpacked. Getting that build through Chrome Web Store review is where most of these projects stall. Here's the workflow I'd use, plus the seven AI habits that get extensions rejected.
1. Give your agent current extension knowledge
Agents learned from years of tutorials, and a lot of those are Manifest V2. Google now ships a skill for coding agents that covers current extension APIs and store rules:
npx modern-web-guidance@latest install --choose
In the wizard, pick your agent and tick both chrome-extensions and modern-web-guidance. Then add Google's suggested line to your agent's instruction file (CLAUDE.md, GEMINI.md or your editor's rules file):
Whenever you are creating or making changes to a Chrome extension, create and manage a CHROMEWEBSTORE.md file.
That file becomes your store paperwork: single purpose, every permission with its reason, and your privacy answers. It lives in the repo, so each feature change updates the justification too.
2. Put the rules in the prompt
"Make me a tab manager" lets the agent pick the architecture. State the constraints up front instead:
Build a Manifest V3 Chrome extension that [what it does for the user].
Constraints:
- MV3 only: background service worker, chrome.action, chrome.scripting.
- Bundle every script and library. No CDN imports, no eval() or new Function().
- Request only the permissions this feature needs. Prefer activeTab;
make anything not needed at install optional.
- Keep state in chrome.storage, not service worker globals.
- No obfuscation and no API keys in extension code.
- Keep CHROMEWEBSTORE.md updated with a one-line reason per permission.
Two habits help: make the agent plan before coding (and read its permission list), and ship one feature at a time, loading the build after each.
3. Let the agent run the extension in Chrome
Chrome DevTools for agents now supports extension debugging: the agent can install, reload and trigger your extension, and inspect the popup and service worker. For Claude Code:
claude mcp add chrome-devtools --scope project -- npx chrome-devtools-mcp@latest --categoryExtensions --autoConnect
At the start of each browser session, open chrome://inspect/#remote-debugging and allow remote debugging. Use a separate Chrome profile, since the agent is attaching to a real browser.
Then test it yourself like a user would:
- Load the build folder (not the source) via Load unpacked.
- Use every feature, then check the service worker link on
chrome://extensionsfor errors. - Leave Chrome idle for a few minutes and retry. If something breaks, state is probably living in a service worker variable.
- Try a fresh profile to see the first run a reviewer sees.
4. Fix the 7 things AI gets wrong
The store judges what your package does, not who wrote it. These patterns map to real rejections:
| Agent output | Problem | Fix |
|---|---|---|
browser_action, background.page, tabs.executeScript
|
Manifest V2, gone from the store |
action, a service worker, scripting.executeScript
|
<script src> from a CDN |
Remote code (Blue Argon) | Install and bundle the library |
eval() / new Function() on generated strings |
Blocked by MV3 CSP, remote code if fetched | Data plus fixed logic; never run model output as code |
<all_urls>, tabs, history, cookies "just in case" |
Excessive permissions (Purple Potassium) | Delete any permission you can't point to in code |
| Bundler plugin that scrambles names | Obfuscation (Red Titanium) | Minify only |
| OpenAI or Gemini key in the bundle | Anyone can unzip and read it | Call the model from your server, or let users bring a key |
| Listing promises features the code lacks | Not working (Yellow Magnesium) | Describe only what ships today |
If your extension uses AI at runtime: sending text to a model and showing the answer is fine, because that's data. Asking a model for JavaScript and running it isn't, unless it runs in a sandboxed page.
Two self-checks to ask the agent for:
- Every permission, next to the line of code that needs it.
- Every network request, and what data it sends. That's the first draft of your privacy disclosures.
5. Submit carefully, then actually launch
Ask the agent to "prepare the extension for publication on the Chrome Web Store", then review CHROMEWEBSTORE.md yourself before pasting it into the Developer Dashboard. You're the one who stands behind it.
- Zip the build output with
manifest.jsonat the root. No stray source maps or.envfiles. - Write or heavily edit the listing. Agents love superlatives, and keyword stuffing gets flagged.
- New publishers get two extension slots by default, so don't burn them on experiments.
- Plan to do the upload by hand; Chromium blocks automation scripts on Web Store pages.
Approval isn't a launch. You start with zero users and zero reviews, and cheap building means more competition. Line up a community launch and a few directories for your first two weeks.
Key takeaways
- Install Google's extension skill so your agent writes MV3, not old MV2 tutorial code.
- Constraints in the prompt beat cleanup after the fact.
- Have the agent test in a real Chrome, then test again yourself after idling.
- Remote code, extra permissions, obfuscation and overpromising cause the rejections, not "AI code".
- Review every justification yourself before you submit.
The full walkthrough, with sources for each step, is in the guide to vibe coding a Chrome extension from prompt to published. When you're ready for launch day, ExtensionLaunch gives new Chrome extensions a launch page with live store data.
What's the strangest thing your coding agent put in a manifest.json that you had to rip out before submitting?
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.