@extension.dev/skill 1.0.0 → 1.0.2
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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/skills/extension-dev/SKILL.md +9 -10
- package/skills/extension-dev/references/cross-browser.md +7 -8
- package/skills/extension-dev/references/publishing.md +27 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "extension-dev",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "Build, debug, and publish cross-browser extensions (Chrome, Edge, Firefox, Safari, and any Chromium- or Gecko-based browser): Manifest V3 gotchas, chromium:/firefox: manifest prefixes, live-browser verification playbooks, and store publishing checklists.",
|
|
13
|
-
"version": "1.0.
|
|
13
|
+
"version": "1.0.2",
|
|
14
14
|
"category": "development",
|
|
15
15
|
"author": {
|
|
16
16
|
"name": "Cezar Augusto"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "extension-dev",
|
|
3
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.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cezar Augusto",
|
|
7
7
|
"email": "hello@extension.dev",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2
|
|
4
|
+
|
|
5
|
+
- Rule 6 and the cross-browser reference no longer say `chromium:world`
|
|
6
|
+
hard-fails the Chromium build. Measured with Extension.js 4.1.31, it
|
|
7
|
+
builds and gives the same Chromium output as the unprefixed `world`
|
|
8
|
+
key, and keeps Firefox on the isolated world. Unprefixed `world` stays
|
|
9
|
+
the default.
|
|
10
|
+
|
|
11
|
+
## 1.0.1
|
|
12
|
+
|
|
13
|
+
- `references/publishing.md` teaches the `projects` input on
|
|
14
|
+
`extension_project_create` and on `extension_auth` login: one approval for
|
|
15
|
+
several projects in one workspace, the exact-slug rule, the cap of 10
|
|
16
|
+
creates per approval (ten now, the next ten once the hourly limit
|
|
17
|
+
allows), the `creating` resume loop and how to read the per-project
|
|
18
|
+
rows. It needs `@extension.dev/mcp` 10.10.9 and a
|
|
19
|
+
platform that accepts a list.
|
|
20
|
+
|
|
3
21
|
## 1.0.0
|
|
4
22
|
|
|
5
23
|
The skill moves to Apache-2.0, and it finally covers the tools it was
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extension.dev/skill",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Agent Skill that teaches AI coding agents (Claude Code, Cursor, Copilot, Codex) to build, debug, and publish browser extensions for Chrome, Edge, Firefox, Safari, and every Chromium- or Gecko-based browser (Brave, Opera, Vivaldi, Yandex, Waterfox, LibreWolf): Manifest V3 gotchas, cross-browser manifest rules, and live-browser verification playbooks. Powered by extension.dev and Extension.js.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": {
|
|
@@ -4,7 +4,7 @@ description: Build, debug, and publish cross-browser extensions (Chrome, Edge, F
|
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
6
|
author: Cezar Augusto
|
|
7
|
-
version: 1.0.
|
|
7
|
+
version: 1.0.2
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Cross-Browser Extension Development
|
|
@@ -121,8 +121,7 @@ platform fails silently when you get it wrong.
|
|
|
121
121
|
`chromium:service_worker` (string) vs `firefox:scripts` (array). Unprefixed
|
|
122
122
|
fields apply everywhere; a matching prefixed key overrides the plain key,
|
|
123
123
|
and prefixes resolve at any nesting depth (so `firefox:world` works inside
|
|
124
|
-
a `content_scripts` entry)
|
|
125
|
-
`chromium:world` (see rule 6).
|
|
124
|
+
a `content_scripts` entry), `world` included (see rule 6).
|
|
126
125
|
4. **Side panels need an open trigger and the right permission.** Chromium
|
|
127
126
|
requires the `sidePanel` permission plus explicit open behavior
|
|
128
127
|
(`chrome.sidePanel.setPanelBehavior` or `open()` from a gesture). Firefox's
|
|
@@ -136,13 +135,13 @@ platform fails silently when you get it wrong.
|
|
|
136
135
|
`browser.*`, ship with `npm run build -- --polyfill`. Otherwise write
|
|
137
136
|
`chrome.*` (promise-based on MV3) and reserve `browser.*` for
|
|
138
137
|
Firefox-specific branches.
|
|
139
|
-
6. **Write `world: "MAIN"` unprefixed
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
`
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
6. **Write `world: "MAIN"` unprefixed by default.** The build inserts the
|
|
139
|
+
main-world bridge on every target, and Firefox keeps the key (understood
|
|
140
|
+
from Firefox 128+). When older Firefox must stay on the isolated world,
|
|
141
|
+
add `firefox:world: "ISOLATED"`, or write `chromium:world: "MAIN"`, which
|
|
142
|
+
leaves Firefox without a `world` key; both build, and the Chromium output
|
|
143
|
+
is the same. Branch in code if the feature truly needs main-world access
|
|
144
|
+
on Firefox.
|
|
146
145
|
7. **Service workers hold no state.** Chromium kills the worker after ~30s
|
|
147
146
|
idle. Module-level variables vanish; persist everything to
|
|
148
147
|
`chrome.storage.local` and re-read on wake. Register event listeners at the
|
|
@@ -24,8 +24,7 @@ These rules come from Extension.js's `filterKeysForThisBrowser` resolver
|
|
|
24
24
|
family-wide fields and keep `chrome:`/`edge:` for a true per-vendor value.
|
|
25
25
|
- Prefixes resolve at **any nesting depth**: inside `background`, inside a
|
|
26
26
|
`content_scripts` entry (`firefox:world`), anywhere an object key appears.
|
|
27
|
-
|
|
28
|
-
section below.
|
|
27
|
+
`world` follows the same rule; see the `world: "MAIN"` section below.
|
|
29
28
|
- Precedence is deterministic and independent of declaration order:
|
|
30
29
|
**plain key < family prefix < exact-browser prefix**. A non-matching
|
|
31
30
|
prefixed key is dropped and the plain key survives. So
|
|
@@ -136,12 +135,12 @@ gesture handler.)
|
|
|
136
135
|
|
|
137
136
|
## Content scripts with `world: "MAIN"`
|
|
138
137
|
|
|
139
|
-
Write the `world` key **unprefixed
|
|
140
|
-
companion bridge script
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
the
|
|
144
|
-
|
|
138
|
+
Write the `world` key **unprefixed** by default. Main-world content scripts
|
|
139
|
+
need a companion bridge script, and the build inserts it automatically. A
|
|
140
|
+
`chromium:world` key works too: measured with Extension.js 4.1.31, it builds,
|
|
141
|
+
the Chromium output is the same as the unprefixed key (the main-world script
|
|
142
|
+
plus its bridge), and the Firefox build gets the entry with no `world`, so it
|
|
143
|
+
runs in the isolated world.
|
|
145
144
|
|
|
146
145
|
The build strips `world` from the bridge entry it emits, and Firefox keeps
|
|
147
146
|
the unprefixed key verbatim (Firefox understands manifest `world` from 128
|
|
@@ -171,6 +171,33 @@ before `extension_project_create`: it is two-phase like login (a code and a
|
|
|
171
171
|
URL a signed-in GitHub user approves, then a second call with the returned
|
|
172
172
|
`deviceCode`), and whoever approves the code owns the workspace.
|
|
173
173
|
|
|
174
|
+
Several projects in one workspace cost one approval, not two each. Both
|
|
175
|
+
tools take `projects` in place of `project`:
|
|
176
|
+
|
|
177
|
+
- `extension_project_create` with `projects: [{ project, repo }, ...]`
|
|
178
|
+
creates up to 10 projects and stores each one's 7-day token as that
|
|
179
|
+
project's login, so no `extension_auth` call follows. Ten per approval
|
|
180
|
+
is the platform's cap, because it creates at most 10 projects per hour
|
|
181
|
+
for one approving account: plan a longer set as ten now and the next ten
|
|
182
|
+
in a new call once that hourly limit allows. Build inputs given at the
|
|
183
|
+
top level are the default; an entry may override them.
|
|
184
|
+
- `extension_auth` with `action: "login"` and `projects: ["<workspace>/<project>", ...]`
|
|
185
|
+
signs in to up to 20 existing projects, and is how logins that expire
|
|
186
|
+
together are renewed in one approval.
|
|
187
|
+
|
|
188
|
+
Name each project by its exact slug (lowercase letters and digits joined by
|
|
189
|
+
single dashes, at most 48 characters), all in one workspace, none twice; the
|
|
190
|
+
tool refuses anything else before a device code is spent, and refuses any
|
|
191
|
+
list on a platform that does not advertise batch onboarding, in which case
|
|
192
|
+
make one call per project. The approval page
|
|
193
|
+
lists every name, so tell the user to read the list before approving. A
|
|
194
|
+
create list takes a few calls: while the answer is `status: "creating"`,
|
|
195
|
+
call again with the same `deviceCode` and arguments. Read the per-project
|
|
196
|
+
rows in the answer rather than the top-level status: one project refused
|
|
197
|
+
does not stop the others, a row marked `loggedIn: false` needs a batch
|
|
198
|
+
login, and a row marked `not-attempted` needs a new create call. Do not mix
|
|
199
|
+
existing and new projects in one create list; the platform refuses it whole.
|
|
200
|
+
|
|
174
201
|
## Sharing a build before it ships
|
|
175
202
|
|
|
176
203
|
`extension_preview_web` with `share: true` uploads the build and returns a
|