addfox-best-practices
Addfox Best Practices
Use this skill when working on Addfox extension architecture, configuration, and runtime integration.
When to use
Use this skill when you need to:
- Configure
addfox.config.ts(manifest,entry,plugins,rsbuild,appDir,outDir) - Design entry strategy for
background,content,popup,options, and custom entries - Decide permissions and host patterns for least-privilege access
- Target both Chromium and Firefox with browser-specific manifest sections
- Implement content UI and messaging between extension contexts
Quick references
| Topic | See |
|---|---|
| Entry setup | rules/entry.md |
| Chromium details | rules/chromium.md |
| Firefox details | rules/firefox.md |
| Manifest V3 | rules/mv3.md |
| Manifest V2 | rules/mv2.md |
| Manifest fields | rules/manifest-fields.md |
| Permissions | rules/permissions.md |
| Content UI | rules/content-ui.md |
| Messaging | rules/messaging.md |
Best-practice checklist
- Prefer file-based reserved entries first; use
entryonly when customization is required. - Keep manifest source paths clear and let Addfox resolve build output paths.
- Minimize permissions and host scope; avoid
<all_urls>unless absolutely necessary. - Keep background logic event-driven for MV3 service worker lifecycle.
- Use typed message contracts across contexts to reduce runtime mismatch.
Related docs
More from addfox/skills
addfox-debugging
Debug Addfox build and runtime issues, including terminal failures, manifest errors, extension loading issues, and context messaging problems.
18extension-functions-best-practices
Best practices for implementing browser extension features across 13 categories. Reference this skill when developing video, audio, image, translation, download, userscript, AI (including Chrome built-in AI / Gemini Nano), ad-blocker, theme, email, game, password manager, or Web3 wallet features.
18addfox-testing
Test Addfox extensions with Rstest for unit/component tests and Playwright for end-to-end extension loading.
17convert-web-pages-to-browser-extensions
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.
7migrate-to-addfox
Migrate existing browser extensions from WXT, Plasmo, Extension.js/CRXJS, or vanilla setups to Addfox with incremental validation.
5