Index of every page on this site: llms.txt
All skills
aktsmm avatar

/chrome-extension-dev

@9bedf91
by yamapanaktsmm/agent-skills27 stars
5
Run it yourself

Chrome/ブラウザ拡張機能開発の包括的ガイド。WXTフレームワーク、Manifest V3、Chrome API、テスト手法、ストア公開(CWS API v2 での提出自動化を含む)をカバー。Use when: ブラウザ拡張機能を作成・修正・公開する時。Triggers on 'ブラウザ拡張機能', 'Chrome拡張', 'browser extension', 'WXT', 'content script', 'service worker', 'side panel', 'Chrome Web Store 公開', 'CWS 提出'.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/chrome-extension-dev

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈120 tokens for metadata: the name and description. ≈1.2k when used: this file. ≈13k more on demand in 6 files.

Description uses 3.7% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈298 characters, or 3.7%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Chrome Extension Dev

ブラウザ拡張機能開発の包括的ガイド。

When to Use

  • ブラウザ拡張機能を作りたい、Chrome拡張、browser extension
  • WXT フレームワークでの開発
  • Content Script / Service Worker の実装
  • Chrome API(tabs, storage, cookies等)の使用
  • Manifest V3 への対応・移行
  • Chrome Web Store への公開・更新提出(API v2 でコマンド化する場合を含む)

推奨技術スタック(2025/2026)

カテゴリ 推奨
フレームワーク WXT (Vite ベース)
フロントエンド React 18+ / Vue 3 / Svelte
言語 TypeScript
スタイリング Tailwind CSS
UIコンポーネント shadcn/ui / Mantine
状態管理 Zustand / Jotai
テスト Vitest (ユニット) + Playwright (E2E)

WXT クイックスタート

# 新規プロジェクト作成(対話式)
npx wxt@latest init

# テンプレート指定(vanilla / vue / react / svelte / solid、全て TypeScript)
npx wxt@latest init my-extension -t react

# 開発コマンド
npm run dev    # HMR付き開発サーバー
npm run build  # プロダクションビルド
npm run zip    # ストア提出用パッケージ

プロジェクト構成

project/
├── entrypoints/           # 自動検出エントリポイント
│   ├── background.ts      # Service Worker
│   ├── content.ts         # Content Script
│   ├── popup/             # Popup UI
│   │   ├── index.html
│   │   └── main.tsx
│   └── options/           # Options Page
├── components/            # 自動インポートUIコンポーネント
├── utils/                 # 自動インポートユーティリティ
├── public/                # 静的アセット(icon等)
├── wxt.config.ts          # WXT設定
└── package.json

主要 Chrome API

API 用途 権限
chrome.tabs タブ操作 tabs / activeTab
chrome.storage データ永続化 storage
chrome.runtime メッセージング なし
chrome.scripting スクリプト/CSS注入 scripting + host権限
chrome.cookies Cookie操作 cookies + host権限
chrome.offscreen DOM操作(SW内) offscreen

→ 詳細: references/chrome-api.md

Manifest V3 制限事項

制限 対処法
30秒タイムアウト chrome.alarms でウェイクアップ
DOMアクセス不可 chrome.offscreen を使用
永続化なし chrome.storage.session を使用
eval()禁止 事前にバンドル
リモートコード禁止 全コードをバンドル

→ 詳細: references/manifest-v3.md

権限変更時の注意

⚠️ 重要: permissions/host_permissions変更後は拡張機能の再読み込みでは不十分。 削除→再インストールが必要。

Key References

トピック リファレンス
Chrome API 詳細 references/chrome-api.md
Manifest V3 references/manifest-v3.md
テスト references/testing.md
公開 references/publishing.md
提出の自動化(CWS API v2) references/cws-api-v2.md
よくあるパターン references/patterns.md

Done Criteria

  • WXT プロジェクト構成が正しい
  • 必要な権限が wxt.config.ts に設定されている
  • Manifest V3 制限を考慮した実装
  • 開発モードで動作確認済み
  • ビルドエラーがない

External Resources

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning12d4 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    This skill provides a comprehensive developer guide for Chrome extension development using the WXT framework and Manifest V3. It includes technical documentation for APIs, testing, and automated publishing. The analysis found no malicious patterns, and the skill actively encourages security best practices such as least privilege and secret management.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

  • Runlayer9mo

    7/7 files flagged

Signed by skilld at 9bedf91. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated last month
argument-hint
作りたい拡張機能、困っている API、対象ファイル
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}

README badge

README badge for aktsmm/agent-skills/chrome-extension-dev