Skip to content
Back to skills

Chrome Extensions

ASecurity

Build Manifest V3 Chrome extensions securely: service workers, minimal permissions, messaging and storage

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsrustsecurity

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill chrome-extensions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Chrome Extensions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Chrome Extensions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-chrome-extensions-anvil/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-chrome-extensions-anvil)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: chrome-extensions
description: "Build Manifest V3 Chrome extensions securely: service workers, minimal permissions, messaging and storage"
---

<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->

# Chrome extensions (Manifest V3)

Use when building or updating browser extension manifests, background service workers, or content scripts.

## Manifest and least privilege
- Use `"manifest_version": 3`. Prefer `"activeTab"` + `"scripting"` triggered on user action over broad `<all_urls>` host permissions.
- Keep `"content_security_policy"` strict; never bundle remote scripts (`eval`, external JS URLs) or unpinned third-party libraries.

## Ephemeral service workers
- Background service workers terminate after idle timeouts. Never store session state in top-level JS variables; persist via `chrome.storage.local`, `chrome.storage.session`, or schedule work with `chrome.alarms`.
- Register all Chrome event listeners (`onInstalled`, `onMessage`, `onAlarm`) synchronously at top level so wakeup events never miss handlers.

## Messaging and content scripts
- Content scripts run alongside untrusted page DOM. Never trust `window.postMessage` events from pages without validating origin/format, and never pass sensitive tokens into page scripts.
- Validate `sender.id === chrome.runtime.id` and sender origin inside `chrome.runtime.onMessage` handlers; escape or use `textContent` before DOM updates.

## Verify
Validate `manifest.json`, test extension reload across worker termination/wakeup, check permissions warning in `chrome://extensions`, and run automated unit tests on message handlers.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.