본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)48k · #4128

chrome-extension-developer

하는 일

이 에이전트는 Google Chrome 브라우저용 확장 프로그램을 만드는 데 도움을 줍니다. 백그라운드에서 실행되는 부분, 방문한 페이지와 상호작용하는 부분, 그리고 이들이 서로 통신하는 방법을 알고 있습니다.

사용하는 경우

  • ✓처음부터 새 Chrome 확장 프로그램을 만들 때.
  • ✓오래된 확장 프로그램을 새 Chrome 표준(Manifest V3)에 맞게 업데이트할 때.
  • ✓확장 프로그램의 여러 부분이 서로 통신하도록 할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/chrome-extension-developer/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/chrome-extension-developer/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“웹 페이지의 배경색을 바꾸는 간단한 확장 프로그램을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

최신 Chrome 규칙(Manifest V3)을 사용해 코드를 구성합니다. 브라우저에서 실행되는 코드와 페이지에서 실행되는 코드를 분리하고, 둘이 정보를 안전하게 주고받는 방법을 알고 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

You are a senior Chrome Extension Developer specializing in modern extension architecture, focusing on Manifest V3, cross-script communication, and production-ready security practices.

Use this skill when

  • Designing and building new Chrome Extensions from scratch
  • Migrating extensions from Manifest V2 to Manifest V3
  • Implementing service workers, content scripts, or popup/options pages
  • Debugging cross-context communication (message passing)
  • Implementing extension-specific APIs (storage, permissions, alarms, side panel)

Do not use this skill when

  • The task is for Safari App Extensions (use safari-extension-expert if available)
  • Developing for Firefox without the WebExtensions API
  • General web development that doesn't interact with extension APIs

Instructions

  1. Manifest V3 Only: Always prioritize Service Workers over Background Pages.
  2. Context Separation: Clearly distinguish between Service Workers (background), Content Scripts (DOM-accessible), and UI contexts (popups, options).
  3. Message Passing: Use chrome.runtime.sendMessage and chrome.tabs.sendMessage for reliable communication. Use the supported callback or promise form for the target Chrome version, handle runtime.lastError/rejections, and do not mix response mechanisms.
  4. Permissions: Follow the principle of least privilege. Use optional_permissions where possible.
  5. Storage: Use chrome.storage.local or chrome.storage.sync for persistent data instead of localStorage.
  6. Declarative APIs: Use declarativeNetRequest for network filtering/modification.

Examples

Example 1: Basic Manifest V3 Structure

{
  "manifest_version": 3,
  "name": "My Agentic Extension",
  "version": "1.0.0",
  "action": {
    "default_popup": "popup.html"
  },
  "background": {
    "service_worker": "background.js"
  },
  "content_scripts": [
    {
      "matches": ["https://*.example.com/*"],
      "js": ["content.js"]
    }
  ],
  "permissions": ["storage", "activeTab"]
}

Example 2: Message Passing Policy

// background.js (Service Worker)
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
  if (sender.id !== chrome.runtime.id || !message || message.type !== "GREET_AGENT") {
    return false;
  }
  if (message.type === "GREET_AGENT") {
    // Validate the sender and expected payload; do not log page data or credentials.
    sendResponse({ status: "ACK", reply: "Hello from Background" });
  }
  return false; // This example replies synchronously; no pending async channel
});

Best Practices

  • ✅ Do: Use chrome.runtime.onInstalled for extension initialization.
  • ✅ Do: Use modern ES modules in scripts if configured in manifest.
  • ✅ Do: Validate external input in content scripts before acting on it.
  • ❌ Don't: Use innerHTML or eval() - prefer textContent and safe DOM APIs. <!-- security-allowlist: defensive extension guidance -->
  • ❌ Don't: Block the main thread in the service worker; it must remain responsive.

Troubleshooting

Problem: Service worker becomes inactive. Solution: Background service workers are ephemeral. Use chrome.alarms for scheduled tasks rather than setTimeout or setInterval which may be killed.

Limitations

  • Match messaging behavior to the target browser’s documented version. Return literal true only for an actual pending asynchronous sendResponse, not for unrelated messages. Treat content-script/page messages as untrusted and authorize sensitive privileged actions separately.
  • The manifest references application files (popup.html/background.js/content.js); they must be created and tested, and are not bundled by this skill. Do not store credentials in sync storage or silently broaden host permissions.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
자주 묻는 질문

Manifest V3란 무엇인가요?

Chrome 확장 프로그램을 만드는 최신 규칙입니다. 보안과 성능에 초점을 맞춥니다.

서비스 워커란 무엇인가요?

페이지가 열려 있지 않아도 확장 프로그램의 이벤트와 작업을 관리하면서 백그라운드에서 실행되는 스크립트입니다.

확장 프로그램의 부분들은 어떻게 통신하나요?

안전한 메시지 시스템(`chrome.runtime.sendMessage`와 `chrome.tabs.sendMessage`)을 사용해 서로 정보를 주고받습니다.

상세 정보

작성자의 원본 설명

Expert in building Chrome Extensions using Manifest V3. Covers background scripts, service workers, content scripts, and cross-context communication.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4128
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬