chrome-extension

chrome-extension is a skill for Claude Code, Codex from ericrisco/rsc-harness. It costs 76 tokens per session (2,699 once invoked), scanned A, original, MIT.

A guide to building and shipping Manifest V3 Chrome extensions, which are browser add-ons made from separate background logic, webpage scripts, and user-interface pages.

In plain words
What is it for?
It helps build the extension structure, connect its background worker, webpage code, and popup, handle permissions, preserve state, and move older Manifest V2 extensions to V3.
Why use it?
It explains problems caused by these parts not sharing memory, including lost background state and broken messages. It also covers the rules and migration issues that affect Chrome Web Store approval.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit It helps build the extension structure, connect its background worker, webpage code, and popup, handle permissions, preserve state, and move older Manifest V2 extensions to V3.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ericrisco/rsc-harness/chrome-extension
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ericrisco/rsc-harness --skill chrome-extension
Clone the repo
git clone --depth 1 https://github.com/ericrisco/rsc-harness

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chrome-extension

README.md
[![agentmods](https://agentmods.dev/badge/skills/ericrisco/rsc-harness/chrome-extension/github.svg)](https://agentmods.dev/skills/ericrisco/rsc-harness/chrome-extension)
Your own site
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/chrome-extension"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/chrome-extension/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chrome-extension

Your own site · 80×15
<a href="https://agentmods.dev/skills/ericrisco/rsc-harness/chrome-extension"><img src="https://agentmods.dev/badge/skills/ericrisco/rsc-harness/chrome-extension.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,699 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.02699
Opus 5 $0.00038 $0.01350
Sonnet 5 $0.00015 $0.00540
Haiku 4.5 $0.00008 $0.00270

Measured 9d ago against content hash 9b83c8236571, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

chrome-extension scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/chrome-extension/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Chrome extension (Manifest V3)

An MV3 extension is three isolated JavaScript contexts that never share memory and only talk via messages:

  1. Service worker (background.service_worker) — the logic and lifecycle brain. Ephemeral: Chrome kills it when idle and restarts it on the next event. It has no DOM and no window.
  2. Content scripts — run inside a web page, can read/write that page's DOM, live in an isolated JS world by default. No access to most chrome.* APIs except messaging and storage.
  3. UI surfaces — popup (action.default_popup), options page, side panel. Normal web pages that load and unload as the user opens/closes them.

Internalize that picture first. Most extension bugs are someone treating one of these as if it shared state with another. They do not. The wire between them is chrome.runtime messaging and chrome.storage.

Manifest V3 is the only version the Chrome Web Store accepts; MV2 phase-out began June 2024 and is still rolling out. Build MV3 from the start.

Pick a skeleton

Setup Pick when Cost
Vanilla (raw files, load unpacked) tiny extension, no npm imports, you want the fastest possible reload loop no TS, no HMR, manual reloads
Vite + CRXJS (@crxjs/vite-plugin) TS, npm imports, React/Vue popup, you want HMR a build step; you ship dist/, not the repo

Default to Vite + CRXJS the moment you want TypeScript or a framework popup — it does the manifest wiring and HMR for you. Reach for vanilla only for a one-file experiment.

Minimal tree (Vite + CRXJS):

my-ext/
  manifest.json        # source of truth; CRXJS reads it
  src/
    background.ts       # service worker
    content.ts          # content script
    popup/
      index.html
      popup.tsx
  public/icons/         # 16, 48, 128 px PNGs
  vite.config.ts
  # build output -> dist/  (this is what you zip)

manifest.json — minimum viable shape

{
  "manifest_version": 3,
  "name": "Highlighter",
  "version": "1.0.0",
  "description": "Highlights selected text on the current page.",
  "icons": { "16": "icons/16.png", "48": "icons/48.png", "128": "icons/128.png" },
  "action": { "default_popup": "popup/index.html" },
  "background": { "service_worker": "background.js", "type": "module" },
  "permissions": ["activeTab", "storage", "scripting"],
  "host_permissions": [],
  "minimum_chrome_version": "120"
}

Read the full file on GitHub · 170 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 170 lines · 76 tokens per session scan A 9b83c8236571

Subscribe to this mod's changes

chrome-extension is a skill published in the GitHub repository ericrisco/rsc-harness (74 stars, last pushed yesterday), licensed MIT. It adds 76 tokens to every session and 2,699 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

browser-extension-patterns

Build browser extensions with Manifest V3 for Chrome, Firefox, and cross-browser compatibility. Covers content scripts, background workers, popup UI, storage APIs, and extension messaging. Triggers on browser extension development, Manifest V3, or Chrome extension requests.

organvm-iv-taxis/a-i--skills · 55 tokens

extension-dev

Detect Chrome extension framework/stack, find proper docs, implement features, and debug across service worker, content script, and popup contexts.

quangpl/browser-extension-skills · 30 tokens

extension-create

Auto-scaffold Chrome extensions with WXT or Plasmo. Ask user for name/features, scaffold, configure entrypoints. Use when: create extension, scaffold, new extension.

quangpl/browser-extension-skills · 39 tokens

web-verify

Look at your OWN front-end change before claiming it works -- navigate the loopback URL of a dev server or pod you started, screenshot the surface you changed, read the image to judge it, and embed it in chat. Three capture backends: playwright-cli (the session the dashboard Browser panel shows), the agent-browser CLI…

kirodotdev/KiroCrew · 0 tokens

url-to-code

Recreate an authorized live website or app URL as a faithful, runnable, frontend-only local implementation.

XiaomiMiMo/MiMo-Code · 24 tokens

moai-platform-chrome-extension

Chrome Extension Manifest V3 development specialist covering service workers, content scripts, message passing, chrome. APIs, side panel, declarativeNetRequest, and Chrome Web Store publishing. Use when building browser extensions.

modu-ai/moai-adk · 48 tokens