@extension.dev/skill 1.2.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/.claude-plugin/marketplace.json +23 -9
  2. package/CHANGELOG.md +305 -0
  3. package/README.md +51 -32
  4. package/package.json +8 -6
  5. package/skills/{extension-dev → browser-extension}/SKILL.md +135 -73
  6. package/skills/browser-extension/references/api-gotchas.md +213 -0
  7. package/skills/{extension-dev → browser-extension}/references/cross-browser.md +84 -23
  8. package/skills/{extension-dev → browser-extension}/references/debugging.md +60 -4
  9. package/skills/{extension-dev → browser-extension}/references/migrating-from-frameworks.md +1 -1
  10. package/skills/{extension-dev → browser-extension}/references/migrating.md +11 -4
  11. package/skills/{extension-dev → browser-extension}/references/project-structure.md +25 -3
  12. package/skills/{extension-dev → browser-extension}/references/publishing.md +101 -15
  13. package/skills/browser-extension/references/store-md.md +418 -0
  14. package/skills/{extension-dev → browser-extension}/references/surface-content.md +6 -0
  15. package/skills/{extension-dev → browser-extension}/references/surface-options.md +4 -0
  16. package/.claude-plugin/plugin.json +0 -24
  17. package/skills/extension-dev/references/api-gotchas.md +0 -107
  18. package/skills/extension-dev/references/store-md.md +0 -137
  19. /package/skills/{extension-dev → browser-extension}/references/surface-devtools.md +0 -0
  20. /package/skills/{extension-dev → browser-extension}/references/surface-newtab.md +0 -0
  21. /package/skills/{extension-dev → browser-extension}/references/surface-popup.md +0 -0
  22. /package/skills/{extension-dev → browser-extension}/references/surface-sidepanel.md +0 -0
  23. /package/skills/{extension-dev → browser-extension}/references/templates.md +0 -0
@@ -0,0 +1,418 @@
1
+ # STORE.md: One Store Metadata File for Every Store
2
+
3
+ `STORE.md` is a single tracked file at the project root that holds everything
4
+ the stores will ask for at submission time: listing copy, permission
5
+ justifications, privacy disclosures, version history, and per-store notes.
6
+ Cross-browser extensions submit to several stores; this file is the one place
7
+ where that paperwork lives, so resubmissions never reinvent it.
8
+
9
+ It has a second job: a store submission through extension.dev reads it
10
+ automatically and attaches the fields the store APIs accept. Everything else
11
+ stays a copy-paste reference for the dashboard forms.
12
+
13
+ **Every data-use and privacy answer is the owner's.** Each one is a
14
+ declaration the owner certifies to the store, and a wrong one is a policy
15
+ strike on the owner's account. So never write Firefox's
16
+ `data_collection_permissions` into the manifest (not even `"none"`, and not
17
+ because the build warns that AMO requires it), an answer under
18
+ `## Privacy and data use`, or a PRIVACY.md. Say what is missing, quote the
19
+ code facts (permissions, network call sites, storage use) and ask. The
20
+ rows are listed under The listing draft, below.
21
+
22
+ ## When to create it
23
+
24
+ The starter already exists at project creation: every template ships a
25
+ `STORE.md` with each store's rows as unfilled lines, and a project made with
26
+ `extension_project_create` carries one. Fill it from the first commit on,
27
+ and create it the moment publishing intent appears when a project has none:
28
+
29
+ - The user says they want to publish or "get ready for the store".
30
+ - A new extension is clearly headed for a store.
31
+ - The user asks about listing requirements or review.
32
+
33
+ Do not wait for the submission itself. The file earns its keep by being
34
+ maintained while the code changes, not written in a scramble at the end.
35
+ Two values are decided once and never change on the store, so write them at
36
+ creation: `browser_specific_settings.gecko.id` in the manifest (Firefox
37
+ assigns one on the first upload when absent, and the next build without it
38
+ reads as a new add-on) and the Safari bundle id in `extension.config.js`
39
+ (`browser.safari.bundleId`, permanent once an app record uses it).
40
+
41
+ You write the Firefox ID yourself when the manifest has none, as a
42
+ provisional `<project-name>@<domain>` (cross-browser.md), and record it
43
+ under `## Firefox Add-ons` as provisional until the owner confirms it.
44
+
45
+ The owner's data declaration is a different matter and is never yours to
46
+ write (the rule above).
47
+
48
+ ## Structure
49
+
50
+ One `##` section per store, shared material above them. Store sections are
51
+ matched by heading text, so `## Firefox Add-ons`, `## firefox-amo`, and
52
+ `## AMO` all work; the same goes for Chrome and Edge.
53
+
54
+ ```markdown
55
+ # Store metadata
56
+
57
+ Last updated: 2026-07-20
58
+
59
+ ## Listing
60
+
61
+ Name, one-line summary, long description, category, screenshot list.
62
+ Write user benefits, not implementation. "Highlights matching results
63
+ on the page", never "Uses MutationObserver".
64
+
65
+ ## Privacy and data use
66
+
67
+ The owner's answers only: what is collected, stored, or transmitted, and
68
+ the privacy policy URL. Until the owner answers, leave each row as
69
+ "TODO (owner)" with the code facts beside it. The answers must match what
70
+ the code actually does AND the manifest's Firefox
71
+ data_collection_permissions declaration, which is also the owner's to
72
+ write (see cross-browser.md).
73
+
74
+ ## Chrome Web Store
75
+
76
+ - Visibility: unlisted
77
+
78
+ ### Permissions justification
79
+
80
+ - tabs: reads the current tab URL to show per-site settings.
81
+ - storage: persists user preferences locally.
82
+ - Host access to example.com (a content script on that site only): reads
83
+ the page title to show it in the popup.
84
+
85
+ ### Single purpose
86
+
87
+ One sentence stating the extension's single purpose.
88
+
89
+ ## Firefox Add-ons
90
+
91
+ - Add-on ID: my-extension@example.com (provisional until the owner confirms it)
92
+
93
+ ### Reviewer notes
94
+
95
+ Test credentials and the steps a reviewer needs to exercise the
96
+ extension. Include build-from-source instructions when the zip is
97
+ minified (it is; AMO requires the sources zip).
98
+
99
+ ### Release notes
100
+
101
+ User-facing notes for this version.
102
+
103
+ ## Edge Add-ons
104
+
105
+ ### Certification notes
106
+
107
+ Anything the certification team needs to test the extension.
108
+
109
+ ## Version history
110
+
111
+ - 1.2.0 (2026-07-20): added per-site settings. Submitted to all three.
112
+ - 1.1.0 (2026-07-01): rejected on AMO for a vague tabs justification;
113
+ fixed by naming the exact data read.
114
+ ```
115
+
116
+ ## What the listing reader takes
117
+
118
+ `extension_submit` `sync-listing` and the preflight advisory read the
119
+ `## Listing` section as `- Key: value` bullets (keys are case-insensitive;
120
+ aliases in parentheses). A trailing parenthetical note is kept out of the
121
+ value, so `- Category: Privacy & Security (Chrome Web Store)` reads as
122
+ `Privacy & Security`. A value that starts with `TODO` counts as absent.
123
+ Screenshots and the icon are never read from this file: the icon comes from
124
+ the build the store receives, and screenshots reach the per-store listing
125
+ record only through the Screenshots door below. A `- Screenshots:` line is
126
+ reported as skipped and read for no file.
127
+
128
+ | Line | Stores | Limit and shape |
129
+ | --- | --- | --- |
130
+ | `- Name:` (`Title`) | all | 100 characters |
131
+ | `- Summary:` (`Short description`) | all | 250 characters |
132
+ | `- Description:` (`Long description`, `Full description`) | all | indented paragraphs below the bullet; 16,000 characters |
133
+ | `- Category:` (`Categories`) | all | one name for every store, or `<name> (Chrome), <name> (Firefox)` per store; up to 5 |
134
+ | `- License:` (under `## Firefox Add-ons`) | Firefox | 100 characters; asked only when a version goes to the listed audience |
135
+ | `- Support email:` | all | an email address |
136
+ | `- Homepage:` (`Website`, `Homepage URL`) | all | an http or https URL |
137
+ | `- Search terms:` (`Keywords`, `Tags`) | Edge, Safari | comma list, up to 16; 100 characters joined on the App Store |
138
+ | `- Visibility:` (under `## Chrome Web Store`) | Chrome | public, unlisted or private (trusted testers); unlisted when absent |
139
+
140
+ Under `## Privacy and data use`: `- Privacy policy URL:` (every store). A
141
+ line that is present but unreadable (a category naming only two stores, a
142
+ support email that is not an address, a value over its limit) makes the
143
+ preflight name the exact shape it takes instead of saying "not in STORE.md".
144
+
145
+ ## The bring list
146
+
147
+ Every store demands the inputs below before a review goes through. The
148
+ platform derives what the extension already contains (icon sizes, emulator
149
+ captures, the source archive, the package scan) and authors nothing;
150
+ everything else the owner brings. `extension_submit_check` `preflight`
151
+ answers the list per store, free and without writing anything:
152
+
153
+ - `value.stores.<store>.requirements`: the store's own rows, each with
154
+ `status` have, missing or unknown, the store's size, count or character
155
+ limit in `format`, its documentation link in `docs`, and the STORE.md
156
+ line, file, store setting or dashboard tab that satisfies it.
157
+ - `value.stores.<store>.bringList`: the same rows with `supply` "from your
158
+ build" or "you supply", `clearedBy` naming the exact door that clears the
159
+ row, `decideOnce` on the rows a store never lets you change, and
160
+ `neverPrefilled` on every privacy or data answer; `say` is the paragraph
161
+ to read to the person.
162
+ - `value.stores.<store>.readyForReview`: true only when no required row is
163
+ missing.
164
+
165
+ Read the bring list to the person at project creation and before the first
166
+ review send, in the store's own numbers. The draft upload never waits on
167
+ it: Chrome and Edge drafts do not enter review, a Firefox unlisted upload
168
+ is signed without a listing, and a Safari upload stops at App Store Connect
169
+ before App Review. Only Send to review is refused on a missing required row.
170
+
171
+ **Privacy answers are never prefilled.** Chrome's data use certification and
172
+ remote code answer, Firefox's `data_collection_permissions`, Edge's personal
173
+ information and mature content answers, Apple's App Privacy labels: the
174
+ preflight says the row is empty and where it is answered, and never proposes
175
+ a value. A derived "none" pasted into a store is a policy strike against the
176
+ owner's account. Owner-written or absent.
177
+
178
+ **Decide-once rows.** `firefox.add_on_id` (`browser_specific_settings.gecko.id`),
179
+ `safari.bundle_identifiers`, the App Store name, the Chrome item, the Edge
180
+ product and the app record are created once by hand where the store demands
181
+ it and recorded once in store settings; the bring list marks them
182
+ `decideOnce`.
183
+
184
+ The Firefox row is the one you fill before the owner asks: when the
185
+ manifest has no ID you write a provisional one (cross-browser.md), and the
186
+ `- Add-on ID:` line under `## Firefox Add-ons` keeps the words "provisional
187
+ until the owner confirms it" until they do. The store reads the ID from the
188
+ manifest, never from that line. Drop the note once the owner confirms the
189
+ ID or the first Firefox submission has locked it.
190
+
191
+ ### The Screenshots door
192
+
193
+ Images are not text, so they never live in `STORE.md`. One 1280x800 24-bit
194
+ PNG satisfies every store's screenshot row at once:
195
+
196
+ 1. `extension_screenshot` with `forStore: "chrome"` (or firefox, edge,
197
+ safari) on an open surface or page in a live session captures at that
198
+ store's accepted size (1280x800 unless `width` and `height` name another
199
+ the store takes) at a 1x pixel ratio, flattens the alpha channel on this
200
+ machine, and answers `value.forStore.clears` with the reason when the
201
+ file does not clear the row. Pass `path: "store/screenshots/popup.png"`
202
+ to keep the file tracked.
203
+ 2. `extension_submit` `sync-listing` with `screenshots: [<paths>]` writes
204
+ the files to the store's listing record on extension.dev beside the
205
+ STORE.md text, behind the same owner approval as the text; the answer's
206
+ `value.stores.<store>.images` names the rows the images clear and the
207
+ image rows that remain, read back from the platform.
208
+
209
+ The Safari push uploads the record's screenshots to App Store Connect;
210
+ Chrome's go into `pasteInDashboard` (Google's API takes no listing); AMO and
211
+ Partner Center take them on their own sites. The console's "Add screenshots"
212
+ verb writes the same record.
213
+
214
+ ### Send to review refused
215
+
216
+ When the platform refuses a review send with `409 LISTING_INCOMPLETE`, before
217
+ any approval is minted or spent, the store tool answers
218
+ `listing-incomplete` with `value.missing` (the rows in the store's words),
219
+ `value.bringList`, the store's console page in `value.trackUrl` and
220
+ `nextStep` `screenshot` or `sync-listing`. Say exactly that: nothing was
221
+ sent to review, no approval was spent and no submission was recorded. Never
222
+ tell the person the submission is on its way.
223
+
224
+ ## The listing draft
225
+
226
+ `extension_submit_check` `preflight` with `projectPath` set to the project
227
+ root also answers `value.readiness.listingDraft`, read from the code on this
228
+ machine. Without `projectPath` there is no draft. It writes nothing; it hands
229
+ the agent the file to save, the lines to write and the rows to put to the
230
+ owner:
231
+
232
+ - `exists`: whether the project already has a `STORE.md`.
233
+ - `storeMd`: present only when the project has no `STORE.md`. A file to save
234
+ as it is at the project root, holding the manifest's own name and summary
235
+ (`_locales` messages resolved) under `## Listing` and nothing else.
236
+ - `fromCode`: the lines read from the manifest, each with `line`, `section`,
237
+ `stores`, `value` and `from` (the file and key it came from). When
238
+ `STORE.md` exists, add these lines under `## Listing` yourself.
239
+ - `agentWrites`: the fields the agent writes itself: `- Description:`,
240
+ an App Store name only when the manifest name is over 30 characters, the
241
+ subtitle, `- Search terms:`, the single purpose, the permission
242
+ justifications, reviewer notes, certification notes and release notes.
243
+ Each carries its `line`, the `section` it goes under, the `stores` that
244
+ read it, `limit` (the parser's own limit) and `facts`, the code facts to
245
+ write it from (the manifest description, the surfaces it declares, the
246
+ content script matches, the permissions to justify one bullet each, the
247
+ package version and whether a CHANGELOG.md exists). Write each line inside
248
+ its limit from those facts. A field two stores read from one section, such
249
+ as the single purpose Chrome and Edge both read under `## Chrome Web
250
+ Store`, is listed once.
251
+ - `ownerAnswers`: the data-use and privacy rows still open, each with `id`,
252
+ `asks` (where the store asks it) and `codeFacts` only, never an answer
253
+ field. The ids are `chrome.data_usage`, `chrome.remote_code`,
254
+ `edge.privacy_policy_requirements`, `edge.data_usage`, `edge.remote_code`,
255
+ `firefox.data_collection_permissions`, `safari.app_privacy`,
256
+ `safari.age_rating` and `safari.content_rights`. The code facts are the
257
+ manifest's permissions, host permissions and content script matches, the
258
+ network call sites (`fetch`, `XMLHttpRequest`, `WebSocket`, `sendBeacon`,
259
+ `EventSource`) and remote-code sites (`eval`, `new Function`, a remote
260
+ script) with file and line, the hosts the source's URLs name, the Firefox
261
+ declaration as the manifest writes it, and which folders were read (what
262
+ the build ships: `src/` with `pages/`, `scripts/` and `public/`, or the
263
+ root; never tests, `dist` or `node_modules`). For the age rating and
264
+ content rights the code facts say nothing in the code answers them.
265
+ - `gallery`: one entry per store, below.
266
+ - `say`: the paragraph to follow. Nothing reaches a store until
267
+ `sync-listing`.
268
+
269
+ A line `STORE.md` already carries is never drafted again, so a complete file
270
+ gets no `fromCode` or `agentWrites` for it.
271
+
272
+ **The owner answers every `ownerAnswers` row.** Cezar's ruling of
273
+ 2026-11-01 (option A): Chrome's data usage and remote code answers, Edge's
274
+ privacy page, the Firefox data collection declaration, App Store App
275
+ Privacy, the age rating and content rights are declarations the owner
276
+ certifies to the store. Show the owner each row's `asks` with its
277
+ `codeFacts`, quoted as they are (for example "the manifest asks for no
278
+ permissions" or "the source has 1 network call site: src/background.js:3
279
+ (fetch)"), and wait for the owner's own words. Never draft, propose or
280
+ preselect an answer for these rows, never write a `## Privacy and data use`
281
+ answer or a Firefox `data_collection_permissions` declaration the owner did
282
+ not state, and never write a PRIVACY.md. A row the owner has answered is no
283
+ longer listed.
284
+
285
+ ### The gallery
286
+
287
+ `listingDraft.gallery` judges each store's screenshot folder before the
288
+ person looks. Per store it answers `store`, `folder`
289
+ (`store/screenshots/<store>`), `takes` (the count and sizes the store
290
+ accepts), `shots` and `ready`, with a `say` line:
291
+
292
+ - Every PNG in the folder is measured from its own header: `shots[]` holds
293
+ `file`, `size`, `clears` and, when it does not clear, `reason` (a size the
294
+ store does not take, or an alpha channel the store refuses).
295
+ - `ready` is true only when the folder holds between the store's minimum and
296
+ maximum and every file clears: Chrome 1 to 5 at 1280x800 or 640x400 with
297
+ no alpha; Edge 1 to 6 at 1280x800 or 640x480; Firefox 0 to 10 at 1280x800,
298
+ so an empty Firefox folder reads ready; the App Store 1 to 10 at 1280x800,
299
+ 1440x900, 2560x1600 or 2880x1800 with no alpha.
300
+ - An empty folder's `say` names the capture call that fills it at the
301
+ store's size: `extension_screenshot store:"<store>"` on a live dev session
302
+ (a Chromium session, or a Safari one for the App Store), one call per
303
+ view. A refused file's `say` names the retake with the same call.
304
+ - When `ready`, `say` asks you to show the screenshots to the person for
305
+ approval. The gallery is an answer, not a page.
306
+
307
+ ## What each store asks for
308
+
309
+ The console's submission page and store card render the same rows as "What
310
+ <store> asks for". Required inputs first; the console, the store's dashboard
311
+ or a store setting take the ones no STORE.md line can; screenshots go
312
+ through the Screenshots door.
313
+
314
+ | Store | Required | Optional |
315
+ | --- | --- | --- |
316
+ | Chrome Web Store | Connected developer account and the item created once on the dashboard (console); `- Name:` (up to 75 characters); `- Summary:` (up to 132); `- Description:` (up to 16,000); `- Category:`; store icon (128x128 px PNG, from the manifest icons); screenshots (1 to 5, 1280x800 or 640x400 px, JPEG or 24-bit PNG, no alpha; the Screenshots door); `### Single purpose`; `### Permissions justification` (one reason per permission and per host, content script matches included); data usage disclosures and the remote code answer (dashboard Privacy tab); language (dashboard Store listing tab); `- Visibility:` (dashboard Distribution tab; a new item starts Public) | `- Privacy policy URL:` (required when the extension handles user data); `- Homepage:`; small promo tile 440x280 px, marquee promo tile 1400x560 px and a YouTube URL (dashboard); test instructions (dashboard Test instructions tab) |
317
+ | Firefox Add-ons | AMO JWT issuer and secret (console); `browser_specific_settings.gecko.id` in the manifest (decide once); distribution channel (store setting; unset reads as unlisted); `data_collection_permissions` in the manifest (never prefilled); source code archive for a bundled build (store setting) with the build steps in `### Reviewer notes`; `### Reviewer notes`; `- Name:` (up to 50); `- Summary:` (up to 250); `- Description:`; `- Category:` (1 to 2); `- Support email:`; add-on icon (128x128 px or larger, from the manifest icons) | `- License:` (only for a listed version, which AMO refuses without one); screenshots (1280x800 px reads best; the Screenshots door); `- Homepage:`; `- Privacy policy URL:` (required when the add-on collects or transmits user data); `### Release notes` |
318
+ | Edge Add-ons | Publish API client id and key and the product created once by hand (console); `- Name:` (up to 45, from the manifest); `- Summary:` (up to 250); `- Description:` (up to 10,000); `- Category:`; store logo 300x300 px PNG (Partner Center, resized on this machine from the largest manifest icon); screenshots (up to 10, 640x480 or 1280x800 px; at least 1 here; the Screenshots door); `- Support email:`; privacy policy requirements and mature content (Partner Center) | `- Privacy policy URL:` (mandatory when the extension handles personal information); `- Homepage:`; `- Search terms:` (up to 7); `### Certification notes`; small 440x280 px and large 1400x560 px promotional tiles and a YouTube URL (Partner Center) |
319
+ | App Store (Safari) | App Store Connect API key with the App Manager role (console); two bundle identifiers, `<bundle id>` and `<bundle id>.extension` (store setting; decide once); two distribution certificates and two provisioning profiles (console: Mint signing assets); the app record created once on the App Store Connect website (name, primary language, bundle ID, SKU); `- Name:` (up to 30); `- Description:` (up to 4,000); `- Category:` (error 90242 without it); support URL (the project's feedback URL); `- Privacy policy URL:` (every app); screenshots (1 to 10 macOS screenshots at exactly 1280x800, 1440x900, 2560x1600 or 2880x1800 px, RGB with no alpha channel, showing the extension running in Safari; the Screenshots door); app icon (1024x1024 px, stamped from the largest manifest icon); age rating (none by default, `### Age rating` bullets override); content rights (listing push); `- Review contact name|email|phone:` and `### Reviewer notes` under `## Safari`; App Privacy answers (App Store Connect only); price and availability (listing push) | `- Summary:` as the subtitle (up to 30); `- Search terms:` as keywords (up to 100 characters); `- Homepage:` as the marketing URL; `### Release notes` as What's New |
320
+
321
+ ## What gets submitted automatically
322
+
323
+ At submission time these fields are read from the file and sent with the
324
+ submission; explicit flags or config values win over the file:
325
+
326
+ | Store section | `###` field | Sent as |
327
+ | --- | --- | --- |
328
+ | Firefox | Reviewer notes | AMO `approval_notes` |
329
+ | Firefox | Release notes | AMO `release_notes` |
330
+ | Edge | Certification notes | Edge submission `notes` |
331
+
332
+ The Chrome Web Store accepts no listing metadata over its API, so the whole
333
+ Chrome section is dashboard-only. Its shape mirrors the `CHROMEWEBSTORE.md`
334
+ convention other agent tooling expects, so an agent looking for that file's
335
+ sections finds them here.
336
+
337
+ Keep one file. When a project already has a `CHROMEWEBSTORE.md`, or another
338
+ skill in the session asks for one, carry its listing copy, permission
339
+ justifications, single purpose and version history into `STORE.md` (the
340
+ shared sections and `## Chrome Web Store`) and maintain them there: the
341
+ submission, the preflight and the listing draft read `STORE.md` and never
342
+ the other file, so copy left in it reaches no store. Its privacy section
343
+ does not carry over as written; those rows stay the owner's (see The
344
+ listing draft). If the person wants to keep `CHROMEWEBSTORE.md`, leave it a
345
+ copy of the Chrome section and keep it out of the zip.
346
+
347
+ What that means in practice:
348
+
349
+ - `sync-listing` for Chrome records the listing on extension.dev and sends
350
+ nothing to Google. It answers `listing-recorded` with
351
+ `value.stores.chrome.pasteInDashboard`: each field with its dashboard tab
352
+ (Store listing, Privacy, Distribution, Test instructions) and the
353
+ `STORE.md` line to paste from, or the listing record for the screenshots.
354
+ The owner pastes them in the item's dashboard.
355
+ - The preflight reads every dashboard-only Chrome field as `unknown`, with
356
+ its tab and the item's dashboard address, never as `have`. Google's API
357
+ answers the item's review state, nothing on the listing.
358
+ - `- Visibility:` is the audience the project intends: `public`,
359
+ `unlisted` or `private` (trusted testers). Without the line the intent
360
+ is `unlisted`, the least public option. A new item starts **Public** on
361
+ the Distribution tab, so the preflight warns until Chrome itself confirms
362
+ the intent. Set Visibility there before the first review.
363
+ - Every host the production Chrome package reaches, content script
364
+ `matches` included, needs a bullet under `### Permissions justification`
365
+ that names the host. The preflight names each uncovered pattern from the
366
+ built package, and flags a `localhost` or `127.0.0.1` match in a
367
+ production build as a review risk: keep development-only matches out of
368
+ the production manifest.
369
+
370
+ Two facts about where the file is read from, both of which have bitten people:
371
+
372
+ - **The submission reads `STORE.md` from the project's source repository at
373
+ the built commit**, not from the working directory. An uncommitted or
374
+ unpushed edit does not travel with the submission. Commit and push the
375
+ file, then rebuild, then submit.
376
+ - **`extension_submit` checks the local copy and warns**, and the warning is
377
+ worth acting on. Its parser is a pinned port of the one the real submission
378
+ runs, held to the original by a test that replays both implementations over
379
+ the same corpus, so "no Firefox reviewer notes" here means no Firefox
380
+ reviewer notes there. Section headings are matched the same way in both:
381
+ `## Firefox Add-ons`, `## firefox-amo` and `## AMO` all resolve to Firefox,
382
+ and the `###` field heading is matched by prefix.
383
+
384
+ ## Maintenance rules
385
+
386
+ Update `STORE.md` in the same change that makes it stale:
387
+
388
+ - **Manifest changed** (`permissions`, `host_permissions`,
389
+ `content_scripts`): revisit every justification. Each permission and
390
+ each host gets a specific, plain-English reason; "needed for the
391
+ extension to work" fails review on every store.
392
+ - **The manifest grants `'wasm-unsafe-eval'`**: the listing should be able
393
+ to explain it like a permission. Add one bullet under
394
+ `### Permissions justification` that names what the WebAssembly module
395
+ does and says the binary ships inside the package (shape:
396
+ "`'wasm-unsafe-eval'` (content security policy): compiles the bundled
397
+ SQLite module that stores snippets locally; no code is fetched at run
398
+ time."), and say the same in the Firefox `### Reviewer notes`, naming the
399
+ package the binary comes from. Chrome's remote code answer stays the
400
+ owner's: quote where the binary is loaded from as the code fact.
401
+ - **User-facing behavior changed**: refresh the listing copy and bump the
402
+ last-updated date.
403
+ - **New release**: add a version history entry and rewrite the release
404
+ notes section for the new version.
405
+ - **Data handling changed**: quote the new code facts to the owner and ask
406
+ for a fresh privacy section, policy and Firefox
407
+ `data_collection_permissions` declaration before submitting; the three
408
+ must agree, and only the owner writes them (see The listing draft).
409
+ - **Store rejection**: record the reason and the fix in version history, so
410
+ the next submission does not repeat it.
411
+
412
+ ## Hygiene
413
+
414
+ - Track the file in git; it is part of the project, not a scratch note.
415
+ - Exclude it from the extension zip (the `--zip` flag already packages only
416
+ `dist/<browser>/`, so the default build is safe).
417
+ - Never put real user credentials in it; reviewer test accounts are
418
+ throwaway by construction.
@@ -48,6 +48,12 @@ print "Restart the dev server" and stop.
48
48
  `chrome.storage` (declare the `storage` permission) or the worker, never
49
49
  through a module variable.
50
50
  - The worker may be asleep; a message wakes it, its caches are gone.
51
+ - A content script runs as a classic script even though the engine bundles
52
+ its imports, so a top-level `await` fails the build with "Top-level-await
53
+ is only supported in ECMAScript Modules". Put the start-up reads (a
54
+ `chrome.storage` get, a message to the worker) inside an `async` function
55
+ and call it: `async function init() { ... } init();`. A script an
56
+ extension page loads with `type="module"` may `await` at its top level.
51
57
 
52
58
  ## What proves it works
53
59
 
@@ -32,6 +32,10 @@ management page; `true` opens it as a full tab. Firefox honours the same key.
32
32
  never by re-reading on a timer.
33
33
  - `chrome.runtime.openOptionsPage()` works from the worker and from
34
34
  extension pages, not from a content script.
35
+ - The page's own script may `await` a storage read at its top level when
36
+ the HTML loads it with `type="module"`. The content script that reads the
37
+ same setting may not: wrap its read in an `async` function (see
38
+ [surface-content.md](surface-content.md)).
35
39
 
36
40
  ## What proves it works
37
41
 
@@ -1,24 +0,0 @@
1
- {
2
- "name": "extension-dev",
3
- "description": "Cross-browser extension development skill: Manifest V3 gotchas, chromium:/firefox: manifest prefixes, live-browser verification playbooks, and store publishing checklists for the extension.dev / Extension.js stack.",
4
- "version": "1.2.2",
5
- "author": {
6
- "name": "Cezar Augusto",
7
- "email": "hello@extension.dev",
8
- "url": "https://cezaraugusto.com"
9
- },
10
- "homepage": "https://github.com/extensiondev/skill",
11
- "repository": "https://github.com/extensiondev/skill",
12
- "license": "Apache-2.0",
13
- "keywords": [
14
- "agent-skill",
15
- "browser-extension",
16
- "chrome-extension",
17
- "firefox-addon",
18
- "edge-extension",
19
- "safari-web-extension",
20
- "manifest-v3",
21
- "webextension",
22
- "cross-browser"
23
- ]
24
- }
@@ -1,107 +0,0 @@
1
- # Runtime API Gotchas
2
-
3
- The WebExtension APIs fail silently in specific, repeatable ways. This file
4
- collects the ones that cost the most debugging time, with the reason behind
5
- each so the fix generalizes.
6
-
7
- ## Service worker lifecycle (Chromium MV3)
8
-
9
- The background service worker is killed after roughly 30 seconds of
10
- inactivity and restarted on the next event. Consequences:
11
-
12
- - Module-level variables are wiped between events. Persist every piece of
13
- state to `chrome.storage.local` (or `session`) and re-read it on wake.
14
- - Register all event listeners synchronously at the top level of the worker.
15
- A listener registered inside an async callback may not exist when the
16
- worker restarts, so the event is dropped.
17
- - Long-lived connections (WebSocket, ports) die with the worker. Use alarms
18
- (`chrome.alarms`) to re-establish, or an offscreen document when a DOM or
19
- long-lived context is genuinely required.
20
- - Firefox MV2 background scripts are persistent, which can mask these bugs
21
- during cross-browser testing. Test state loss on Chromium specifically.
22
- - `ReferenceError: browser is not defined` in a **production** Chrome build
23
- (but not in dev) means the build ran without the polyfill: it defaults on
24
- for `dev`/`start` but off for `build`. Rebuild with
25
- `npm run build -- --polyfill` or switch the code to `chrome.*`.
26
-
27
- ## Storage
28
-
29
- - `chrome.storage.local` is the default for persistent data and works
30
- cross-browser (Firefox supports the `chrome.*` namespace natively).
31
- - `chrome.storage.session` survives worker restarts but not browser restarts;
32
- good for ephemeral, session-scoped state you would not persist to disk.
33
- - `chrome.storage.sync` has small quotas and per-minute write limits; never
34
- put high-frequency writes there.
35
- - Storage APIs are async. Reading "right after" a write in another context is
36
- a race; listen to `chrome.storage.onChanged` instead.
37
-
38
- ## Permissions and gestures
39
-
40
- - `activeTab` is granted only by a genuine user gesture: toolbar click,
41
- context menu item, keyboard command, or omnibox entry. A button inside a
42
- side panel or popup page is not a gesture for this purpose, and programmatic
43
- event replay never is. If a flow needs host access without a gesture,
44
- request explicit host permissions instead.
45
- - `tab.url`, `tab.title`, and `tab.favIconUrl` are silently `undefined`
46
- without the `tabs` permission (or an applicable host permission). No error
47
- fires; the data is just missing.
48
- - `scripting.executeScript` needs `scripting` plus host access for the target
49
- origin (or an active `activeTab` grant).
50
-
51
- ## Action, windows, tabs
52
-
53
- - `chrome.action` is undefined unless the manifest has an `"action"` key,
54
- even an empty `{}`.
55
- - `chrome.windows` has no `query()` method. Use `getAll()`, `getCurrent()`,
56
- or `getLastFocused()`. (`chrome.tabs.query()` exists; the asymmetry trips
57
- people up.)
58
- - `chrome.tabs.query({ active: true, currentWindow: true })` returns an array;
59
- destructure the first element and handle the empty case (DevTools windows,
60
- for instance).
61
-
62
- ## Messaging
63
-
64
- - Use `async`/`await` end to end. In an `onMessage` listener, return `true`
65
- only if you really will call `sendResponse` later; returning `true` and
66
- never responding leaves the sender hanging.
67
- - A rejected promise or thrown error inside a listener surfaces on the sender
68
- as "message port closed before a response was received". Wrap handlers in
69
- try/catch and always respond.
70
- - Content script to background messaging works when the worker is asleep (the
71
- message wakes it), but the worker's in-memory caches are gone; see the
72
- lifecycle section.
73
-
74
- ## Content scripts
75
-
76
- - Batch DOM updates with `requestAnimationFrame`. Synchronous loops that
77
- mutate the DOM wedge the host page's main thread, and on heavy pages that
78
- shows up as the page freezing, which gets blamed on the site, not the
79
- extension.
80
- - Mark injected roots (`data-extension-root` or similar) so probes and
81
- debugging tools can verify injection deterministically.
82
- - CSS injected by content scripts leaks both ways. Scope aggressively or use
83
- Shadow DOM for nontrivial UI.
84
-
85
- ## UI surfaces
86
-
87
- - Side panel (Chromium): requires `sidePanel` permission and an explicit open
88
- trigger. See the cross-browser reference for the working pattern.
89
- - DevTools pages: panel URLs are resolved relative to the extension root, not
90
- the devtools HTML file's directory.
91
- - Offscreen documents (Chromium): only `chrome.runtime` messaging plus
92
- standard Web APIs are available. No `chrome.tabs`, `chrome.downloads`,
93
- `chrome.action`, etc. Route privileged calls through the worker.
94
- - Notifications: `iconUrl` must point at a bundled file or a data URL built at
95
- runtime. A typo'd path fails silently on some platforms.
96
-
97
- ## Code execution and CSP
98
-
99
- - MV3 forbids remote code and `eval()` in extension pages, and the
100
- extension-pages CSP (`script-src 'self'`) also blocks `blob:` script URLs
101
- and inline scripts. `srcdoc` iframes inherit the embedding page's CSP, so
102
- they are not an escape hatch either. The supported path for dynamic code
103
- is a sandboxed page (`"sandbox"` manifest key), which may use `eval()`;
104
- embed it as an iframe and message results across the boundary.
105
- - User-visible feedback matters for background actions: after a context menu
106
- click or command, confirm with a badge, notification, or toast. Silent
107
- success is indistinguishable from silent failure, for users and for tests.