- Home
- Skills
- Shipshitdev
- Library
- Plasmo Extension Architect
plasmo-extension-architect_skill
- Python
5
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill shipshitdev/library --skill plasmo-extension-architect- plugin.json342 B
- SKILL.md989 B
Overview
This skill helps you architect Chrome MV3 extensions using the Plasmo framework, focusing on service workers, content scripts, and UI surfaces. It provides clear patterns for messaging, storage, injection, and security so your extension stays robust and maintainable. Designed for developers who want practical, production-ready structure and tradeoffs.
How this skill works
The skill inspects extension surface needs and suggests concrete file roles (service worker, content script, popup, options) and messaging patterns. It enforces stateless service workers with persisted data in storage, typed message payloads, and idempotent content script injection. It also aligns permissions and MV3 constraints with features to avoid runtime errors.
When to use it
- Starting a new Plasmo MV3 extension project
- Adding content scripts or cross-surface messaging
- Designing lightweight popup, options, or side-panel UIs
- Migrating background pages to MV3 service workers
- Auditing permissions and storage use for security
Best practices
- Keep service worker logic stateless; persist state in chrome.storage or IndexedDB
- Use explicit message types and typed payloads to avoid runtime mismatches
- Gate content script injection and make initialization idempotent
- Minimize host permissions and request optional permissions at runtime
- Keep UI components small and fast; sync preferences via storage rather than DOM
Example use cases
- Implement a background sync worker that persists work state in storage and communicates via typed messages
- Inject a content script only on matched pages and ensure it re-runs safely after navigation
- Build a compact popup UI that reads/writes preferences through storage sync and sends commands to the service worker
- Create an options page for advanced settings that validates and persists user choices securely
- Add a side panel that communicates with content scripts using a defined message protocol
FAQ
Split work into small units persisted in storage and schedule work using alarms or background events; avoid relying on continuous service worker runtime.
How should I validate messages between surfaces?
Use explicit message type fields and runtime checks for payload shape. Prefer TypeScript interfaces or runtime guards to reject unexpected data.