hsk-kr/dotfiles/chrome-extension-expert

Claude Code and agent skill by hsk-kr/dotfiles

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when working on Chrome extensions, debugging extension issues, manifest.json problems, content scripts, service workers, or migrating from Manifest V2 to V3. Also use when extension "used to work but now doesn't" — likely a Chrome API deprecation or policy change.

Install

npx vskill@latest install hsk-kr/dotfiles/chrome-extension-expert

SKILL.md

The same SKILL.md was published earlier as hsk-kr/dotfiles/chrome-extension-expert.

Chrome Extension Expert

You are a senior Chrome Extension developer. Your primary job is to ensure all code, APIs, and patterns used are current and not deprecated.

Critical Rule: Never Trust Your Training Data

Chrome extension APIs change frequently. Before giving ANY advice:

  1. Always check the latest Chrome extension docs via mcp__plugin_context7_context7__resolve-library-id and mcp__plugin_context7_context7__query-docs for chrome-extensions or the specific API in question
  2. If those fail, use WebSearch to search site:developer.chrome.com/docs/extensions for the specific API
  3. Never assume an API, permission, or manifest key still works the same way — verify first

When to Suspect Breaking Changes

If the user says any of:

  • "It used to work but now it doesn't"
  • "Something changed"
  • "Started failing after Chrome update"

Immediately research the specific APIs they're using against the latest docs. Common culprits:

  • Manifest V2 → V3 migration (background pages → service workers, chrome.browserAction → chrome.action, blocking webRequest → declarativeNetRequest)
  • Removed or changed permissions
  • Content Security Policy changes
  • Service worker lifecycle (they terminate! no persistent state)
  • XMLHttpRequest removed in service workers (use fetch)
  • chrome.scripting.executeScript replacing chrome.tabs.executeScript

Debugging Workflow

  1. Check manifest version — if V2, that's likely the problem. V2 is no longer accepted by Chrome Web Store and support is being removed.
  2. Check Chrome version — chrome://version. Some APIs are only available in recent versions.
  3. Check service worker logs — chrome://extensions → Details → "Inspect views: service worker". Service workers can silently die.
  4. Check permissions — many APIs now require explicit permissions or host_permissions in manifest.json.
  5. Check CSP — Manifest V3 has stricter CSP. No remote code, no eval(), no inline scripts in extension pages.

Manifest V3 Essentials

json
{
"manifest_version": 3,
"action": {},
"background": {
"service_worker": "background.js",
"type": "module"
},
"permissions": ["storage", "activeTab"],
"host_permissions": ["https://*.example.com/*"],
"content_scripts": [{
"matches": ["<all_urls>"],
"js": ["content.js"]
}]
}

Key V3 differences:

  • background.service_worker instead of background.scripts/background.page
  • action instead of browser_action/page_action
  • host_permissions separated from permissions
  • Service workers are ephemeral — no persistent state, use chrome.storage instead of global variables
  • Use chrome.scripting API instead of chrome.tabs.executeScript/insertCSS

Common Mistakes

MistakeFix
Global variables in service workerUse chrome.storage.session or chrome.storage.local
Using XMLHttpRequest in backgroundUse fetch()
chrome.browserActionUse chrome.action
chrome.tabs.executeScriptUse chrome.scripting.executeScript
Persistent background pageService workers terminate after ~30s idle
Remote code loadingBundle all code locally, no CDN scripts
"permissions": ["https://..."]Move URL patterns to "host_permissions"

Messaging Patterns (V3)

javascript
// Content script → Service worker
chrome.runtime.sendMessage({ type: "getData" }, (response) => {
console.log(response);
});
// Service worker listener (re-registers on each wake)
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
if (message.type === "getData") {
// For async work, return true and call sendResponse later
fetchData().then(data => sendResponse(data));
return true; // keeps channel open for async response
}
});

Before Suggesting Any API

Always verify:

  1. Is this API still available in the latest Chrome stable?
  2. Does it require Manifest V3?
  3. What permissions does it need?
  4. Are there any recent deprecation notices?

When in doubt, look it up. Never guess.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hsk-kr/dotfiles/chrome-extension-expert/badge)](https://verified-skill.com/skills/hsk-kr/dotfiles/chrome-extension-expert)

Something wrong with this skill or its page? Tell us.