skills/chrome-extension/SKILL.md
Expert knowledge in developing Chrome extensions covering all aspects from basic architecture to advanced features. Covers Manifest V3, service workers, content scripts, Chrome APIs, popup and options pages, security, performance, testing, debugging, and publishing. Use when developing Chrome extensions or migrating from Manifest V2 to V3. For HTML, CSS, and JavaScript best practices and modern web APIs, use the modern-web-dev skill.
npx skillsauth add arisng/github-copilot-fc chrome-extensionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill set provides expertise in developing Chrome extensions, covering all aspects from basic architecture to advanced features.
Modern Web Development Foundation: Chrome extensions are built using HTML, CSS, and JavaScript. For guidance on modern web APIs, browser features, and JavaScript best practices, see modern-web-dev. This skill focuses on Chrome extension-specific architecture, APIs, and patterns.
When building extension UI (popups, options pages, content scripts), see modern-web-dev for:
Chrome Extensions extend the functionality of the Chrome browser, allowing developers to customize the browsing experience, add new features, and integrate with web pages. This skill covers modern extension development using Manifest V3.
The manifest file defines the extension's structure, permissions, and resources.
Key Manifest V3 Features:
Required Fields:
{
"manifest_version": 3,
"name": "Extension Name",
"version": "1.0.0",
"description": "Extension description"
}
Background scripts that handle extension lifecycle and respond to browser events.
Common Uses:
Best Practices:
JavaScript that runs in the context of web pages.
Capabilities:
Limitations:
Injection Methods:
HTML pages that provide user interface.
Popup:
Options Page:
Implementation Note: When building these UI components, follow modern HTML/CSS/JavaScript practices from modern-web-dev. Use modern APIs like fetch(), async/await, and contemporary DOM manipulation techniques rather than legacy patterns.
Essential APIs:
chrome.runtime: Extension lifecycle and messagingchrome.storage: Store and retrieve datachrome.tabs: Interact with browser tabschrome.scripting: Execute scripts dynamicallychrome.action: Control extension icon and popupchrome.alarms: Schedule code to run periodicallychrome.declarativeNetRequest: Modify network requestschrome.cookies: Manage cookieschrome.webRequest: Observe and analyze traffic (MV2 legacy)Permissions Required:
Content Security Policy (CSP)
Permission Management
Input Validation
Data Security
Communication Security
Note: The examples below use modern JavaScript patterns (async/await, arrow functions, etc.). For comprehensive guidance on modern web APIs and JavaScript best practices, see modern-web-dev.
One-time messages:
// From content script to service worker
chrome.runtime.sendMessage({type: 'action', data: value});
// From service worker to content script
chrome.tabs.sendMessage(tabId, {type: 'action', data: value});
Long-lived connections:
// Create port connection
const port = chrome.runtime.connect({name: 'channel'});
port.postMessage({data: value});
port.onMessage.addListener((msg) => {});
// Save data
await chrome.storage.sync.set({key: value});
// Retrieve data
const result = await chrome.storage.sync.get(['key']);
// Listen for changes
chrome.storage.onChanged.addListener((changes, namespace) => {});
// Inject script into tab
await chrome.scripting.executeScript({
target: {tabId: tabId},
files: ['content.js']
});
// Inject CSS
await chrome.scripting.insertCSS({
target: {tabId: tabId},
files: ['styles.css']
});
Setup
Development
Testing
Debugging
Publishing
Minimize Permissions
Optimize Content Scripts
Efficient Service Workers
Bundle Size
Key Changes:
✅ Use Manifest V3 ✅ Request minimal permissions ✅ Implement proper error handling ✅ Validate all inputs ✅ Use chrome.storage for persistence ✅ Test across different scenarios ✅ Follow Chrome Web Store policies ✅ Provide clear privacy policy ✅ Keep extension updated ✅ Monitor user feedback ✅ See modern-web-dev for HTML/CSS/JavaScript best practices and modern browser APIs
devops
Programmatically create tldraw whiteboards and visualize them with a self-hosted tldraw instance. Create boards with shapes, text, and connectors, then deploy to a self-hosted server for collaborative editing and gallery management.
tools
Execute Google Cloud Platform operations using the gcloud CLI (and gsutil/bq where applicable). Use when the user wants to: authenticate with GCP, manage GCP resources, deploy applications, configure projects or IAM, view logs, run SQL/BigQuery, or interact with any GCP service from the command line. Triggers on phrases like "gcloud", "Google Cloud CLI", "deploy to GCP", "create a VM", "Cloud Run", "GKE cluster", "Cloud Storage bucket", "set GCP project", "service account", "Cloud Functions", "App Engine deploy", or any request to manage Google Cloud resources via command line.
testing
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
development
Session-scoped git commit orchestrator that commits only current-session changes and leaves unrelated dirty worktree edits untouched. Inherits git-atomic-commit for atomic grouping and commit message execution, and git-commit-scope-constitution for scope governance and validation. Use when asked to commit this session only or isolate commits from mixed worktree state.