$ recombobulate _
home / tips / generate-a-browser-extension-boilerplate-with-claude
0

Generate a Browser Extension Boilerplate with Claude

bagwaa @bagwaa · Mar 26, 2026 · Workflows
generate-a-browser-extension-boilerplate-with-claude

Building a browser extension means juggling manifests, content scripts, background workers, and messaging between contexts. Claude scaffolds the entire structure so you can focus on the actual feature.

Create a Chrome extension (Manifest V3) that adds a floating
button to every page. When clicked, it opens a side panel showing
a summary of the page content. Include a popup with settings,
a background service worker, and proper TypeScript types for the
Chrome API. Use Vite for bundling.

Claude generates a complete project with the right file structure:

my-extension/
├── manifest.json
├── src/
│   ├── background/service-worker.ts
│   ├── content/inject.ts
│   ├── popup/popup.html
│   ├── popup/popup.ts
│   └── sidepanel/panel.ts
├── vite.config.ts
└── package.json

The manifest gets all the right permissions and content script patterns:

{
  "manifest_version": 3,
  "permissions": ["sidePanel", "activeTab", "storage"],
  "content_scripts": [{
    "matches": ["<all_urls>"],
    "js": ["src/content/inject.ts"]
  }]
}

Claude handles the message passing between content script and background worker, storage sync for settings, and even generates the Vite config with the CRXJS plugin for hot reloading during development.

For Firefox compatibility, just ask:

Make this extension cross-browser compatible with Firefox using
the webextension-polyfill library.

Skip the boilerplate maze — Claude knows the Manifest V3 quirks so you can ship your extension faster.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 2 hours ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 2 hours ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago