DMDigital MansoorAI SEO Consultant

How to Build a Chrome Extension With AI: Google’s Official Coding Agent Setup

By

| Last updated:

Build a Chrome extension with AI using a coding agent and Chrome DevTools

Quick answer

To build a Chrome extension with AI, install Google’s extensions skill with the command npx modern-web-guidance@latest install –choose, then connect Chrome DevTools to your coding agent with the –categoryExtensions flag. Google’s guide covers Gemini CLI, Claude Code, Codex and Antigravity. The agent can install, reload and trigger your unpacked extension for testing. You must allow remote debugging in each new browser session.

Introduction

Most tutorials that show how to build a Chrome extension with AI paste a prompt and hope. Google’s Chrome team now publishes an official guide for coding agents, with a skill for extension development and a way for the agent to test the extension in a live browser. That is the setup this article covers.

I read Google’s two documentation pages on 19 November 2026. I did not run the commands for this article, so treat every step as the documented route, not a tested one.

What is Google’s guide for building extensions with coding agents?

The guide is titled “Build extensions with coding agents” on developer.chrome.com. It covers two parts. The first is an extensions skill, part of Modern Web Guidance. The second is Chrome DevTools for agents, which lets an AI coding assistant debug extensions directly in Chrome.

Google says the skill helps in three ways: current API knowledge (including APIs newer than the model’s training data), best practices, and submission readiness. Supported agents are Gemini CLI, Claude Code and Codex through the modern-web-guidance CLI, plus the Antigravity IDE.

Why build a Chrome extension with AI?

The skill targets the failures that waste time: outdated API calls and a rejected Web Store submission. For submission, the agent creates and maintains a CHROMEWEBSTORE.md file that tracks store-listing information, including a justification for each permission the code requests. Google suggests telling your agent, in its system file, to manage that file whenever it changes the extension.

The testing part removes manual steps. Instead of loading an unpacked extension and clicking reload after every change, your agent installs, reloads and triggers it for you.

How to build a Chrome extension with AI: step by step

  1. Install the skill. Google’s recommended command is: npx modern-web-guidance@latest install –choose. In the wizard, select your agent and choose chrome-extensions and modern-web-guidance.
  2. Connect Chrome DevTools to your agent. For Claude Code, Google gives: claude mcp add chrome-devtools –scope project — npx chrome-devtools-mcp@latest –categoryExtensions –autoConnect
  3. In Chrome, open chrome://inspect/#remote-debugging and enable “Allow remote debugging for this browser instance”.
  4. Run Google’s test prompt: “Create a hello world Chrome extension. Test using Chrome DevTools.”
  5. When the agent starts testing, Chrome shows a dialog asking for permission. Approve it only if you started the session.
  6. Ask the agent to maintain CHROMEWEBSTORE.md before you publish.

The two flags matter. –categoryExtensions turns on the extension tools, which are not active by default. –autoConnect connects to your existing Chrome profile, which Google says is needed for Chrome’s built-in AI APIs and sign-in flows.

What can the agent do in your browser?

Google lists five extension tools: install_extension, list_extensions, reload_extension, trigger_extension_action and uninstall_extension. The extension must be unpacked and stored in a local folder. If the folder sits outside the server’s workspace roots, install_extension fails with an “Access denied” error.

Which extension ideas suit an AI-built first project

This is my advice, not Google’s. Start with something small that touches one page: a button that copies the page title and meta description, or a panel that lists all headings. These need few permissions, so the permission justifications are short and the review is easier to pass.

Avoid ideas that read every site you visit, such as a scraper or a tracker. They need broad host access, and broad access draws closer review. For an SEO tool, one page and one action is a fair first scope.

Review what the agent writes

A coding agent can ask for more permissions than your extension needs. Read the manifest file before each test. Remove every permission you cannot explain in one sentence, then ask the agent to update CHROMEWEBSTORE.md to match. An extension with permissions it does not use is the quickest way to look careless to users and reviewers.

Test each change in a spare Chrome profile. If the agent breaks the extension, you lose a throwaway profile and not your logged-in work session. Keep the project in a folder you can inspect, because Google says the folder must be local and inside the server workspace roots.

Benefits of building a Chrome extension with AI

  • Up-to-date API knowledge supplied to the agent by the skill.
  • Permission justifications drafted for the Web Store form.
  • Live testing without manual reloads.
  • Works with Gemini CLI, Claude Code and Codex.
  • Free commands from Google’s own docs.

Limits and risks

Google lists real limits. You must allow remote debugging at the start of every new browser session. While it is active, Chrome shows a banner saying it is controlled by automated test software. The trigger_extension_action tool only runs an extension’s default action. Google Sign-in and similar flows may fail in a dedicated agent-testing profile.

Google also says Antigravity is not recommended for this setup because it does not let you edit the MCP configuration by hand.

My own caution, not Google’s: remote debugging gives an agent control of a browser. Use a separate Chrome profile, not the one with your client logins. Google’s page has no dedicated security section, so that decision is yours. For a related tool that drives your real browser, see our guide to Claude in Chrome.

Watch it built in a video

https://www.youtube.com/watch?v=Mhd_1efGX1k

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *