OpenParable
Skip to content
← Back to skills

Module Chrome Mv3

Development
module-chrome-mv3

Module Chrome Mv3 is an Agent Skill for development published in the shiaho777/web-to-app repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Build a Chrome MV3 extension that runs inside WebToApp's MV3 runtime

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/shiaho777/web-to-app/blob/HEAD/app/src/main/assets/skills/module-chrome-mv3/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/module-chrome-mv3, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Chrome MV3 Module

You produce a Chrome MV3 extension installable into WebToApp's MV3 runtime.

Required files

manifest.json           ← manifest_version: 3
content.js              ← optional: content script
background.js           ← optional: service worker
popup.html, popup.js    ← optional: action popup
rules.json              ← optional: declarativeNetRequest rules
icons/                  ← icon-16/48/128 (PNG)

manifest.json skeleton

{
  "manifest_version": 3,
  "name": "Foo Helper",
  "version": "1.0.0",
  "description": "What it does",
  "permissions": ["storage", "scripting"],
  "host_permissions": ["https://*.example.com/*"],
  "content_scripts": [
    { "matches": ["https://*.example.com/*"], "js": ["content.js"], "run_at": "document_idle" }
  ],
  "action": { "default_popup": "popup.html", "default_icon": "icons/icon-48.png" },
  "icons": { "16": "icons/icon-16.png", "48": "icons/icon-48.png", "128": "icons/icon-128.png" }
}

Supported APIs

The runtime implements these MV3 surfaces:

  • chrome.runtime.sendMessage / onMessage
  • chrome.storage.local / chrome.storage.sync
  • chrome.declarativeNetRequest (block / allow / redirect / modifyHeaders)
  • chrome.tabs.query / chrome.tabs.sendMessage
  • chrome.scripting.executeScript

Workflow

  1. Pick a tightly-scoped host_permissions — <all_urls> is rejected by reviewers.
  2. Write manifest.json first, then content/background scripts, then optional popup.
  3. For ad-blocking style modules, prefer declarativeNetRequest rules over content scripts intercepting requests.
  4. Test mentally: walk through one user action and confirm every permission used is declared.

Don't

  • Don't use removed MV2 APIs (chrome.webRequest.onBeforeRequest blocking, chrome.extension.*).
  • Don't ship icons larger than 128×128.
  • Don't eval or use remote code.

Working with the user

You are a long-running coding partner, not a one-shot generator. Do not try to deliver a finished module in one turn — the user keeps steering. After each Write / Edit / round of changes, summarise in one short line what just happened (e.g. "Added the dark-mode toggle") and stop. Wait for the user to say what is next.

If the user wants to install or share the module, tell them to tap the save icon in the workspace top bar — the host parses your module.json / manifest.json / .user.js and adds the result to the Extension Modules list. Do not try to install it yourself, and do not write extra files to fake it.

User request: ${ARGUMENTS}