/chrome-extension
Build Chrome extensions with Manifest V3. Use this skill whenever the user mentions Chrome extension, browser extension, manifest.json, content script, service worker (in extension context), popup, side panel, chrome.runtime, chrome.tabs, chrome.storage, chrome.scripting, or any
Claude Code
$ npx -y skills add samber/cc-skills --skill chrome-extension --agent claude-code
Codex
$ npx skills add samber/cc-skills --skill chrome-extension -a codex -y
Cursor
$ npx skills add samber/cc-skills --skill chrome-extension -a cursor -y
Gemini CLI
$ npx skills add samber/cc-skills --skill chrome-extension -a gemini-cli -y
GitHub Copilot
$ npx skills add samber/cc-skills --skill chrome-extension -a github-copilot -y
OpenCode
$ npx skills add samber/cc-skills --skill chrome-extension -a opencode -y
Windsurf
$ npx skills add samber/cc-skills --skill chrome-extension -a windsurf -y
SKILL.md
chrome-extension.SKILL.mdname: chrome-extension
description: "Build Chrome extensions with Manifest V3. Use this skill whenever the user mentions Chrome extension, browser extension, manifest.json, content script, service worker (in extension context), popup, side panel, chrome.runtime, chrome.tabs, chrome.storage, chrome.scripting, or any Chrome extension API. Also trigger when the user wants to inject scripts into web pages, communicate between page and background, bypass CSP from a content script, build an RPC layer over chrome messaging, or publish to the Chrome Web Store. Covers both new extension projects and adding features to existing ones. Do NOT use for CRXJS/Vite-based builds with HMR — use samber/cc-skills@crxjs instead."
user-invocable: true
license: MIT
compatibility: Designed for Claude Code, Codex or similar harness. Requires git, node.
metadata:
author: samber
version: "1.1.1"
openclaw:
emoji: "📝"
homepage: https://github.com/samber/cc-skills
requires:
bins:
- git
- node
- npm
allowed-tools: Read Edit Write Glob Grep Bash(git:*) Bash(gh:*) Bash(npm:*) AskUserQuestionChrome Extension Development (Manifest V3)
This skill covers everything needed to build, debug, and publish Chrome extensions with MV3. It is organized as a routing document: read this file first to understand the architecture and decision points, then load the relevant reference file for implementation details.
Reference files
Read only the reference files relevant to the current task. Each file is self-contained.
| File | When to read | | --- | --- | | `references/manifest-v3.md` | Setting up or modifying manifest.json, configuring icons, versioning | | `references/service-worker.md` | Background logic, lifecycle, state persistence, alarms, events | | `references/content-scripts.md` | Injecting code into pages, isolated/main world, dynamic injection, SPA handling, orphaning | | `references/messaging-rpc.md` | Communication between any contexts, typed protocols, RPC layer, async handler patterns | | `references/ui-surfaces.md` | Popup, options page, side panel, context menus, commands, notifications, omnibox, devtools panel | | `references/storage.md` | chrome.storage (local/sync/session), quotas, reactive patterns, framework hooks | | `references/network-csp.md` | HTTP requests from content scripts, CSP bypass relay, declarativeNetRequest, offscreen docs, CORS | | `references/permissions.md` | Required/optional permissions, host permissions, activeTab, runtime request flow | | `references/web-accessible-resources.md` | Exposing extension files to web pages, security implications | | `references/typescript-build.md` | TypeScript setup, project structure, build tools comparison, bundling | | `references/publishing.md` | Chrome Web Store submission, review process, rejection reasons, updates, privacy policy | | `references/execution-contexts.md` | Communication flow diagrams, per-context capabilities/limits, choosing the right messaging method | | `references/debugging-mistakes.md` | DevTools for extensions, testing SW termination, common gotchas, error patterns |
Architecture overview
A Chrome extension has up to 5 execution contexts that communicate via message passing:
┌──────────────────────────────────────────────────────────┐
│ Extension Process │
│ ┌─────────────────┐ ┌───────┐ ┌─────────┐ ┌──────┐ │
│ │ Service Worker │ │ Popup │ │ Options │ │ Side │ │
│ │ (background) │ │ │ │ Page │ │Panel │ │
│ │ - No DOM │ │ Full │ │ Full │ │ Full │ │
│ │ - Ephemeral │ │ DOM │ │ DOM │ │ DOM │ │
│ │ - All chrome.* │ │ All │ │ All │ │ All │ │
│ │ APIs │ │ APIs │ │ APIs │ │ APIs │ │
│ └────────┬─────────┘ └───┬───┘ └────┬────┘ └──┬───┘ │
│ │ chrome.runtime.sendMessage / connect │ │
└───────────┼────────────────┼───────────┼──────────┼──────┘
│ │ │ │
chrome.tabs.sendMessage │ │ │
│ │ │ │
┌───────────┼────────────────┼───────────┼──────────┼──────┐
│ Web Page ▼ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Content Script │ │ Main World Script │ │
│ │ (isolated world) │◄──►│ (page context) │ │
│ │ - Shared DOM │ │ - Shared DOM │ │
│ │ - Own JS scope │ │ - Page JS scope │ │
│ │ - chrome.runtime │ │ - No chrome.* API │ │
│ │ - chrome.storage │ │ - Full page access│ │
│ │ - Subject to CSP │ │ - Subject to CSP │ │
│ │ (network only) │ │ (fully) │ │
│ └──────────────────┘ └──────────────────┘ │
│ ▲ window.postMessage │
│ │ (through shared DOM) │
└──────────────────────────────────────────────────────────┘Communication flows (labeled channels)
┌───────────────────────────────────────────────────────────────────────────┐
│ Extension Process │
│ │
│ ┌─────────────────┐ chrome.runtime ┌───────┐ ┌─────────┐ ┌──────┐ │
│ │ Service Worker │◄─.sendMessage()──│ Popup │ │ Options │ │ Side │ │
│ │ (background) │◄─.connect()──────│ │ │ Page │ │Panel │ │
│ │ │ └───────┘ └─────────┘ └──────┘ │
│ │ - No DOM │ ┌────────────────────────────────────────────┐ │
│ │ - Ephemeral 30s │ │ SW cannot push to these pages. │ │
│ │ - All chrome.* │ │ Use: ports (.connect) or storage.onChanged │ │
│ └────────┬─────────┘ └────────────────────────────────────────────┘ │
│ │
Read more
name: chrome-extension
description: "Build Chrome extensions with Manifest V3. Use this skill whenever the user mentions Chrome extension, browser extension, manifest.json, content script, service worker (in extension context), popup, side panel, chrome.runtime, chrome.tabs, chrome.storage, chrome.scripting, or any Chrome extension API. Also trigger when the user wants to inject scripts into web pages, communicate between page and background, bypass CSP from a content script, build an RPC layer over chrome messaging, or publish to the Chrome Web Store. Covers both new extension projects and adding features to existing ones. Do NOT use for CRXJS/Vite-based builds with HMR — use samber/cc-skills@crxjs instead."
user-invocable: true
license: MIT
compatibility: Designed for Claude Code, Codex or similar harness. Requires git, node.
metadata:
author: samber
version: "1.1.1"
openclaw:
emoji: "📝"
homepage: https://github.com/samber/cc-skills
requires:
bins:
- git
- node
- npm
allowed-tools: Read Edit Write Glob Grep Bash(git:*) Bash(gh:*) Bash(npm:*) AskUserQuestionChrome Extension Development (Manifest V3)
This skill covers everything needed to build, debug, and publish Chrome extensions with MV3. It is organized as a routing document: read this file first to understand the architecture and decision points, then load the relevant reference file for implementation details.
Reference files
Read only the reference files relevant to the current task. Each file is self-contained.
| File | When to read | | --- | --- | | `references/manifest-v3.md` | Setting up or modifying manifest.json, configuring icons, versioning | | `references/service-worker.md` | Background logic, lifecycle, state persistence, alarms, events | | `references/content-scripts.md` | Injecting code into pages, isolated/main world, dynamic injection, SPA handling, orphaning | | `references/messaging-rpc.md` | Communication between any contexts, typed protocols, RPC layer, async handler patterns | | `references/ui-surfaces.md` | Popup, options page, side panel, context menus, commands, notifications, omnibox, devtools panel | | `references/storage.md` | chrome.storage (local/sync/session), quotas, reactive patterns, framework hooks | | `references/network-csp.md` | HTTP requests from content scripts, CSP bypass relay, declarativeNetRequest, offscreen docs, CORS | | `references/permissions.md` | Required/optional permissions, host permissions, activeTab, runtime request flow | | `references/web-accessible-resources.md` | Exposing extension files to web pages, security implications | | `references/typescript-build.md` | TypeScript setup, project structure, build tools comparison, bundling | | `references/publishing.md` | Chrome Web Store submission, review process, rejection reasons, updates, privacy policy | | `references/execution-contexts.md` | Communication flow diagrams, per-context capabilities/limits, choosing the right messaging method | | `references/debugging-mistakes.md` | DevTools for extensions, testing SW termination, common gotchas, error patterns |
Architecture overview
A Chrome extension has up to 5 execution contexts that communicate via message passing:
┌──────────────────────────────────────────────────────────┐
│ Extension Process │
│ ┌─────────────────┐ ┌───────┐ ┌─────────┐ ┌──────┐ │
│ │ Service Worker │ │ Popup │ │ Options │ │ Side │ │
│ │ (background) │ │ │ │ Page │ │Panel │ │
│ │ - No DOM │ │ Full │ │ Full │ │ Full │ │
│ │ - Ephemeral │ │ DOM │ │ DOM │ │ DOM │ │
│ │ - All chrome.* │ │ All │ │ All │ │ All │ │
│ │ APIs │ │ APIs │ │ APIs │ │ APIs │ │
│ └────────┬─────────┘ └───┬───┘ └────┬────┘ └──┬───┘ │
│ │ chrome.runtime.sendMessage / connect │ │
└───────────┼────────────────┼───────────┼──────────┼──────┘
│ │ │ │
chrome.tabs.sendMessage │ │ │
│ │ │ │
┌───────────┼────────────────┼───────────┼──────────┼──────┐
│ Web Page ▼ │
│ ┌──────────────────┐ ┌──────────────────┐ │
│ │ Content Script │ │ Main World Script │ │
│ │ (isolated world) │◄──►│ (page context) │ │
│ │ - Shared DOM │ │ - Shared DOM │ │
│ │ - Own JS scope │ │ - Page JS scope │ │
│ │ - chrome.runtime │ │ - No chrome.* API │ │
│ │ - chrome.storage │ │ - Full page access│ │
│ │ - Subject to CSP │ │ - Subject to CSP │ │
│ │ (network only) │ │ (fully) │ │
│ └──────────────────┘ └──────────────────┘ │
│ ▲ window.postMessage │
│ │ (through shared DOM) │
└──────────────────────────────────────────────────────────┘Communication flows (labeled channels)
┌───────────────────────────────────────────────────────────────────────────┐ │ Extension Process │ │ │ │ ┌─────────────────┐ chrome.runtime ┌───────┐ ┌─────────┐ ┌──────┐ │ │ │ Service Worker │◄─.sendMessage()──│ Popup │ │ Options │ │ Side │ │ │ │ (background) │◄─.connect()──────│ │ │ Page │ │Panel │ │ │ │ │ └───────┘ └─────────┘ └──────┘ │ │ │ - No DOM │ ┌────────────────────────────────────────────┐ │ │ │ - Ephemeral 30s │ │ SW cannot push to these pages. │ │ │ │ - All chrome.* │ │ Use: ports (.connect) or storage.onChanged │ │ │ └────────┬─────────┘ └────────────────────────────────────────────┘ │ │ │
AI agent skills are reusable instruction sets that extend your assistant with domain-specific expertise, loaded on demand so they don't bloat your context. This repository covers marketing and engineering skills authored by @samber.
Other skills on cc-skills.
More skills from other plugins.
no-ai-slop
Edit drafts into sharper, more human writing while preserving the writer's personal voice, or detect AI-slop patterns without…
browser-cdp
Use this skill when you need to control a Chrome browser via CDP (Chrome DevTools Protocol) to reuse existing login sessions.…
Questions about chrome-extension.
- Which coding agents can use chrome-extension?
- chrome-extension installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

