▶ CARTRIDGE

Browser Extension Cartridge

A working Chrome Manifest V3 + TypeScript extension your AI agent can extend without breaking it.

$29 · one-time

Plus sales tax or VAT where applicable, calculated at checkout.

Need more than one kit? The All-Access Bundle gets all 6 paid cartridges (Rules Mega Pack, Game Prototype, Discord Bot, SaaS Starter, Browser Extension, MCP Server) for $79 one-time, instead of $184 bought separately.

A complete, small Chrome extension in Manifest V3 + TypeScript (strict) + Vite, set up for AI-assisted coding. The included extension, Page Notes, is a real tool: click the toolbar icon on any web page and write a private note for it (it saves as you type), clip selected text into the note from the popup or the right-click menu, and search, export or import every note from the options page. Notes stay on your computer. It shows every part of an MV3 extension working together: popup, background service worker, a content script injected only when you click, an options page, chrome.storage, a context menu, a keyboard shortcut and typed message passing. It asks for 4 permissions and no host permissions, so Chrome shows no install warning. 55 tests run in Node with no Chrome window and no keys, a dist checker catches what Chrome and Web Store review reject, and Cursor, Claude Code and AGENTS.md rules keep agents on Manifest V3. Plus setup, permissions and Web Store publishing guides. One-time purchase (sales tax or VAT added at checkout where applicable), instant download.

Requirements: Needs Node.js 22.12+ (24 LTS recommended) to build and Google Chrome 120+ to run it. Load it unpacked from chrome://extensions, no developer account needed. Publishing to the Chrome Web Store is optional and done from your own developer account. Tested in Chrome; Firefox isn't covered.

What's inside

FileCovers
src/background/MV3 service worker: listeners registered at the top level, state in chrome.storage, the right-click menu, and every message handler as plain, tested functions
src/content/Content script injected on demand (activeTab + scripting): reads the selection, shows a "Saved" message in a shadow DOM, built as one classic script
src/popup/ + src/options/Popup (the note for the current tab, autosave, clip selection) and options page (settings, all notes, search, JSON export/import, delete)
src/lib/Typed message protocol with validation, a chrome.storage wrapper (local + sync), URL normalization, the notes model
public/manifest.json + icons/Manifest V3 with 4 permissions (storage, activeTab, scripting, contextMenus), no host permissions, 16/32/48/128 icons
tests/55 vitest tests in Node, no Chrome window or keys: logic, messages, storage, the real service worker against a fake chrome, manifest and source checks
scripts/Two-step Vite build to dist/, a dist checker (MV3 keys, permissions, no eval or remote code, no imports in the content script), icon generator
.cursor/rules/*.mdc5 Cursor rules: extension workflow (always on), Manifest V3, messaging + storage, content scripts + UI, Chrome Web Store
CLAUDE.md + AGENTS.mdThe same rules for Claude Code, Codex, OpenCode and other agents
docs/SETUP.md (build, load unpacked, try it), PERMISSIONS.md (why each one), PUBLISHING.md (Web Store checklist), AGENT-PLAYBOOK.md (copy-paste prompts: tags, badge, side panel, highlights, sync)
README.md + LICENSE.mdQuick start, scripts, and the license: use it for any number of your own extensions, including ones you publish

Peek inside

.cursor/rules/10-manifest-v3.mdc · The first section of one of the 5 Cursor rules.

---
description: Manifest V3 rules (manifest keys, service worker lifecycle, CSP, permissions) from the Chrome extension docs
globs: public/manifest.json, src/background/**/*.ts, scripts/checks.mjs, vite*.config.ts
alwaysApply: false
---
# Manifest V3

Source: developer.chrome.com/docs/extensions (checked Nov 2026). Chrome 120+ (`minimum_chrome_version`).

## Manifest
- `"manifest_version": 3`. Toolbar button = `"action"` (`chrome.action`). `browser_action` / `page_action` are MV2.
- Background = `"background": { "service_worker": "background.js", "type": "module" }`. There are no background pages: no `background.scripts`, `background.page`, `"persistent"`, `chrome.extension.getBackgroundPage()`.
- `"type": "module"` is required because the built worker uses `import`. Static imports only: dynamic `import()` is not supported in extension service workers.
- Paths in the manifest are **built** paths in `dist/`. The worker must stay `background.js` (fixed name in `vite.config.ts`), the content script `content.js`.
- `content_security_policy` is an object: `{ "extension_pages": "...", "sandbox": "..." }`. `extension_pages` can't be looser than `script-src 'self' 'wasm-unsafe-eval'; object-src 'self'`: no `'unsafe-eval'`, no remote script hosts. Usually leave it out (the default is strict).
- `name` max 75 chars, `description` max 132 chars (plain text), `version` = 1-4 dot-separated integers (no `-beta`). Bump `version` in both manifest.json and package.json for every Web Store upload (a test checks they match).
- Icons: 16, 32, 48, 128 PNG. Web Store 128px icon = 96x96 artwork with 16 px transparent padding.
…

Stripe emails your receipt. Lost your download link? Email us with the receipt and we'll sort it out. Questions: support@agentcartridge.com