convert-web-pages-to-browser-extensions
既存のWebページを、ポップアップやサイドパネルなど様々な形式のブラウザ拡張機能として活用できるよう、HTMLエントリーページに変換し、手軽に拡張機能UIを構築するSkill。
📜 元の英語説明(参考)
Convert any frontend webpage into a browser extension entry page with an HTML entry. Supports popup, options, sidepanel, devtools, newtab, bookmarks override, history override, and custom entries. Use when the user asks to migrate or adapt an existing web page into extension UI.
🇯🇵 日本人クリエイター向け解説
既存のWebページを、ポップアップやサイドパネルなど様々な形式のブラウザ拡張機能として活用できるよう、HTMLエントリーページに変換し、手軽に拡張機能UIを構築するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o convert-web-pages-to-browser-extensions.zip https://jpskill.com/download/9567.zip && unzip -o convert-web-pages-to-browser-extensions.zip && rm convert-web-pages-to-browser-extensions.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9567.zip -OutFile "$d\convert-web-pages-to-browser-extensions.zip"; Expand-Archive "$d\convert-web-pages-to-browser-extensions.zip" -DestinationPath $d -Force; ri "$d\convert-web-pages-to-browser-extensions.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
convert-web-pages-to-browser-extensions.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
convert-web-pages-to-browser-extensionsフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Webページをブラウザ拡張機能に変換する
このスキルを使用すると、既存のフロントエンドページを、最小限の動作変更で拡張機能のエントリに変換できます。
どのような時に使うか
- ユーザーがWebページ/プロジェクトを拡張機能ページに変換したい場合
- ユーザーが
popup、options、sidepanel、devtools、またはnewtabでUIを再利用したい場合 - ユーザーがブックマーク/履歴/新しいタブなどのブラウザのオーバーライドページを求めている場合
- ユーザーが既存の
index.htmlを持っていて、それを拡張機能のエントリにしたい場合 - ユーザーが明示的なHTMLファイルを持つカスタム拡張機能のエントリを必要としている場合
範囲
このスキルは、エントリの変換と配線に焦点を当てています。
- 可能な限りUIの動作をそのまま維持します
- ページコードを拡張機能のエントリ構造に移動またはラップします
- ページのようなエントリに対してHTMLエントリが存在することを確認します
- 拡張機能の設定/マニフェストのマッピングを更新します
- 拡張機能のコンテキストにおけるビルドおよびランタイムの制約を検証します
必須の分類(最初に実行)
変換コードを記述する前に、ソースページを以下によって分類します。
- フロントエンドのランタイム
- ネイティブHTML + JS
- React / Vue / Svelte / Solid
- スタイルシステム
- プレーンCSS
- Tailwind CSS / UnoCSS
- Less / Sass
- サードパーティライブラリ
- ブラウザセーフなクライアントライブラリ(拡張機能のUI/ランタイムで実行可能)
- Node専用ライブラリ(NodeコアAPIまたはサーバーランタイムが必要)
この分類によって、Addfoxプラグインの配線、依存関係の配置、および実現可能性が決定されます。
高速なワークフロー
このチェックリストをコピーして、進捗状況を更新します。
変換の進捗状況
- [ ] ソースページの依存関係とランタイムの前提条件を特定する
- [ ] フレームワーク/スタイル/ライブラリの互換性を分類する
- [ ] ターゲットの拡張機能エントリタイプを選択する
- [ ] HTMLエントリとブートストラップスクリプトを作成/調整する
- [ ] Web専用APIを拡張機能セーフな同等のものに置き換える
- [ ] マニフェスト/設定エントリのマッピングを配線する
- [ ] 拡張機能のランタイムでビルドして検証する
エントリマッピングガイド
| ターゲット | 一般的なHTMLエントリ | 注 |
|---|---|---|
| popup | app/popup/index.html |
小さなビューポート、長時間ブロックするタスクは不可 |
| options | app/options/index.html |
完全な設定UI、永続的なコントロール |
| sidepanel | app/sidepanel/index.html |
ChromeサイドパネルのUX制約が適用される |
| devtools | app/devtools/index.html |
DevToolsコンテキストで実行、API制限が異なる |
| newtab | app/newtab/index.html |
新しいタブのオーバーライド配線が必要 |
| bookmarks override | app/bookmarks/index.html |
ブラウザ固有のオーバーライドサポート |
| history override | app/history/index.html |
ブラウザ固有のオーバーライドサポート |
| custom | app/<custom>/index.html |
設定/マニフェストで明示的なエントリマッピングを追加 |
変換ルール
- 最初にユーザーに見える動作を維持し、後でリファクタリングします。
- ページベースのエントリに対しては、HTMLエントリを明示的に保持します。
window.locationのオリジンとバックエンドのCookieに関する直接的な仮定を避けます。- サポートされていないAPI(
alertスタイルのAPIやブロックされたブラウザAPI)を、拡張機能互換の代替APIに置き換えます。 - 特権ロジックが必要な場合は、UIからバックグラウンド/コンテンツメッセージングに移動します。
- 権限を最小限に抑え、ホストの一致を明示的にします。
必要なAddfoxフレームワークの作業
ターゲットプロジェクトがAddfoxを使用している場合は、常に次のタスクを完了してください。
- エントリレイアウト
app/(予約済みまたはカスタムのエントリ名)の下にエントリファイルを作成またはマッピングします。- ページのようなエントリには、
index.htmlとブートストラップスクリプト(index.tsx/index.ts/index.js)があることを確認します。
addfox.configの配線- Addfoxが出力ファイルを解決できるように、
manifestとエントリのマッピングを設定します。 - フレームワークプラグインのリストをソーススタック(React/Vue/Preact/Svelte/Solidまたはバニラ)と一致させます。
- Addfoxが出力ファイルを解決できるように、
- マニフェストの調整
- エントリ関連のキー(
action、options_ui、side_panel、devtools_page、chrome_url_overridesなど)を追加します。 - ChromiumとFirefoxで異なる場合は、ブラウザ固有のセクションを明示的に保持します。
- エントリ関連のキー(
- コンテキストの適応
- 必要に応じて、特権操作をバックグラウンドに移動します。
- ページエントリとバックグラウンド/コンテンツコンテキスト間の明示的なメッセージングを追加します。
- ビルドとランタイムのチェック
- Addfoxの開発/ビルドフローを実行し、拡張機能のロードを検証します。
- アセット、ルーティング、および権限が実際の拡張機能コンテキストで動作することを検証します。
フレームワークとスタイルのマッピングルール
変換中にこれらのルールを使用します。
- ネイティブHTML + JS
- 最小限のAddfox設定を維持します。フレームワークプラグインは不要です。
- React
- ReactプラグインとReact/ReactDOMランタイムの依存関係を追加します。
- Vue
- VueプラグインとVueランタイムの依存関係を追加します。
- Svelte
- SvelteプラグインとSvelteランタイムの依存関係を追加します。
- Solid
- SolidプラグインとSolidランタイムの依存関係を追加します。
スタイルについて:
- Tailwind CSS / UnoCSS / Less / Sass
- 対応するビルドプラグイン/ツールと必要なスタイルの依存関係を追加します。
- エントリが拡張機能のエントリブートストラップパスでスタイルファイルをインポートすることを確認します。
サードパーティライブラリの互換性ルール
移行前に各サードパーティの依存関係を分類します。
- ブラウザ互換のクライアントライブラリ
- 必要に応じて、拡張機能のエントリ/バックグラウンド/コンテンツにバンドルできます。
- Node専用ライブラリ
- Node組み込み(たとえば
fs、net、tls、child_process)またはサーバー専用ランタイムに依存している場合、拡張機能のUIコンテキストで直接実行することはできません。 - 直接クライアントで使用するには互換性がないとマークし、代替設計(Web APIを使用したバックグラウンド、リモートサービス、またはライブラリの置き換え)に移動します。
- Node組み込み(たとえば
変換されたページエントリにNode専用の依存関係を黙って保持しないでください。
必要なチェック
- エントリが空白の画面なしでロードされる
- 静的アセットが拡張機能のURLで解決される
- ルーティングが拡張機能のベースパスで動作する
- インラインスクリプト/evalからのCSP違反がない
- メッセージングがUI/バックグラウンド/コンテンツの境界を越えて動作する
- マニフェストキーがターゲットのエントリタイプと一致する
一般的な修正パターン
- アセットパスの問題: ルート相対またはバンドラー管理のアセットインポートを使用する
- ルーターベースの問題: 拡張機能のオリジンに対してハッシュ/履歴ベースを設定する
- ストレージの移行: 必要に応じて、localStorageのみの前提から拡張機能のストレージに切り替える
- クロスオリジン呼び出し: 昇格された権限を必要とするネットワーク呼び出しをバックグラウンドに移動する
-
(原文はここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Convert Web Pages to Browser Extensions
Use this skill to transform an existing frontend page into an extension entry with minimal behavior changes.
When to Use
- User asks to convert a webpage/project into an extension page
- User wants one UI reused for
popup,options,sidepanel,devtools, ornewtab - User asks for browser override pages such as bookmarks/history/newtab
- User has an existing
index.htmland wants it to become an extension entry - User needs custom extension entries with explicit HTML files
Scope
This skill focuses on entry conversion and wiring:
- Keep UI behavior as-is where possible
- Move or wrap page code into extension entry structure
- Ensure an HTML entry exists for page-like entries
- Update extension config/manifest mappings
- Validate build and runtime constraints for extension contexts
Mandatory Classification (Do First)
Before writing conversion code, classify the source page by:
- Frontend runtime
- Native HTML + JS
- React / Vue / Svelte / Solid
- Style system
- Plain CSS
- Tailwind CSS / UnoCSS
- Less / Sass
- Third-party libraries
- Browser-safe client libraries (can run in extension UI/runtime)
- Node-only libraries (require Node core APIs or server runtime)
This classification determines Addfox plugin wiring, dependency placement, and feasibility.
Fast Workflow
Copy this checklist and update progress:
Conversion Progress
- [ ] Identify source page dependencies and runtime assumptions
- [ ] Classify framework/style/library compatibility
- [ ] Choose target extension entry type
- [ ] Create/adjust HTML entry and bootstrap script
- [ ] Replace web-only APIs with extension-safe equivalents
- [ ] Wire manifest/config entry mapping
- [ ] Build and verify in extension runtime
Entry Mapping Guide
| Target | Typical HTML entry | Notes |
|---|---|---|
| popup | app/popup/index.html |
Small viewport, no long blocking tasks |
| options | app/options/index.html |
Full settings UI, persistent controls |
| sidepanel | app/sidepanel/index.html |
Chrome side panel UX constraints apply |
| devtools | app/devtools/index.html |
Runs in DevTools context, API limits differ |
| newtab | app/newtab/index.html |
Needs new tab override wiring |
| bookmarks override | app/bookmarks/index.html |
Browser-specific override support |
| history override | app/history/index.html |
Browser-specific override support |
| custom | app/<custom>/index.html |
Add explicit entry mapping in config/manifest |
Conversion Rules
- Preserve user-visible behavior first, refactor later.
- Keep HTML entry explicit for page-based entries.
- Avoid direct assumptions about
window.locationorigin and backend cookies. - Replace unsupported APIs (
alert-style or blocked browser APIs) with extension-compatible alternatives. - Move privileged logic out of UI into background/content messaging when needed.
- Keep permissions minimal and host matches explicit.
Addfox Framework Required Work
When the target project uses Addfox, always complete these tasks:
- Entry layout
- Create or map entry files under
app/(reserved or custom entry names). - Ensure page-like entries have
index.htmlplus bootstrap script (index.tsx/index.ts/index.js).
- Create or map entry files under
addfox.configwiring- Configure
manifestand entry mapping so Addfox can resolve output files. - Keep framework plugin list aligned with source stack (React/Vue/Preact/Svelte/Solid or vanilla).
- Configure
- Manifest alignment
- Add entry-related keys (
action,options_ui,side_panel,devtools_page,chrome_url_overrides, etc.). - Keep browser-specific sections explicit when Chromium and Firefox differ.
- Add entry-related keys (
- Context adaptation
- Move privileged operations to background where required.
- Add explicit messaging between page entry and background/content contexts.
- Build and runtime checks
- Run Addfox dev/build flows and verify extension loading.
- Validate that assets, routing, and permissions work in real extension contexts.
Framework and Style Mapping Rules
Use these rules during conversion:
- Native HTML + JS
- Keep minimal Addfox config; no framework plugin needed.
- React
- Add React plugin and React/ReactDOM runtime dependencies.
- Vue
- Add Vue plugin and Vue runtime dependency.
- Svelte
- Add Svelte plugin and Svelte runtime dependency.
- Solid
- Add Solid plugin and Solid runtime dependency.
For styles:
- Tailwind CSS / UnoCSS / Less / Sass
- Add corresponding build plugin/tooling and required style dependencies.
- Ensure entry imports style files in the extension entry bootstrap path.
Third-Party Library Compatibility Rules
Classify each third-party dependency before migration:
- Browser-compatible client library
- Can be bundled into extension entry/background/content as needed.
- Node-only library
- If it relies on Node built-ins (for example
fs,net,tls,child_process) or server-only runtime, it is not directly runnable in extension UI contexts. - Mark as incompatible for direct client use and move to an alternative design (background with web APIs, remote service, or library replacement).
- If it relies on Node built-ins (for example
Do not silently keep Node-only dependencies in converted page entries.
Required Checks
- Entry loads without blank screen
- Static assets resolve under extension URL
- Routing works with extension base path
- No CSP violations from inline scripts/eval
- Messaging works across UI/background/content boundaries
- Manifest keys match target entry type
Common Fix Patterns
- Asset path issues: use root-relative or bundler-managed asset imports
- Router base issues: set hash/history base for extension origin
- Storage migration: switch from localStorage-only assumptions to extension storage as needed
- Cross-origin calls: move network calls requiring elevated permissions to background
- Context mismatch: gate code paths by runtime context (popup/options/devtools/etc.)
Output Expectations
When applying this skill, provide:
- Selected entry type and why
- File mapping (source page -> extension entry files)
- Manifest/config changes
- Any runtime/API substitutions
- Verification steps and known limitations
Additional Reference
- Detailed conversion playbook: reference.md
- Practical conversion samples: examples.md