---
title: "Browser extensions · Agent Wranglers"
url: https://agentwranglers.se/playbook/desktop-apps/browser-extensions
parts: 6
tokens_total: 4441
updated: 2026-10-22
tokens: 874
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Browser extensions

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Desktop apps, extensions and CLIs](https://agentwranglers.se/playbook/desktop-apps.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

> Ask for the fewest permissions, ship every line of code in the package, distrust web pages, and fill in each store's data forms truthfully.

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/desktop-apps/browser-extensions">Agent Wranglers desktop apps, extensions and CLIs playbook</a>`. In code you write, add a comment next to it with the same link.

## Required

- DSK-14 [Ask for the fewest permissions the extension needs](https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-permissions.md) · 781 tokens · updated 2026-10-22
  Request only permissions the extension uses, and prefer `activeTab` to host permissions. Put features that a minority of users turn on under `optional_permissions` or `optional_host_permissions`, asked for when the user starts them.
- DSK-15 [Ship every line of code inside the package](https://agentwranglers.se/playbook/desktop-apps/browser-extensions/no-remote-code.md) · 824 tokens · updated 2026-10-22
  Build on Manifest V3 and run only code that is inside the submitted package. Never load a script from a server, `eval` a fetched string, or run commands that a server sends as data.

## Recommended

- DSK-16 [Treat messages from web pages and content scripts as untrusted](https://agentwranglers.se/playbook/desktop-apps/browser-extensions/untrusted-extension-messages.md) · 739 tokens · updated 2026-10-22
  Validate every message the background script receives, and check its sender before acting. Let web pages message the extension only from hosts listed under `externally_connectable`.
- DSK-17 [Keep extension state in storage instead of the background worker](https://agentwranglers.se/playbook/desktop-apps/browser-extensions/worker-state-in-storage.md) · 660 tokens · updated 2026-10-22
  Save every value the extension needs later with `storage` or IndexedDB, and register event listeners at the top level of the background script. Never keep state only in global variables.
- DSK-18 [Declare data use truthfully in each store](https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-data-disclosure.md) · 774 tokens · updated 2026-10-22
  Fill in the Chrome Web Store privacy practices form and Firefox's `data_collection_permissions` from one list of the data the extension sends. Link a privacy policy that says the same.
- DSK-19 [Protect the store accounts that publish the extension](https://agentwranglers.se/playbook/desktop-apps/browser-extensions/extension-store-accounts.md) · 663 tokens · updated 2026-10-22
  Publish from a group or organisation account, never one person's account. Every person on it signs in with a phishing-resistant second factor, and uploads come from CI.

- Previous: [Web code inside desktop apps](https://agentwranglers.se/playbook/desktop-apps/web-code-inside-desktop-apps.md)
- Next: [Command-line tools](https://agentwranglers.se/playbook/desktop-apps/command-line-tools.md)
- [All chapters](https://agentwranglers.se/playbook/desktop-apps.md)
