UNPKG

@extenshi/mcp

Version:

Extenshi MCP server — bring the extension catalog (search, security, market research) and pre-publish scanning into your AI tools

239 lines • 159 kB
// GENERATED by scripts/generate-mcp-skills.mjs from plugins/extenshi/skills. Do not edit:
// edit the skill there and run `node scripts/generate-mcp-skills.mjs`.
export const BUNDLED_SKILLS = [
    {
        "name": "extension-analytics",
        "frontmatter": {
            "name": "extension-analytics",
            "description": "Add consent-first usage and error reporting to a browser extension with extenshi-collector: plan the change with `analytics init`, wire the SDK into the background, add the consent toggle, declare the data in the manifest and the privacy policy, and check that the first event arrives. Use when the user asks \"add analytics to my extension\", \"how many people use my extension\", \"track errors in my extension\", \"which browser versions are my users on\", \"set up extenshi-collector\", or \"what do I declare for analytics in the store\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-analytics\ndescription: >\n  Add consent-first usage and error reporting to a browser extension with\n  extenshi-collector: plan the change with `analytics init`, wire the SDK into\n  the background, add the consent toggle, declare the data in the manifest and\n  the privacy policy, and check that the first event arrives. Use when the user\n  asks \"add analytics to my extension\", \"how many people use my extension\",\n  \"track errors in my extension\", \"which browser versions are my users on\",\n  \"set up extenshi-collector\", or \"what do I declare for analytics in the\n  store\".\n---\n\n# Extension analytics\n\n`extenshi-collector` sends a weekly compatibility heartbeat, redacted errors\nand, when the user opts in, usage events to the author's own PostHog project.\nThe Dojo Analytics dashboard reads that project. The setup command is\n`npx @extenshi/cli@latest analytics init`; it works on the project's source and\nis a dry run until `--write` is given.\n\nOn the Build Map this skill covers the steps `analytics` and `errors`. Report\nthem with the `extension-build` skill's commands.\n\n## Running the command\n\nBefore running it, tell the user what it does and what leaves the machine, show\nthe exact command, and wait for their go-ahead. The command makes at most two\nkinds of request, each announced before it runs: a read of the package's version\nlist from the npm registry and, for a proxy or self-hosted PostHog host, a\nconnectivity check of that host with an empty batch. `--offline` skips both. It\nsends nothing to Extenshi or to PostHog's query API. `npx` downloads the CLI\nfrom the npm registry.\n\n## What the author provides\n\n- A PostHog project of their own, and its **project token** and region (`eu`,\n  `us`, or the address of a proxy or self-hosted instance). The author gives\n  both on the command line; the accepted values are in the reference at\n  https://docs.extenshi.io/developers/cli#extenshi-analytics-init.\n- Whether to offer usage statistics as well as compatibility data (`--usage`),\n  and whether to report errors (`--errors`, on by default).\n- Whether Firefox is a target.\n\nThe SDK supports Manifest V3 only; the command refuses a Manifest V2 project.\n\n## Set up (`analytics`)\n\n1. **Plan.** Run the dry run and read it with the author:\n\n   ```bash\n   npx @extenshi/cli@latest analytics init . --token <project-token> --host eu --json\n   ```\n\n   `sdk.status` says where the SDK stands: `installed` or `vendored` (ready),\n   `available` (on npm, not in the project), `legacy-installed` (a 0.8 package\n   that has to be migrated first) and others the reference lists. `conflicts`\n   and `warnings` name what has to be settled by hand.\n2. **Get the SDK into the project.** For `available`, rerun with `--install\n   --write`, or install `extenshi-collector` with the project's package manager.\n   To vendor it, the plan names the build to copy and the path the wiring\n   imports.\n3. **Apply.** With `--write` the command writes only:\n   - `extenshi.analytics.js` (or `.ts`) next to the background file, with the\n     `startCollector` config;\n   - manifest additions: `storage`; `alarms` with `--timer alarms`; for Firefox,\n     `data_collection_permissions` with `technicalAndInteraction` as an optional\n     category; `optional_host_permissions` for a proxy host that needs it;\n   - a marked block at the top of the background file that starts the SDK;\n   - `.extenshi/analytics.md`, the guide with every snippet and text below.\n\n   It does not add `host_permissions`, edit the CSP, content scripts or\n   extension pages, or touch a framework's own config. With a framework that\n   generates the manifest, use `--write --guide-only` and apply the manifest\n   part in the framework's config.\n4. **Add the consent toggles.** The SDK stores and sends nothing until the user\n   consents. There are two data classes, each with its own flag: compatibility\n   data (the heartbeat and errors) and usage events. The guide has the snippet:\n   a toggle on an extension page sends `{ type: 'extenshi:set-consent', consent }`\n   to the background, whose handler checks that the sender is an extension page\n   and calls `setConsent`. Keep one writer of the choice.\n5. **Install and update events.** The SDK reports them itself, as the reason of\n   an `extension_heartbeat` (`install`, `update`, `browser_update`,\n   `consent_granted`, `periodic`). It registers its listeners inside\n   `startCollector`, so that call has to run synchronously at the top level of\n   the background file, before any `await`. Check that the generated block is\n   still first after other edits. Usage events of the extension's own go\n   through `capture()`, and only with the usage flag on.\n6. **Update the texts.** The guide carries the privacy-policy paragraphs, the\n   Chrome Web Store and Edge privacy answers and the notes for Firefox\n   reviewers. Hand them to the policy and declaration work (the\n   `extension-compliance` skill) unchanged.\n7. **Connect Dojo.** Give the author `dojo.eventFilter` and `dojo.filterNote`\n   from the JSON: they enter them when connecting the PostHog project in Dojo.\n8. **Check the first event.** Load the built extension and allow compatibility\n   data: that sends a `consent_granted` heartbeat at once. The JSON's\n   `dojo.verifyQuery` counts the heartbeats of the last seven days in PostHog;\n   the author runs it, or confirms the event in the Dojo Analytics dashboard.\n   Until one of them shows the event, the step is not done.\n\nRerunning the command is safe: it reads its own markers and the saved answers\nback, and reports what differs.\n\n## Errors (`errors`)\n\n- Error reporting is part of the SDK and on by default: unhandled errors and\n  rejections are sent as `extension_error` with a redacted message, the error\n  name and the file, line and column inside the package, under the same consent\n  as the compatibility data.\n- **Each context installs its own listeners.** The background block covers the\n  service worker. Extension pages and content scripts need the page and\n  content-script snippets from the guide; without them their errors are not\n  seen.\n- `--no-errors` turns reporting off: it writes `captureErrors: false` into the\n  config and the snippets and removes the error paragraphs from the privacy\n  text and the store answers.\n- **Source maps:** there is no command that uploads them. If the project has a\n  task for it, tell the author it is not available and close the task with a\n  note; do not invent an upload.\n- Check it the same way as the first event: throw a test error in each context\n  of a development build, with consent on, and confirm it arrives.\n\n## How to report\n\n- The SDK state before and after, and the files the command wrote.\n- Manifest changes, with the install warning each one adds, if any.\n- Where the consent toggle is and what each choice sends.\n- The texts handed over for the policy and the store answers.\n- What was verified by an arrived event and what was not.\n\n## Stay accurate\n\n- Do not enable usage events without a consent toggle in the extension, and do\n  not preselect consent.\n- An automated test run that grants consent counts as a real user. Block the\n  capture host in such runs.\n- An install that happens before consent is reported as `consent_granted`, not\n  `install`; weekly heartbeats undercount daily users. Say so when the author\n  reads the first numbers.\n- The author's PostHog project and the Dojo dashboard are not visible to the\n  agent. Report an event as arrived only when the author has confirmed it.\n- Do not widen what is collected beyond what the guide's privacy text says. A\n  new property means a new line in the policy and the declarations first.\n- A personal API key of the analytics provider is never needed here and the\n  command refuses one.\n"
            }
        ]
    },
    {
        "name": "extension-browser-changes",
        "frontmatter": {
            "name": "extension-browser-changes",
            "description": "Check a browser extension against recent and upcoming Chrome, Edge and Firefox changes: APIs that start throwing or return something else, events that stop arriving, manifest keys and permissions that work differently, deprecations, and new APIs that replace a workaround. Use when the user asks \"will my extension break in the next Chrome\", \"what changed for extensions in Chrome 157\", \"is my extension affected by this browser update\", \"check my extension for deprecated APIs\", or wants to keep an extension current between releases.\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-browser-changes\ndescription: >\n  Check a browser extension against recent and upcoming Chrome, Edge and Firefox\n  changes: APIs that start throwing or return something else, events that stop\n  arriving, manifest keys and permissions that work differently, deprecations,\n  and new APIs that replace a workaround. Use when the user asks \"will my\n  extension break in the next Chrome\", \"what changed for extensions in Chrome\n  157\", \"is my extension affected by this browser update\", \"check my extension\n  for deprecated APIs\", or wants to keep an extension current between releases.\n---\n\n# Extension browser changes\n\nFind the places in an extension that a browser release changes, before users\nfind them. The check is `npx @extenshi/cli@latest advise`: it compares the\nextension's code and manifest with the list of changes published at\nhttps://cli.extenshi.io/changes and reports each match with its file and line.\nIt is free and needs no account.\n\n## Running the command\n\nBefore running it, tell the user what it does and what leaves the machine, show\nthe exact command, and wait for their go-ahead. The code is read locally and is\nnot uploaded. Each run downloads the current list of changes from\n`cli.extenshi.io/advisories.json`, a public file; the request carries nothing\nabout the user or the code, and the list is kept for a day in `~/.extenshi/`.\n`--offline` skips the download and uses the list the CLI version ships with.\n`npx` downloads the CLI from the npm registry.\n\n## Workflow\n\n1. **Pick the input.** A source directory (preferred, because matches then\n   point at the files the author edits) or a built `.zip`, `.crx` or `.xpi`. In\n   a directory the command reads JavaScript, TypeScript and JSON, skips\n   `node_modules`, `dist`, `build`, `coverage` and dot-folders, and looks for\n   `manifest.json` in `./`, `src/`, `public/` and `static/`.\n2. **Run it:**\n\n   ```bash\n   npx @extenshi/cli@latest advise .\n   ```\n\n   Add `--json` to read every advisory with its matches (`file`, `line`,\n   `column`, `snippet`). By default it checks for Chrome and Edge, plus Firefox\n   when the manifest has `browser_specific_settings.gecko`; set the list with\n   `--browsers chrome,edge,firefox,safari`. `--include-watch` adds proposals\n   that have not merged yet, and `--as-of <YYYY-MM-DD>` decides what has shipped\n   as of that date instead of today.\n3. **Read the labels.** Each advisory says what it means for users:\n   - `BREAKS`: the code stops working as written. A call starts throwing, or a\n     value the code branches on goes away.\n   - `BEHAVIOR CHANGE`: the code keeps running, but events or data it relied on\n     no longer arrive in some cases.\n   - `DEPRECATED`: still works, on its way out.\n   - `OPPORTUNITY`: a new API replaces a workaround. Where the manifest still\n     allows browser versions without it, the advisory names the versions that\n     need a fallback.\n4. **Open every match.** Read the code around the line and decide whether the\n   change applies. The matching is textual: a call through an alias\n   (`const ps = chrome.publicSuffix`) is not found, and a call that is already\n   guarded with `try`/`catch` is still listed. Follow the advisory's links (the\n   Chromium change, the MDN release notes, the W3C WebExtensions issue) when\n   the summary is not enough.\n5. **Propose the change per match.** For `BREAKS` and `BEHAVIOR CHANGE`, fix\n   the code or add the guard, and say which browser version it starts to\n   matter in. For an `OPPORTUNITY`, check `minimum_chrome_version` and\n   `strict_min_version` before replacing the workaround, and keep a fallback\n   where older versions are still allowed.\n6. **Test the result in the browser version that changed.** The\n   `extension-testing` skill runs the package in a chosen browser channel or\n   major version (`test smoke --channel beta`, `--version 157`).\n\n## How to report\n\n- **Affects users now:** `BREAKS` and `BEHAVIOR CHANGE` matches for versions\n  already on the stable channel, each with file, line and the fix.\n- **Coming:** the same labels for beta, dev or announced versions, with the\n  date or version when known.\n- **Deprecated:** what to replace and by when.\n- **Worth adopting:** opportunities, with the fallback they need.\n- **Checked and not affected:** matches that turned out not to apply, in one\n  line each, so the next run does not re-open them.\n\n## Stay accurate\n\n- `advise` always exits 0. It points at places to look; it does not pass or\n  fail a build, and an empty result is not proof that nothing changed.\n- It finds what its list covers. A change that is not in the list, or a call\n  it cannot see in the text, is not reported. Say so when the result is empty.\n- Do not state a release date or version the advisory does not give.\n- Re-run it on every release and after each browser release: the list grows\n  between CLI versions.\n"
            }
        ]
    },
    {
        "name": "extension-build",
        "frontmatter": {
            "name": "extension-build",
            "description": "Load first in any session on an Extenshi extension project (a repository with src/extenshi.config.js or an .extenshi/ folder), before recommending next steps: it decides whether to offer the author the build map now. The build map is a local page that shows which build steps are done, which an agent is working on and which wait on the author. Covers offering the map once, opening it, keeping it current as steps finish, and handing the author the steps only they can do. Use when building, continuing or shipping an extension with the user, in any language (\"build me an extension that…\", \"let's make a Chrome extension\", \"let's work on my extension\", \"continue with the extension\", \"what's next?\", \"what do you recommend?\", \"take my extension to the store\", \"show me the progress\", \"open the build map\").\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-build\ndescription: >\n  Load first in any session on an Extenshi extension project (a repository with\n  src/extenshi.config.js or an .extenshi/ folder), before recommending next\n  steps: it decides whether to offer the author the build map now. The build\n  map is a local page that shows which build steps are done, which an agent is\n  working on and which wait on the author. Covers offering the map once,\n  opening it, keeping it current as steps finish, and handing the author the\n  steps only they can do. Use when building, continuing or shipping an\n  extension with the user, in any language (\"build me an extension that…\",\n  \"let's make a Chrome extension\", \"let's work on my extension\", \"continue\n  with the extension\", \"what's next?\", \"what do you recommend?\", \"take my\n  extension to the store\", \"show me the progress\", \"open the build map\").\n---\n\n# Building an extension with the build map\n\nThe build map is a page that `npx @extenshi/cli@latest map` serves on\n`127.0.0.1`. It lays out every step of building and releasing an extension\n(idea, scaffold, icon, privacy, listing, tests, packages, store submissions)\nwith the dependencies between them, and shows each step as done, in progress,\nwaiting on the author, locked, or not needed for this extension. The author\nsees progress at a glance and makes their choices there, such as picking an\nicon or approving screenshots.\n\n## First rule: ask what waits on the author, in the same reply\n\nEvery time `map status` or `get_build_map` answers with a non-empty `needsYou`,\nthe reply you write next puts each entry to the author. This holds for a\nstatus report, a \"what's next?\" answer and the end of a piece of work alike,\nand it comes before any list of what you plan to do.\n\n`needsYou` is a list of questions, not of step ids. Each entry has `question`,\n`about`, `options` with their current values, `current`, `answer` (where it is\nanswered: `map`, `dojo` or `chat`), `link` to the step while the map runs,\n`url` for a Dojo decision, `record` (how you record the answer) and `blocks`\n(the steps it holds up). For each entry, say:\n\n1. what it decides and what waits for it (`blocks`);\n2. the options, with what is set now and where that comes from;\n3. your recommendation and the reason, in one or two sentences;\n4. where the author answers: the link to the step, or the Dojo page.\n\nAsk one decision at a time, through your client's question tool where it has\none (buttons, `AskUserQuestion`), otherwise as a plain question that ends the\nreply. Ask the one that holds up the most steps first and name the others in\none line each, so the author sees the whole queue.\n\nNaming only the step ids (\"waiting on you: browsers, features, pricing\") is\nnot asking. Neither is deciding for the author because a default was already\nset: a default is nobody's choice.\n\n## One map per project\n\nA project has exactly one map and one map server. That holds however many\nagents work on it and from whichever git worktree:\n\n- The map lives in the main checkout. From a linked worktree the CLI finds the\n  same project directory in the main working tree, so every agent reads the\n  same `.extenshi/build-map.json` and reaches the same server.\n- Running `npx @extenshi/cli@latest map` again, from any terminal, agent or\n  worktree, returns the server that is already running. It never starts a\n  second map, so running it is safe whenever you need the address.\n- The state file is written by the CLI under a lock. Do not edit\n  `.extenshi/build-map.json` by hand, copy it into a worktree, or keep your own\n  progress file next to it.\n- `map stop` stops the map for every agent and the author. Run it only when the\n  author asks.\n- A running map keeps the release it started with. When `map status`,\n  `map step` or `get_build_map` says the map draws an older set of steps than\n  you know, run `npx @extenshi/cli@latest map update` at a quiet moment: not\n  while a review waits on the author or they are signing in on the map. The\n  page reloads by itself and the progress stays. If it says your own tool is\n  older than the map, switch to the latest CLI or MCP server instead. The author\n  can also press **Update** on the map whenever a newer release is out.\n- When you split work across subagents, only the agent talking to the author\n  offers the map and links to it. Subagents never offer it or start it.\n\n## Before offering: has this project been asked already?\n\nCheck the record first, so a new session does not ask again:\n\n- **With the local Extenshi MCP server (`@extenshi/mcp`)**, `get_project_state`\n  and `create_project` return `buildMap`: `running`, `url` while it runs,\n  `offered`, `declined`, `offers` (how many times the author answered),\n  `home` (the directory the map belongs to) and `next`, one sentence on what\n  to do about the offer now (`buildMap` then comes first in the answer).\n  While no map runs, `get_build_map` opens with `offer`, whose `next` is the\n  same sentence. Pass `projectDir` when the extension is not in the server's\n  working directory.\n- **Otherwise** (the hosted connector has no access to local files), read the\n  `offer` object in `.extenshi/build-map.json` of the extension project in the\n  main checkout. From a worktree, the main checkout is the directory that\n  contains the path `git rev-parse --path-format=absolute --git-common-dir`\n  prints. No file means the map was never offered.\n\n| What the record says | What to do |\n| --- | --- |\n| A map is running | Do not offer. Use its address and link steps (below). |\n| Accepted before, nothing running now | The author already said yes; the server stopped after an idle hour. Run `npx @extenshi/cli@latest map --no-open` when you next need the author and give the link. The old tab reconnects by itself. |\n| Declined, `offers` is 1 | Do not offer now. Mention the map once more at the first visual choice (usually the icon). |\n| Declined, `offers` is 2 or more | Do not offer again. Work in chat. |\n| Never offered | Offer it now: in your first reply on an existing project, right after the idea step on a new one (below). |\n\n## Offering the map\n\nOffering the map is required; using it is the author's choice. Ask once, at a\nfixed moment:\n\n- **An existing project** (the repository already has a manifest,\n  `src/extenshi.config.js` or `.extenshi/`, or the author asks to continue,\n  what to do next or what you recommend): in your first reply about working on\n  it. When that reply also recommends next steps, the offer still comes as its\n  own question at the end, not as one of them.\n- **A new idea**: right after the idea step, once you understand what the\n  extension does and for whom, and before the first step that needs the\n  author.\n\nMake the offer its own yes/no question that ends the reply. Do not fold it\ninto a list of recommendations or options, where it reads as one suggestion\namong many, and do not leave it for later. Keep it short, in the author's\nlanguage, about what they get. For example:\n\n> While I build the extension, I can open a build map in your browser. It shows\n> what is done, what I am working on right now and where I need your decision.\n> Icon and screenshot options are easy to compare and pick there, and if you\n> change your mind later, I redo everything that depends on that choice. The map\n> runs locally on your computer. Shall I open it? If not, we carry on here in\n> the chat.\n\nYou run the commands below; never ask the author to run `map` themselves. Do\nnot run `map` before the author answers, do not say the build needs the map,\nand do not repeat the offer at every step. If the author answers with another\nrequest and no yes or no, take that as no answer yet: carry on, and ask once\nmore at the first visual choice.\n\n**If the author says yes,** run `npx @extenshi/cli@latest map` from the\nextension project directory (a worktree is fine). It starts the server, records\nthe yes and opens the page in the browser. Share the address it prints.\n\n**The map in the conversation.** When the local MCP server lists\n`show_build_map` and your client shows MCP Apps (Claude does), the author can\nsee the same map right in the chat. After a yes, run\n`npx @extenshi/cli@latest map --no-open` (the server reads the project files;\nthe browser tab is optional) and call `show_build_map` whenever the author\nshould look. The map in the chat writes the author's answers to the same state\nfile as the browser map.\n\n**If the author says no,** run `npx @extenshi/cli@latest map decline` (it only\nwrites the answer to the local state file) and carry on in chat. At the first\nvisual choice, mention the map once more in one sentence. After a second no, run\n`map decline` again and do not bring the map up again in this project. The state\nfile is kept either way, so if the author opens the map later, it shows the\nwhole history.\n\n## While you build\n\n**What moves a step.** Statuses are derived from what the project proves:\n\n- files in the main checkout: the manifest and the files it names, icons,\n  builds, packages, the store folder (`CHROMEWEBSTORE.md`, screenshots, promo\n  tiles), tests, CI workflows. Work on an agent branch shows up once it is\n  merged into the main checkout. The scaffold's placeholder icons and icons of\n  one colour do not count; a package counts while it carries the manifest's\n  version and is newer than the sources. The files never settle the modules\n  (`features`): the author switches and confirms them (see \"Modules\" below);\n- the Dojo project the directory is bound to (`extenshi project bind`): owner\n  decisions (`propose_decision`, then the owner decides in Dojo) and, once the\n  author is signed in, release evidence and readiness. Commands run with `--evidence`\n  (`scan`, `review-risk`, `generate-listing`, `test smoke`, `screenshots`) and\n  `extenshi release prepare` feed it;\n- records two commands leave in `.extenshi/` where a map lives: `extenshi scan`\n  (the scan and fix steps) and `extenshi ai-visibility` (the AI visibility step;\n  pass `--url <homepage>` once the Homepage step is done);\n- reports agents write into the state file. If `npx @extenshi/cli@latest map\n  --help` lists a `step` command, report your work with it:\n  `map step <step> start --agent \"<your label>\"` when you begin,\n  `map step <step> done --agent \"<label>\" --file <proof>` for each finished\n  task (the file is hashed into the step's evidence; a file in your worktree is\n  kept at the path it has in the main checkout), `map step <step> stop`\n  when you hand a step back. Each answer lists the step's `todos` (every task,\n  whose it is, closed or not) and `current`, the task it is on now. On the\n  local MCP server the same is `report_build_step`. A refusal names its reason in brackets: `(locked)` means\n  an input of the step is not done yet, so work on that first; `(unconfirmed)`\n  means the step belongs to an optional module the author has not confirmed, so\n  ask them about the modules first. If there is no\n  `step` command, the facts above are what the map shows.\n\n**Where things stand.** `npx @extenshi/cli@latest map status --json` reads the\nmap without starting anything: `progress`, `needsYou` (the questions waiting on\nthe author, see the first rule), `modules` (the optional modules), `running`,\n`next` (steps whose inputs are all done and that can run in parallel), `steps`\nand `nodes`. A step of a module that nobody settled (neither the code nor a\nDojo decision asks for it, and the author has not confirmed the modules) is\n`locked` with `waitsOn: \"features\"` and never appears in `next`. `steps` has the shape `get_build_map` answers\nwith: each step this extension needs, its `status`, the task it is on\n(`current`, with `byAuthor` when that task is the author's) and `decide` when\nthe owner answers it in Dojo. `nodes` has every step in full, with the fact\nbehind a done one. Without a running map, `get_build_map` reads the project\nfiles itself and says `facts: \"files\"`. Each done step has a\n`basis`: `project` or `dojo` (a file or a Dojo record proves it, with `where`),\n`author` (the author marked it) or `agent`; `evidence` holds each step's\nhistory. Use `next` to choose what to work on, and never tell the author a step\nis done while the map shows it otherwise. Before a store submission, name the\nsteps that rest only on the author's word (`basis: author`) so they can check\nthem once more.\n\n**Modules.** The optional modules (`analytics`, `uninstall`, `feedback`,\n`i18n`, `monetization`, `onboarding`, `promo`, `research`, `ci`) are chosen on\nthe `features` step. `modules.list` in `map status --json` and `get_build_map`\nhas each one with:\n\n- `on` and `source`: `author` (they chose it), `code` (the code has it), `dojo`\n  (a Dojo decision asks for it) or `default`. A default is not a\n  recommendation and not a choice: with `unconfirmed: true` nobody decided it\n  yet. Analytics is off by default;\n- `steps` (what it adds to the map), `data` (what starts leaving the user's\n  device) and `stores` (what changes in the privacy policy and store forms);\n- `found`, when the code or Dojo has a module that is switched off: tell the\n  author, and remove it from the code if they confirm.\n\nGo through the modules with the author using the recommendation table of the\n`extension-planning` skill. Record each answer the author gives with\n`npx @extenshi/cli@latest map set features.<module> on|off --agent \"<label>\"`\n(`auto` hands the module back to what the code and Dojo suggest; on the local\nMCP server, `set_build_module`). The switch lands in the step's evidence\nhistory with who and when. Record only what the author said. They then confirm\nthe whole set on the map, where the button names it (\"Confirm: 4 modules, +9\nsteps\"); you never confirm for them. Until they do, the steps of a module stay\nlocked unless the code already has the module or a Dojo decision asks for it,\nso do not start building analytics, a survey or a paywall \"because it was on\".\n\n**Skills for a step.** Every step an agent works on names the published skills\nthat hold the instructions for it: the foundation steps name\n`extension-planning`, the scaffold and manifest `extension-scaffold`, the\nservice worker, pages and unit tests `extension-surfaces`, the icon steps\n`extension-icon-design`, permissions and listing copy\n`extension-store-readiness`, builds, screenshots and the browser matrix\n`extension-testing`, localization `extension-localization`, niche research and\nthe pricing comparison `extension-market-research`, the data inventory, policy\nand declarations `extension-compliance`, the scan, its fixes and CI\n`extension-security-scan`, analytics and errors `extension-analytics`, the\nwelcome page, uninstall survey and feedback form\n`extension-onboarding-feedback`, payments `extension-paywall`, packaging and\nstore submission `extension-release`. Only the three store account steps, which\nthe author does, name none.\n\n- `skills` in `map status --json` (and in `get_build_map`) lists them for every\n  step that is not done: `steps` maps a step id to skill names, `index` gives\n  each skill's `teaches` line and the `url` of its `SKILL.md`.\n- `map step <step> start` (`report_build_step` with `state: \"start\"`) answers\n  with the skills of that step, so report the start first, then load them.\n- Load a skill before you work on the step. When your client has it installed\n  (this plugin ships every one of them), use that copy. Otherwise download the\n  `SKILL.md` at its `url` and follow it; saving it into your skills directory\n  (`.claude/skills/<name>/SKILL.md` in Claude Code) keeps it for later sessions.\n- Subagents get the skill too: name it, or pass its `url`, in the brief of the\n  subagent that takes the step.\n- A step that names no skill is done from its description and the tool behind\n  it. A skill never overrides what the map shows or what the author decided.\n\n**Steps the author did themselves or skipped.** On the map the author can give\ntheir own result where the tool behind a step is Extenshi's (a privacy policy,\nuninstall survey or feedback form link; permission reasons; the stores to ship\nto), or skip a step. In `map status --json`:\n\n- `wire` lists the links the author gave that belong in the integration config,\n  as `{ node, key, value }`. Write each one into `src/extenshi.config.js` under\n  its key (create the file if the project has none), then the map finds it in\n  the files. Change nothing else on the author's behalf.\n- A skipped step has `route: \"skip\"`; a step that only uses its result has\n  `skippedBy`. Both are inactive: do not work on them.\n- `byHand` lists skipped steps a store asks for. When the author uploads to a\n  store themselves, go through it with them: each is done in the store\n  dashboard instead.\n\n**Steps that spend credits** (`scan`, `selfCheck`, `fix`, `research`,\n`iconConcepts`, `listing`). `account` in `map status --json` says whether the\nauthor is signed in and what is left per pool (`scan`, `read`, `icon`). Every\naccount gets free credits once.\n\n- Not signed in, or a command says the author is not signed in: do not ask\n  the author to paste anything. Link the step, for example\n  `http://127.0.0.1:<port>/#node=scan`: \"Sign in on the map for the free\n  scans.\" The author signs in there, in the browser.\n- Run scans from the project directory. `extenshi scan` then leaves\n  `.extenshi/scan.json`, and the map counts the scan while that package is\n  unchanged; rebuild, and the scan step opens again.\n- Out of credits: say so in one line with `account.billingUrl`. The author can\n  also mark the step done themselves (that opens once the free credits of its\n  pool are spent) or skip it. Never mark it for them.\n\n## Handing steps to the author\n\nSome steps belong to the author: what the extension is and for whom, target\nbrowsers and modules, the icon concept, approving listing copy and screenshots,\npricing, confirming the Chrome Web Store data declarations, creating the\nfeedback form and store accounts, and approving each store submission. When you\nreach one:\n\n1. Do the agent part first: prepare the options, the drafts, the preview pages.\n   For icons, `npx @extenshi/cli@latest icon preview <concept.svg> --no-open\n   --output <file>.html` makes a preview page per concept. Keep preview files\n   inside the project (any git worktree of it works).\n2. Taste decisions (`iconConcepts`, `screenshots`, `listing`) are made on the\n   map. If `map --help` lists `review`, offer the variants with it:\n   `map review iconConcepts --variant \"Ruler=concepts/ruler.html\" --image\n   \"Ruler=concepts/ruler.svg\" --variant …` (1–8 variants; on the local MCP\n   server, `request_build_review`). It prints the link to the step.\n3. Write one line in chat with that link and what is needed, for example\n   `http://127.0.0.1:<port>/#node=iconConcepts`: \"Three icon concepts are\n   ready, pick one.\" Where `show_build_map` draws the map in the conversation,\n   call it with `step` instead of only sending the link. Then run\n   `map wait iconConcepts` (it returns when the\n   author picks one or asks for another round; `--timeout` caps it) or read\n   `reviews` in `map status --json` (`get_build_map`). For another round, make\n   new variants from the author's words and offer them with `map review` again.\n   Common step ids: `idea`, `surfaces`, `browsers`, `features`,\n   `iconConcepts`, `listing`, `screenshots`, `pricing`, `declarations`,\n   `feedbackForm`, `cwsAccount`, `amoAccount`, `edgeAccount`, `cws`, `amo`,\n   `edge`.\n4. Decisions the server checks (store submission, data declarations, pricing\n   and other money matters) go through Dojo: owner decisions and owner\n   approvals. Give the author the Dojo link and never decide these yourself.\n   In a project bound to Dojo, `browsers` and `pricing` carry `decide` with the\n   decisions page: send the author there instead of asking again. Once you\n   propose a value (`propose_decision`), the step waits on the owner's answer,\n   and a paid model switches the payment steps on.\n5. Without the map, send the preview links in chat and take the answer there.\n   Record what the author said with `map choose <step> <variant number>` or\n   `map choose <step> --redo \"<their words>\"` (`report_build_step` with\n   `choice` or `redo`). Never pick for the author.\n6. Store accounts (`cwsAccount`, `amoAccount`, `edgeAccount`), creating the\n   feedback form in Dojo and settling the modules (`features`) happen outside\n   extenshi, and nothing in the project proves them. The author marks them on\n   the map with **Mark as done** (and can undo it); never mark them yourself.\n   For the modules, go through the choice with the author first and switch what\n   they decide on the map with `map set features.<module> on|off` (see\n   \"Modules\"); the author can also press the switches there. Once marked,\n   `extenshi map status` lists the step as done for every agent and worktree.\n7. When the author uploads to a store themselves, the store step on the map\n   shows the package on disk, the values to paste and the dashboard; the author\n   presses **I submitted it for review** there. Do not mark it yourself.\n\n**The feedback form** (module `feedback`, on by default until the author\nsettles the modules) is a hosted page where\npeople who still have the extension report a bug, a site it breaks on or an\nidea. Forms are created only in Dojo, so `feedbackForm` waits on the author.\nSay in one line what the form is for and link\n`https://dojo.extenshi.io/tools/feedback-form`. Once it exists, the generated\nconfig carries `FEEDBACK_FORM_URL` and `get_feedback_form` returns\n`openSnippet`; wiring that into Options and the popup is `feedbackLinks`, your\nstep. An author with a form of their own (Google Forms, Tally) gives its link on\nthe step, and you wire it as `FEEDBACK_FORM_URL`; an author who wants no form\nskips the step on the map.\n\n## What leaves the machine\n\n- The map server listens only on `127.0.0.1` and reads the project's files\n  locally; nothing from them is uploaded.\n- With a project bound through `extenshi project bind` and the author signed\n  in, the server reads that project's decisions and release readiness from the\n  Extenshi API (`bff.extenshi.io`) once a minute while it runs. It also reads\n  the author's credit balance there, and signing in from the map talks to\n  the same host. `map status --no-live` skips both reads.\n- `npx` downloads the CLI from the npm registry. The CLI's optional usage\n  reports are described in the plugin README.\n\n## What this skill must not do\n\n- Report a status with a non-empty `needsYou` without putting every entry to\n  the author in that same reply, or list step ids in place of the questions.\n- Treat a module that is on by default as chosen, or work on a step of a\n  module the author has not confirmed.\n- Switch a module the author did not ask for, or confirm the modules for them.\n- Recommend next steps on a project whose author was never asked about the\n  map without asking in the same reply.\n- Hide the offer inside a list of suggestions, or ask the author to run the\n  map command themselves.\n- Start the map before the author says yes, or offer it more than twice.\n- Show the map in the conversation to an author who declined it.\n- Start a second map, copy the state file, or edit it by hand.\n- Stop the map unless the author asks.\n- Decide an owner decision or approve a submission for the author.\n- Pick a variant for the author, or record a pick they did not make.\n- Tell the author a step is done when the map does not show it as done.\n"
            }
        ]
    },
    {
        "name": "extension-compliance",
        "frontmatter": {
            "name": "extension-compliance",
            "description": "Make what a browser extension says about user data match what it does: inventory what the code collects, stores and sends, write and publish a privacy policy from that inventory, wire the policy link into the extension and the listings, prepare the store data declarations, and draft license terms for a paid extension. Use when the user asks \"what data does my extension collect\", \"write a privacy policy for my extension\", \"what do I answer in the Chrome privacy practices tab\", \"what goes in data_collection_permissions\", \"do I need a privacy policy\", or \"I need license terms for my paid extension\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-compliance\ndescription: >\n  Make what a browser extension says about user data match what it does:\n  inventory what the code collects, stores and sends, write and publish a\n  privacy policy from that inventory, wire the policy link into the extension\n  and the listings, prepare the store data declarations, and draft license\n  terms for a paid extension. Use when the user asks \"what data does my\n  extension collect\", \"write a privacy policy for my extension\", \"what do I\n  answer in the Chrome privacy practices tab\", \"what goes in\n  data_collection_permissions\", \"do I need a privacy policy\", or \"I need\n  license terms for my paid extension\".\n---\n\n# Extension compliance\n\nThree texts describe an extension's handling of data: the privacy policy, the\nstore's data declarations and the consent shown in the extension. Stores compare\nthem with each other and with the code, and a mismatch can suspend the whole\npublisher account. Build all three from one inventory.\n\nOn the Build Map this skill covers the steps `dataInv`, `policy`, `policyUrl`,\n`declarations` and `license`. Report them with the `extension-build` skill's\ncommands.\n\n## Running commands\n\nBefore running any `npx @extenshi/cli@latest` command, tell the user what it\ndoes and what leaves their machine, show the exact command, and wait for their\ngo-ahead. Publishing a policy or license terms changes a public page: show the\ntext and get the author's approval first.\n\n## Data inventory (`dataInv`)\n\nRead the code, not the intentions. Write the inventory to a file in the\nrepository so the policy and the declarations can cite it.\n\n1. **Trace what leaves the device:** every `fetch`, `XMLHttpRequest`,\n   `WebSocket`, `sendBeacon`, form post and image or script URL built from data.\n   For each, record the host, what is sent and what triggers it.\n2. **Trace what is stored:** `chrome.storage`, IndexedDB, cookies, the Cache\n   API. Record the keys, what they hold and how long.\n3. **Trace what is read:** page content, URLs and titles from `tabs`, history,\n   clipboard, location, identity. A value that is read and never stored or sent\n   is still worth a line, marked as processed on the device only.\n4. **Classify** each item with the store's own words: personally identifiable\n   information, authentication information, location, web history, user\n   activity, website content, financial and payment information, health\n   information, personal communications.\n5. **Name the third parties:** analytics, crash reporting, payment and feedback\n   providers, any backend the author runs, and the SDKs bundled in the package.\n   An install or device identifier sent with events is pseudonymous personal\n   data, not anonymous data.\n\nTwo commands give a cross-check:\n\n```bash\nnpx @extenshi/cli@latest review-risk ./dist/my-extension.zip\n```\n\nruns locally and lists the data types the Chrome Web Store will ask about for\nthe declared permissions (for example `history` leads to web history, `identity`\nto personally identifiable information). The Markdown report of the security\nscan (`scan --report`, described in the `extension-security-scan` skill) adds a\ntable of declared permissions against the calls that use them.\n\nWhen the collector SDK is set up, `.extenshi/analytics.md` holds its privacy\nparagraphs and store answers; include them as they are.\n\n## Privacy policy (`policy`)\n\nThe policy states the inventory in plain language: what is collected, why, where\nit goes, how long it is kept, how a user can decline or ask for deletion, and a\nworking contact address.\n\n- **Hosted by Extenshi (Pro project):** `publish_privacy_policy` generates the\n  first version from the project's saved form and manifest, or publishes\n  Markdown passed as `bodyMarkdown`. It changes the live page. To change an\n  existing policy, `update_privacy_policy_with_ai` returns a proposal and\n  publishes nothing; read it, then publish what the author approved. From the\n  terminal:\n\n  ```bash\n  npx @extenshi/cli@latest privacy publish docs/PRIVACY.md --project <project-id> --dry-run\n  ```\n\n  The dry run compares the file with the live version and sends nothing.\n- **Hosted elsewhere:** the browser generator at\n  https://dojo.extenshi.io/tools/privacy-policy-generator exports Markdown and\n  HTML. Any stable public HTTPS address that needs no sign-in works.\n- **Law sections:** GDPR by default, CCPA/CPRA for California users, COPPA for\n  an extension directed to children. Which law applies depends on where the\n  users are.\n- **Translations:** the English policy is the binding text. Extenshi translates\n  its own template sentences; sections the author wrote or edited are translated\n  with `get_legal_translations` and `set_legal_translations`, and stay in\n  English until then.\n\nIf the extension collects user data, the Chrome Web Store also requires a\nprominent disclosure and consent inside the extension's own interface before\ncollection starts. A policy alone does not satisfy that.\n\n## Policy link (`policyUrl`)\n\n- In a Dojo project the link is `PRIVACY_POLICY_URL` in the integration config.\n  Take it from `get_project_state`; never type a link from memory.\n- Put the same link in every store listing. For Firefox, link it from the\n  listing description: a copy pasted into the store's own policy field stays as\n  it was sent and has to be resent after each change.\n- Check that the page answers: `verify_hosted_artifact` with `kind: \"privacy\"`\n  for a hosted policy, or open the address in a browser for one hosted\n  elsewhere.\n\n## Store declarations (`declarations`)\n\n- **Chrome Web Store:** the Privacy practices tab asks for the single purpose,\n  a justification per permission, the data types collected and the\n  certifications. Draft the answers from the inventory:\n\n  ```bash\n  npx @extenshi/cli@latest generate-listing ./dist/my-extension.zip\n  ```\n\n  writes `CHROMEWEBSTORE.md` on the user's machine with the listing copy, the\n  justifications and the privacy answers to fill in. The tab is filled in the\n  Developer Dashboard by the author.\n- **Firefox:** `browser_specific_settings.gecko.data_collection_permissions` in\n  the manifest. `required` lists what the add-on always transmits, or\n  `[\"none\"]`; categories the user can decline go under `optional`.\n- **Edge:** the privacy questions in Partner Center; `generate-listing --store\n  edge` lays them out in `EDGE.md`.\n\nThe declarations are the author's statements to the store. Prepare them, show\neach answer with the inventory line behind it, and have the author confirm.\n\n## License terms (`license`)\n\nFor a paid extension, the terms a buyer accepts. They are separate from the\ncode license (`license` among the project's owner decisions).\n\n1. `get_license_terms_questionnaire` returns the questions.\n2. `draft_license_terms` builds an unsaved draft from the answers. Take the\n   answers from the pricing decision and the author; the seller's identity is\n   the author's to state.\n3. `save_license_terms_draft` stores the draft (needs Pay write access).\n4. `request_license_terms_publication` returns an approval link. The owner\n   publishes by approving it.\n5. `verify_license_terms_live` checks the page and the paywall links afterwards.\n\n## How to report\n\n- The inventory as a table: data, source, purpose, destination, retention.\n- Policy: where it is hosted, the version or date, the sections changed.\n- Declarations per store, each answer tied to an inventory line.\n- Differences found between the code, the policy and the declarations, with the\n  fix for each.\n- What waits on the author: approval of the policy text, the dashboard answers,\n  the license approval link.\n\n## Stay accurate\n\n- This is not legal advice. Say so, and suggest a lawyer where the extension\n  handles health, financial or children's data.\n- Do not write \"we collect no data\" unless the inventory shows it. Analytics,\n  crash reports, a feedback form with an email field and a payment SDK each\n  count.\n- Regenerate the inventory when permissions, SDKs or network calls change; the\n  policy and the declarations follow it.\n- A permission the code does not use is a reason to remove the permission, not\n  to declare its data type.\n"
            }
        ]
    },
    {
        "name": "extension-icon-design",
        "frontmatter": {
            "name": "extension-icon-design",
            "description": "Design a browser-extension icon that stays readable at 16px in real Chrome, Firefox, and Edge toolbars, then verify and export it locally. Use when the user asks to create, improve, or check an extension icon (\"make an icon for my extension\", \"my icon looks bad in the toolbar\", \"generate extension icons\", \"prepare store icon set\").\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-icon-design\ndescription: >\n  Design a browser-extension icon that stays readable at 16px in real Chrome,\n  Firefox, and Edge toolbars, then verify and export it locally. Use when the\n  user asks to create, improve, or check an extension icon (\"make an icon for\n  my extension\", \"my icon looks bad in the toolbar\", \"generate extension\n  icons\", \"prepare store icon set\").\n---\n\n# Extension icon design\n\nDesign an icon for a browser extension, verify it inside realistic browser\ntoolbars, and export the store-ready PNG set — fully local and free. The only\nexternal tools used are `npx @extenshi/cli@latest icon preview` and\n`icon store-assets`, which run offline, need no account, and send nothing\nanywhere. Tell the user what a command does before you run it.\n\n## What the stores need\n\n- PNG renders at **16, 32, 48, and 128 px** (128 px is the store-listing\n  size), declared in `manifest.json` under `icons` and `action.default_icon`.\n- Keep the **SVG master** in the repo — every size is rasterized from it.\n- The **store listing** takes its own artwork, separate from the package\n  icons: the Chrome Web Store a 128 px icon (96 px artwork with 16 px padding),\n  a **440×280 promo tile** and an optional 1400×560 marquee; Edge Add-ons a\n  300×300 logo and the same two tile sizes; Firefox Add-ons 128, 64 and 32 px\n  icons. Step 6 renders all of them from the master.\n\n## Design rules (the 16 px reality)\n\nThe icon lives most of its life at 16 px in a crowded toolbar. Design for\nthat, not for the 128 px store tile:\n\n1. **One bold silhouette.** If the shape isn't recognizable as a filled black\n   blob, no amount of detail will save it. Sketch the silhouette first;\n   only then add interior detail — at most one or two cuts.\n2. **No text, no hairlines.** Letters and strokes thinner than ~1.5 px at\n   16 px dissolve into noise.\n3. **Fill the canvas.** The artwork's bounding box should reach ~90%+ of the\n   viewBox in its larger dimension, with ~1 px of breathing room. Wide\n   transparent margins shrink the icon relative to its toolbar neighbors.\n4. **Survive light AND dark toolbars.** Users run both themes. Avoid\n   mid-gray fills (#6a6a6a–#9a9a9a) — they clear contrast checkers on every\n   background yet stand out on none. Prefer a saturated brand color, or add\n   a contrasting outline / backdrop shape.\n5. **Flat beats fancy.** Gradients and shadows band and smear at 16 px.\n   If you use a gradient, keep it subtle and verify the 16 px render.\n6. **SVG hygiene:** a single `<svg>` element, square `viewBox` (e.g.\n   `0 0 24 24` or `0 0 128 128`), flat shapes, no embedded rasters, no\n   scripts, no external references.\n\n## Workflow\n\n1. **Ask what the extension does** (if not already clear) and pick one\n   metaphor — a single object, not a scene. Confirm the primary brand color\n   if one exists.\n2. **Draw the SVG yourself** and write it to `icon.svg`. Start from the\n   silhouette; check it mentally at 16 px before adding any interior detail.\n3. **Render the verification page** (offline, free):\n\n   ```bash\n   npx @extenshi/cli@latest icon preview icon.svg --name \"Extension Name\"\n   ```\n\n   It opens a self-contained HTML page: the icon pinned inside Chrome /\n   Firefox / Edge toolbar mockups, switchable palettes (light, tinted, dark,\n   black, saturated + a custom color) with an automatic contrast warning per\n   palette, a mid-gray detector, a canvas-usage meter with an edge-to-edge\n   trim toggle, a store-size matrix, and an 8× magnifier of the 16 px pixels.\n4. **Ask the human to review the page**, then iterate: edit `icon.svg`,\n   re-run with `--no-open`, refresh the tab. Take the page's warnings\n   seriously — \"low contrast\" on a palette means a real share of users won't\n   find the icon in their toolbar. Aim for a clean bill: every palette\n   reads well, no mid-gray note, canvas usage ~90%+.\n5. **Export from the page buttons**: the ZIP contains\n   `icons/{16,32,48,128}.png`, the SVG master, and `manifest-icons.json`.\n   Unpack `icons/` into the extension and wire the manifest:\n\n   ```json\n   {\n   \t\"icons\": { \"16\": \"icons/16.png\", \"32\": \"icons/32.png\", \"48\": \"icons/48.png\", \"128\": \"icons/128.png\" },\n   \t\"action\": { \"default_icon\": { \"16\": \"icons/16.png\", \"32\": \"icons/32.png\" } }\n   }\n   ```\n6. **Render the store listing artwork** (offline, free) once the icon is\n   settled:\n\n   ```bash\n   npx @extenshi/cli@latest icon store-assets icon.svg --out store-assets\n   ```\n\n   It writes the listing icon, promo tile and marquee for the Chrome Web\n   Store, the logo and tiles for Edge Add-ons, and the Firefox Add-ons icons.\n   `--store chrome,edge,firefox` limits the set, `--background <color>` sets\n   the tile background (by default a light tint of the icon colour), and\n   `--promo <file>` / `--marquee <file>` take full-bleed artwork instead of\n   composing the icon. Show the tiles to the human before they go into a store\n   dashboard.\n\n## Quality checklist (before calling it done)\n\n- [ ] Silhouette recognizable at 16 px (check the 8× magnifier)\n- [ ] Every palette in the contrast strip shows \"reads well\"\n- [ ] No mid-gray warning\n- [ ] Canvas usage ~90%+ (or trim toggle applied)\n- [ ] No text, no strokes under 1.5 px at 16 px scale\n- [ ] Manifest references all four sizes\n- [ ] Store listing artwork rendered for each store the extension ships to\n\n## Going further (optional)\n\nThe same CLI can check the rest of the release, also without an account:\n`npx @extenshi/cli@latest review-risk dist.zip` predicts store review outcomes\noffline (Chrome Web Store by default, `--store firefox` or `--store edge` for\nthe others). Docs and the full command reference:\nhttps://docs.extenshi.io/developers/icon-generator\n"
            }
        ]
    },
    {
        "name": "extension-localization",
        "frontmatter": {
            "name": "extension-localization",
            "description": "Translate a browser extension's `_locales` messages with the agent doing the translation and the Extenshi CLI preparing, validating and applying it locally: only new or changed messages are translated, placeholders and brand terms are checked, and every locale is compared with the default one. Use when the user asks to \"translate my extension\", \"add German and Japanese to my extension\", \"localize the store listing name and description\", \"check my _locales\", \"my translations are out of date\", or \"internationalize my extension\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-localization\ndescription: >\n  Translate a browser extension's `_locales` messages with the agent doing the\n  translation and the Extenshi CLI preparing, validating and applying it\n  locally: only new or changed messages are translated, placeholders and brand\n  terms are checked, and every locale is compared with the default one. Use when\n  the user asks to \"translate my extension\", \"add German and Japanese to my\n  extension\", \"localize the store listing name and description\", \"check my\n  _locales\", \"my translations are out of date\", or \"internationalize my\n  extension\".\n---\n\n# Extension localization\n\nAdd or update the languages of an extension. You translate; the CLI decides\nwhat needs translating, keeps placeholders and protected terms intact, and\nwrites the result into `_locales`. The `localize` commands need no Extenshi\naccount and no credits, and they work on files on the user's machine. The\ntranslation itself uses your own model.\n\nIf the Extenshi connector is available, `localize_workflow` (free) returns the\nsame command sequence with the JSON contract.\n\n## Running commands\n\nBefore running any `npx @extenshi/cli@latest localize …` command, say what it\ndoes, show the exact command and wait for the user's go-ahead. Nothing from the\nextension is uploaded; `npx` downloads the CLI from the npm registry.\n\n## What the extension needs\n\n`manifest.json` with `default_locale`, and a matching\n`_locales/<default_locale>/messages.json`. Localized manifest strings use\n`__MSG_key__` references. Keep translator context in each message's\n`description`.\n\nIf the extension has plain English text in the manifest and in static HTML and\nno `_locales` yet, start with a copy:\n\n```bash\nnpx @extenshi/cli@latest localize init ./extension --output ./extension-localized\n```\n\nThe output directory must be new and outside the source. The command moves\nliteral manifest text, static HTML text and display attributes into the English\ncatalog and writes `LOCALIZATION-REPORT.md`. Read the report with the user:\nJavaScript and framework source are left unchanged, so dynamic text and\ntemplates need manual work. An extension that already uses `_locales` skips\nthis step.\n\n## Workflow\n\n1. **Agree on languages and protected terms.** Ask which locales to add and\n   which names must stay untranslated (the extension name, brand and product\n   names). Use the same `--protect` list in every command below. A\n   `localization.json` in the project can hold `targetLocales` and\n   `protectedTerms`; then `--lang` can be omitted.\n2. **Prepare the request:**\n\n   ```bash\n   npx @extenshi/cli@latest localize prepare ./extension --lang fr,de,es --output ./localization --protect MyBrand\n   ```\n\n   It writes `localization-request.json` into a fresh output directory (it\n   refuses to overwrite an existing request). Each locale lists only the\n   messages that are missing, whose source changed, or whose translation has no\n   recorded hashes.\n3. **Translate.** For each locale, translate the `message` text. Keep message\n   keys, placeholder definitions, named and positional substitutions (`$NAME$`,\n   `$1`), escaped dollar signs and protected terms exactly as they are. Leave\n   `version`, `sourceLocale` and `sourceHashes` unchanged. Honour `removeKeys`\n   when a locale has it. Save the completed file as `translations.json` in the\n   same output directory.\n4. **Review with the user.** Translations must say what the product does and\n   nothing more: no added claims, no dropped limits. Short UI strings must fit\n   their place; store name and short description have length limits. After the\n   review, add `\"reviewed\": true` to each locale object. `apply` requires that\n   marker, so never set it for a locale nobody looked at.\n5. **Apply and check:**\n\n   ```bash\n   npx @extenshi/cli@latest localize apply ./extension --translations ./localization/translations.json --protect MyBrand\n   npx @extenshi/cli@latest localize check ./extension --protect MyBrand\n   ```\n\n   `apply` validates before it writes: empty messages, unknown keys,\n   placeholders, protected terms, changed source hashes and listing risk. If\n   the source changed while you translated, prepare a new request for the\n   changed entries. `check` compares every locale with the default one and\n   names the rule behind each error (for example `unsupported-locale` for a\n   `_locales/pt-BR` folder Chrome ignores, or `missing-catalog`).\n6. **Keep the tracking file.** Commit `.extenshi-localization.json` with the\n   project. The next `prepare` uses it to reuse translations whose source did\n   not change.\n7. **Check the listing text.** The store name and short description come from\n   the same catalogs. `npx @extenshi/cli@latest review-risk <zip>` reads them\n   per locale and flags listing problems; see the `extension-store-readiness`\n   skill.\n\n## Projects that generate their own catalogs\n\nWhen a script writes every `messages.json` from one dictionary, there is no\n`.extenshi-localization.json` and the review gate cannot apply. Run the rules\nthat need no review history:\n\n```bash\nnpx @extenshi/cli@latest localize check ./extension --parity-only\n```\n\n## How to report\n\n- Languages added or updated, with the number of messages translated in each.\n- What `check` still reports, per locale, with the rule name.\n- Text that could not be extracted or translated (dynamic strings, templates)\n  and where it lives.\n- What the user should look at in the browser: right-to-left layouts, long\n  strings in small controls, the localized store name.\n\n## Stay accurate\n\n- A locale is supported only after `apply` and `check` pass. Listing a locale\n  in `localization.json` records a request, not a translation.\n- Do not mark a locale reviewed on the user's behalf, and do not translate\n  feature claims into something the extension does not do.\n- The commands do not open a browser. They validate the files, not how the\n  translated UI looks; the `extension-testing` skill shoots the UI per locale.\n- Use only the locale codes Chrome supports (`pt_BR`, not `pt-BR`).\n"
            }
        ]
    },
    {
        "name": "extension-market-research",
        "frontmatter": {
            "name": "extension-market-research",
            "description": "Research a browser-extension niche with real catalog data before building or positioning an extension: who the incumbents are, how crowded and how fresh the niche is, what they charge, what permissions they ask for, and what users complain about. Use when the user asks to \"validate my extension idea\", \"who are my competitors\", \"is there room for an extension that...\", \"analyze the market for X\", \"compare extensions in this category\", or wants a competitor brief across Chrome, Firefox and Edge.\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-market-research\ndescription: >\n  Research a browser-extension niche with real catalog data before building or\n  positioning an extension: who the incumbents are, how crowded and how fresh the\n  niche is, what they charge, what permissions they ask for, and what users\n  complain about. Use when the user asks to \"validate my extension idea\", \"who\n  are my competitors\", \"is there room for an extension that...\", \"analyze the\n  market for X\", \"compare extensions in this category\", or wants a competitor\n  brief across Chrome, Firefox and Edge.\n---\n\n# Extension market research\n\nProduce a short, sourced brief about a niche using the Extenshi catalog, which\nspans the Chrome Web Store, Firefox Add-ons and Edge Add-ons. The goal is a\ngrounded decision, not a promise: catalog data shows the supply side of a market\nand cannot show revenue.\n\n## Before you start\n\n- Ask for the idea in one sentence, the target browsers, and whether the user\n  wants to build, position an existing extension, or pick between ideas.\n- Each lookup costs read credits (`search_extensions`, `get_extension`,\n  `get_reviews`, `market_overview`: 1 each). Check `get_credit_balance` first and\n  size the research to fit: one search per store, about five detail lookups.\n\n## Workflow\n\n1. **Size the niche.** Call `market_overview` with `query` set to the niche (and\n   `stores` if browsers are fixed). Read total matches, store split, Manifest\n   V2/V3 adoption, sensitive-permission histogram, risk tiers, update recency and\n   review-count buckets. Call it once with no arguments if a catalog-wide\n   baseline helps (\"how does this niche compare to the whole store?\").\n2. **Find the incumbents.** `search_extensions` with the same query,\n   `sortBy: \"popular\"`, `limit: 10`, once per store that matters. Re-run with\n   `sortBy: \"rating\"` and `minReviews: 50` to separate loved from merely popular.\n3. **Find the gaps** with filters, each as its own search:\n   - **Neglected leaders:** `updatedWithin: \"stale\"` or `manifestVersions: [2]`\n     sorted by popularity. Popular but unmaintained extensions are the easiest\n     to displace.\n   - **Weak spots:** `maxRating: 3.5` with `minReviews: 100`. Many users, low\n     satisfaction.\n   - **Pricing room:** repeat with `pricing: [\"FREE\"]` and\n     `pricing: [\"FREEMIUM\",\"SUBSCRIPTION\"]` and compare who exists on each side.\n   - **Privacy positioning:** `noTelemetry: true` or `isOpenSource: true`\n     (author-declared) to see whether that angle is already taken.\n4. **Study the top five to eight.** `get_extension` for each: users, ratings per\n   store, pricing, categories, last update, manifest version. Build a comparison\n   table.\n5. **Read what users say.** `get_reviews` on the strongest competitors, at\n   `limit: 30`, sorted `recent` and again by `rating`. Firefox and Edge return\n   review excerpts; Chrome returns only the store aggregate and a link, so say\n   when a competitor's complaints could not be read. Group repeated themes:\n   missing features, ads, slowness, permission fear, price, support.\n6. **Compare permission footprints.** Note which permissions the leaders request\n   (from `market_overview` or `get_extension`). A leader that asks for broad\n   access is a differentiation opening for a narrower extension; say so only\n   when the feature set does not need that access.\n\n## The pricing comparison\n\nWhen the question is how to charge (on the Build Map, the `pricing` step), run\nthe pricing part of the workflow for the closest incumbents and lay the result\nout per model: free, paid once, subscription, with or without a trial. For each\nmodel say who uses it, how those extensions are rated and what their reviews\nsay about the price. The catalog shows the model an extension uses, not what it\nearns, so the comparison supports the choice and does not make it. The author\nchooses. In a Dojo project the choice is the owner decision `pricing`: propose\nthe author's answer with `propose_decision`, and the owner confirms it in Dojo.\n\n## How to report\n\nWrite a one-page brief:\n\n- **The idea and the question** in one line.\n- **Market shape:** number of matching extensions per store, how many have real\n  usage (reviews, users), freshness, manifest versions.\n- **Incumbents table:** name, store, users, rating, pricing, last update.\n- **Gaps and opportunities**, each tied to the data behind it.\n- **What users ask for**, grouped, with counts where you have them.\n- **Risks:** a dominant leader, a saturated niche, or a Manifest V3 or store-policy\n  constraint that affects the idea.\n- **Recommendation:** `build`, `build with a specific angle`, or `pick another\n  niche`, with the reasoning. Give a recommendation, not a survey.\n- **What this cannot tell you.**\n\n## Stay accurate\n\n- The catalog has no revenue, conversion or install-to-active data. Users and\n  ratings are the store's public figures; weekly downloads exist only for\n  Firefox (`minWeeklyDownloads` is Firefox-only). Do not estimate earnings.\n- \"Author-declared\" filters (`noTelemetry`, `isOpenSource`, `hasPaywall`,\n  `monetizationModels`) come from questionnaires and may be missing. A missing\n  answer is not a \"no\".\n- A crowded niche can still be worth entering, and an empty one may be empty for\n  a reason. Present the data and the trade-off, and let the user decide.\n- Use the research to differentiate. Do not advise copying a competitor's name,\n  icon, copy or code.\n"
            }
        ]
    },
    {
        "name": "extension-onboarding-feedback",
        "frontmatter": {
            "name": "extension-onboarding-feedback",
            "description": "Set up the pages around a browser extension's install and uninstall: a welcome page opened once after install, a pin-to-toolbar guide, a hosted uninstall survey with the uninstall URL wired in, and a feedback form opened from the popup and the options page, including \"Doesn't work on this site?\". Use when the user asks \"add a welcome page\", \"show users how to pin my extension\", \"why do people uninstall my extension\", \"add an uninstall survey\", \"add a feedback link\", \"let users report a broken site\", or \"ask happy users for a review\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-onboarding-feedback\ndescription: >\n  Set up the pages around a browser extension's install and uninstall: a\n  welcome page opened once after install, a pin-to-toolbar guide, a hosted\n  uninstall survey with the uninstall URL wired in, and a feedback form opened\n  from the popup and the options page, including \"Doesn't work on this site?\".\n  Use when the user asks \"add a welcome page\", \"show users how to pin my\n  extension\", \"why do people uninstall my extension\", \"add an uninstall\n  survey\", \"add a feedback link\", \"let users report a broken site\", or \"ask\n  happy users for a review\".\n---\n\n# Extension onboarding and feedback\n\nFour moments decide whether a user stays and whether the author hears why not:\nthe first minute after install, the moment something does not work on a site,\nthe moment a user is pleased, and the uninstall. Each gets one page and one\nlink in the extension.\n\nOn the Build Map this skill covers the steps `onboarding`, `survey`,\n`uninstallHook`, `feedbackForm` and `feedbackLinks`. Report them with the\n`extension-build` skill's commands.\n\n## Where the links come from\n\nIn a Dojo project, the address of every hosted page is in the integration\nconfig: `get_project_state` returns `integration.file`, the content for\n`integration.path`, and `integration.unwired`, the links not connected yet. Use\nthose values. Never type a link from memory or build one from a guess: a page\nthat does not exist yet has no link, and the fix is to create the page.\n\nThe uninstall survey and the feedback form are created by the author in Dojo\n(https://dojo.extenshi.io/tools/uninstall-feedback and\nhttps://dojo.extenshi.io/tools/feedback-form). An agent reads, previews and\nchanges an existing one.\n\n## Welcome page (`onboarding`)\n\n1. **Pick the one action** the page drives: pin the extension, keep a new-tab\n   change, or use it on a site. `generate_welcome_page_workflow` (free, static)\n   returns the brief for that goal: which illustrations to make, how to crop\n   them, where the numbered markers go, and the block format.\n2. **Write the copy.** One headline that says what to do next, the steps, and\n   nothing about features the user has not asked for yet.\n3. **Pin guide.** For a page bundled inside the extension,\n   `generate_pin_guide`, or\n\n   ```bash\n   npx @extenshi/cli@latest pin-guide --name \"<extension name>\"\n   ```\n\n   writes the illustrated steps for Chrome, Edge and Firefox: SVGs with the\n   extension's icon, an HTML fragment that passes the extension CSP, and\n   captions in 11 languages through `chrome.i18n`. It runs locally.\n4. **Open it once.** In the background, on `runtime.onInstalled` with the reason\n   `install` only (not `update`), open the page with `chrome.tabs.create`. A\n   bundled page is opened with `chrome.runtime.getURL(...)`.\n5. **Check it** by loading the build in a clean browser profile: the page opens\n   once, and not again after a reload or an update.\n\n## Uninstall survey (`survey`)\n\n1. If `integration.unwired` lists the survey link, there is no survey yet. Ask\n   the author to create one in Dojo; hosting is free.\n2. Read it with `get_uninstall_form` and note its `updatedAt`.\n3. **Fit the reasons to the niche.** Use what users of similar extensions\n   complain about (the `extension-market-research` skill collects it): it does\n   not work on a site, it slows pages down, it asks for too many permissions,\n   a missing feature, the price. Keep the list short, with a free-text option.\n4. Try the change with `update_uninstall_form` and `dryRun: true`; the answer\n   lists every field that changes and the translations to redo. Apply it with\n   `expectedUpdatedAt` and an `idempotencyKey`.\n5. Look at the result with `preview_uninstall_form` in each language. A preview\n   records nothing as an uninstall.\n\nTurning on the email field needs an explicit `confirmPrivacyChange`, because the\nprivacy policy then has to say that the survey collects email addresses.\n\n## Uninstall URL (`uninstallHook`)\n\n```js\nif (config.UNINSTALL_FORM_URL) {\n\tchrome.runtime.setUninstallURL(\n\t\tconfig.UNINSTALL_FORM_URL +\n\t\t\t\"?v=\" + chrome.runtime.getManifest().version +\n\t\t\t\"&hl=\" + chrome.i18n.getUILanguage(),\n\t)\n}\n```\n\n- `config` is the project's integration config. A background file from the\n  Extenshi starter already has this block: look for it before adding a second\n  one.\n- Call it at the top level of the background file, so it runs on every start\n  and `v` always names the version the user left.\n- `v` attributes each answer to a release; `hl` opens the survey in the\n  browser's language when the project offers it.\n- **Check the address, not the uninstall.** Log the string in a development\n  build and open it in a tab: the survey loads with the version filled in.\n  Removing the extension to test it records a real uninstall in the author's\n  numbers, so leave that one check to the author.\n\n## Feedback form (`feedbackForm`)\n\n1. If `integration.unwired` lists `FEEDBACK_FORM_URL`, there is no form. Offer\n   one to the author; they create it in Dojo.\n2. Read it with `get_feedback_form`.\n3. Set the categories and follow-up questions with `update_feedback_form`: a\n   bug, a site it does not work on, an idea, something else. Ask per category\n   what the author needs in order to act (for a broken site: what happened).\n4. Check it with `preview_feedback_form`.\n\n## Feedback links (`feedbackLinks`)\n\n- `get_feedback_form` returns `openSnippet`, a helper that opens the form with\n  the version, the place it was opened from (`popup`, `options`, `trial_end`,\n  `nudge`) and the browser's language. Use it as returned.\n- **Options page and popup:** a plain \"Send feedback\" link that calls the helper\n  with its source.\n- **\"Doesn't work on this site?\"** in the popup: preselect the category and\n  pass the hostname of the active tab, never the full address:\n\n  ```js\n  const [tab] = await chrome.tabs.query({ active: true, currentWindow: true })\n  openFeedbackForm(\"popup\", { cat: \"site_not_working\", site: new URL(tab.url).hostname })\n  ```\n\n  The helper puts the site in the URL fragment, which a browser does not send\n  to a server. The person sees it in a field they can edit or clear, and it is\n  transmitted only when they press Send. `activeTab` is enough to read the\n  active tab after a click on the toolbar button.\n- **A happy user:** `REVIEW_URLS` in the config holds the review page of each\n  published store listing. Open that when it exists, and fall back to the\n  feedback form until the listing is live.\n- **Check that an answer arrives:** send one test answer from the built\n  extension, then read it with `list_feedback_responses` and confirm the\n  version, source and category. Tell the author which answer was the test.\n\n## Reading answers later\n\n`list_uninstall_responses` and `list_feedback_responses` return the answers\nnewest first, with counts by reason or category and by version. A cluster of\nuninstalls on one version points at that release.\n\n## How to report\n\n- Each page: its address as returned by the project, and what it asks or shows.\n- The code added per link, with the file.\n- What was checked by opening or sending, and what is left to the author.\n- Pages that do not exist yet, each as a request to the author.\n\n## Stay accurate\n\n- Do not open the welcome page on update, and do not open more than one tab at\n  install.\n- Do not send a page's full URL, title or content to a form. The hostname, in\n  the fragment, is the limit.\n- An email field or any new question that collects personal data changes the\n  privacy policy. Raise it with the author before turning it on.\n- Do not prompt for a review after a failure or on every open. One prompt, after\n  the user has got value, with a way to decline.\n"
            }
        ]
    },
    {
        "name": "extension-paywall",
        "frontmatter": {
            "name": "extension-paywall",
            "description": "Add a paywall to a browser extension with @extenshi/pay: gate a feature, sell it on the developer's own Stripe account, verify the licence offline. Use when the user asks to monetize an extension, add premium features, a paywall, in-extension purchases or a subscription (\"add a paywall to my extension\", \"make this feature paid\", \"монетизируй расширение\", \"добавь платную версию\", \"charge for the pro version\", \"add Stripe to my extension\").\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-paywall\ndescription: >\n  Add a paywall to a browser extension with @extenshi/pay: gate a feature,\n  sell it on the developer's own Stripe account, verify the licence offline.\n  Use when the user asks to monetize an extension, add premium features, a\n  paywall, in-extension purchases or a subscription (\"add a paywall to my\n  extension\", \"make this feature paid\", \"монетизируй расширение\", \"добавь\n  платную версию\", \"charge for the pro version\", \"add Stripe to my extension\").\n---\n\n# Extension paywall\n\n**Extenshi Pay is in beta.** Prepare the integration or demonstrate the paywall in\nmock mode. Seller agreement acceptance and live payments are currently unavailable\nto third-party developers.\n\nTurn a feature of a browser extension into a paid one with `@extenshi/pay`.\nThe paywall is compiled into the extension bundle (no iframe, no remote code,\nstore approval is not guaranteed), the checkout is a hosted Stripe page in a new\ntab, and the licence is an Ed25519-signed entitlement the SDK caches and\nverifies offline. The developer is the seller on their own Stripe account;\nextenshi keeps the ledger and takes 2% per charge. There is no backend to write.\n\n## What you need from the developer\n\nUse the application's **publishable key** (`pk_ext_` + 32 hex characters) and\nits **entitlement public key** from the Paywall integration section of the\n[author’s project](https://dojo.extenshi.io/projects). Both\nkeys are public and safe to bundle. The verification key enables offline restarts.\n\nThe SDK is published on npm as `@extenshi/pay`. Check the installed version's API\nbefore using examples from newer repository code. Connected sellers also require\na live agreement and completed provider onboarding before checkout can be enabled.\n\nWith authorized `pay.read` / `pay.write` access, select the Pay application for that project and use\n`get_pay_readiness`, `connect_pay_seller`, `set_pay_seller_profile` and\n`upsert_pay_offer`. Use the author's approved identity, prices and terms. Return\nthe onboarding URL for the author to complete in their browser.\nTo change an existing offer's text, send `upsert_pay_offer` with `appId`, `sku`\nand only the new `title` or `description`: omitted fields keep their stored\nvalues, so the price, features and paywall order stay as they are.\nAn existing application can be linked to the project using `link_pay_app`. A connection made before Pay was added needs the Pay permissions granted in Dojo.\n\n- The publishable key comes from `get_pay_seller` on the connector, or from\n  the developer. It is public and is the only key the extension holds.\n- If there is no key yet, build everything in **mock mode** (below) and leave\n  a clear `TODO` where the key goes. Do not invent a key and do not ask for\n  any Stripe secret — the extension never holds one.\n\n## Steps\n\n1. **Install** — `npm install @extenshi/pay`.\n   `@extenshi/pay/lite` has gating and checkout but no paywall UI.\n2. **Decide the feature names.** Each offer in dojo unlocks a list of feature\n   names (for example `pdf-export`, `sync`). Use the same strings in code.\n3. **Gate the feature** where the paid path starts:\n\n   ```ts\n   import ExtenshiPay from '@extenshi/pay'\n\n   const pay = new ExtenshiPay({\n     publishableKey: 'pk_ext_…',\n     entitlementPublicKey: '<Ed25519 public key from Payments>',\n   })\n   await pay.initialize()\n\n   const ok = await pay.requireFeature('pdf-export', {\n   \tonUnlock: () => enablePdfExport(),\n   })\n   ```\n\n   `requireFeature()` shows the paywall when the installation has no matching\n   entitlement and resolves `true` once a checkout completes, `false` when the\n   user dismisses it. For your own upgrade screen use `isPaid()`,\n   `hasFeature()`, `openCheckout(sku)` and `onEntitlementChange()` instead.\n4. **Show the paywall deliberately** when the UI calls for it:\n   `pay.showPaywall({ mode: 'modal' | 'inline' | 'sidebar' | 'fullscreen' | 'minimal', sku, container, theme })`.\n   Prices come from the offer and are formatted in the user's locale; do not\n   hardcode a price string in the extension. An offer's `features` are\n   entitlement keys (`requireFeature('pdf-export')` checks them) and are never\n   translated, so do not translate them; pass localized bullet points from the\n   extension's `_locales` as `showPaywall({ features: [...] })`.\n5. **Test without Stripe** in mock mode — no network, no account:\n\n   ```ts\n   const pay = new ExtenshiPay({\n     publishableKey: 'pk_ext_' + '0'.repeat(32),\n   \tmock: true,\n   \tmockData: {\n   \t\toffers: [{ sku: 'pro', kind: 'one_time', interval: null, amountMinor: 499, currency: 'usd', title: 'Pro', description: null, features: ['pdf-export'] }],\n   \t\tentitlements: [],\n   \t\tcheckoutEnabled: true,\n   \t\tclaimAfterPolls: 2,\n   \t},\n   })\n   ```\n\n   Write the unit tests against mock mode; switch `mock` off and put the real\n   key in for the build the developer ships.\n6. **Update the store privacy disclosure.** Payment calls send the publishable\n   key, random installation id, sku and locale; checkout claims send a session\n   id. Optional recovery sends a recovery session id, claim challenge and claim\n   secret (POST body). Billing profile selection sends an opaque customer id. Email and verification codes are entered on the hosted\n   recovery page. Disclose installation/license verification and optional hosted\n   recovery when enabled; the SDK does not collect extension settings.\n\n## Where it runs\n\nThe SDK targets the extension runtime: `chrome.storage.local` for the\ninstallation id and the cached entitlement, `chrome.tabs.create` for the\ncheckout tab. Call it from the extension's own pages (popup, options, side\npanel) or the service worker. Outside an extension page it falls back to\n`localStorage` and `window.open`, which is fine for a demo page and not for\nproduction.\n\n## Do not\n\n- Do not fetch the paywall, a template or a script from a URL at runtime. The\n  bundled paywall is what keeps the extension inside the store's remote-code\n  rule.\n- Do not put a Stripe secret key, a webhook secret or any server credential in\n  the extension. Only public application and entitlement verification keys belong in the extension.\n- Do not treat the cached entitlement as a second source of truth. It is a\n  signed projection of the payment ledger; the server recomputes it. Paid access\n  requires a verified signature bound to the application key. Offline use is\n  limited to 48 hours from signed issuance; never bypass failed verification.\n- Do not write \"unlimited\", \"best\" or price guarantees into paywall copy.\n  Feature lists and prices belong in the offer in dojo.\n\n## Reference\n\n- Guide and API: https://docs.extenshi.io/developers/pay-sdk\n- Landing with the fee and the seller terms: https://catalog.extenshi.io/monetization\n"
            }
        ]
    },
    {
        "name": "extension-planning",
        "frontmatter": {
            "name": "extension-planning",
            "description": "Turn an idea for a browser extension into the decisions everything else is built from: a one-paragraph brief, the surfaces it needs (popup, side panel, content script, options), the stores it ships to, the sites it runs on with their match patterns, a name that is free in the stores, and the optional modules. Use when the user says \"I want to build an extension that…\", \"help me plan my extension\", \"which permissions will I need\", \"should I ship to Firefox too\", \"is this extension name taken\", or starts a new extension project and has not written the scope down yet.\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-planning\ndescription: >\n  Turn an idea for a browser extension into the decisions everything else is\n  built from: a one-paragraph brief, the surfaces it needs (popup, side panel,\n  content script, options), the stores it ships to, the sites it runs on with\n  their match patterns, a name that is free in the stores, and the optional\n  modules. Use when the user says \"I want to build an extension that…\", \"help\n  me plan my extension\", \"which permissions will I need\", \"should I ship to\n  Firefox too\", \"is this extension name taken\", or starts a new extension\n  project and has not written the scope down yet.\n---\n\n# Extension planning\n\nSettle what is being built before any code exists. Each decision here switches\nlater work on or off: a surface adds files and permissions, a store adds its own\nsubmission rules, a site adds a host permission that reviewers and users see.\n\nOn the Build Map this skill covers the steps `idea`, `surfaces`, `browsers`,\n`sites`, `identity` and `features`. Most of their tasks are the author's\nchoices. Prepare the options with the facts below, say which one you would take\nand why, and let the author choose; record progress with the `extension-build`\nskill's commands.\n\n## The brief (`idea`)\n\nAsk for three things and write them down in the author's words:\n\n- **The problem**, as one sentence about what a person cannot do today.\n- **The audience**: who has that problem, and on which sites or in which\n  situation.\n- **The first three features.** Everything else is deferred, and deferred\n  features stay out of the listing and other release promises.\n\nThen write the one-paragraph brief to a file in the repository (for example\n`docs/brief.md`) with an acceptance checklist: what must work, on which sites,\nin which browsers. Later steps read it, so keep it current when the scope\nchanges.\n\n## Surfaces (`surfaces`)\n\nCall `list_extension_templates` (free, no account). It names the kinds of\nextension (popup, side panel, page enhancer, in-page assistant), the permissions\neach kind requires and the cross-browser rules. Types combine, and the required\npermissions are their union.\n\nFor each of the three features, name the smallest surface that delivers it:\n\n- An action the user starts from the toolbar: a popup. With `activeTab` it needs\n  no host permission.\n- Something that changes pages on its own: a content script on the listed sites.\n- Something that stays open next to the page: a side panel. Chromium uses\n  `side_panel`, Firefox `sidebar_action`.\n- Settings: an options page.\n- Background work (events, alarms, messaging between surfaces): the service\n  worker.\n\nDo not add a surface no feature in the brief needs. Each one is code to build,\ntest and keep working in every target browser.\n\n## Stores (`browsers`)\n\nState what each store adds, then let the author choose:\n\n- **Chrome Web Store:** a developer account with a one-time registration fee.\n  The first item and its listing, privacy and distribution tabs are created in\n  the Developer Dashboard.\n- **Firefox Add-ons:** free. The add-on ID is permanent after the first upload,\n  the manifest declares its data collection, bundled or minified code needs a\n  source archive with build instructions, and a Manifest V3 build needs\n  `background.scripts` next to `service_worker`.\n- **Edge Add-ons:** free, takes the same Manifest V3 package as Chrome. The\n  first submission is created by hand in Partner Center.\n\nIn a Dojo project the choice is the owner decision `targetBrowsers`: propose it\nwith `propose_decision`, and the owner confirms it in Dojo.\n\n## Target sites (`sites`)\n\n1. Collect the sites from the brief. Ask about subdomains, regional domains and\n   pages that must stay untouched (login, checkout, banking).\n2. Write the narrowest match patterns that cover them, for example\n   `https://*.example.com/*`. Use `<all_urls>` only when the feature has to work\n   on any page, and say that it brings the broadest install warning and a slower\n   review.\n3. Prefer no host permission at all when the feature runs after a click:\n   `activeTab` with `scripting` covers the current tab.\n4. Look at catalog extensions built for the same sites: `search_extensions`,\n   then `get_reviews` for what users report as broken there. Catalog tools need\n   an account and count against the read allowance.\n\nThe patterns feed the manifest's content scripts and host permissions, so write\nthem next to the brief.\n\n## Name and tagline (`identity`)\n\n1. Propose five names: short, pronounceable, saying what the extension does.\n   Avoid another product's name or a browser's name as the leading word.\n2. Search each one with `search_extensions`. A match on the exact name or a\n   close spelling in the same category is a collision; say which extension it\n   collides with.\n3. The author picks. Record the name and a tagline that fits a store's short\n   description (Chrome allows 132 characters).\n\nThe name is copied into the manifest, the icon work, the listing and every\nhosted page. After a later rename, `find_brand_mentions` lists the hosted fields\nthat still hold the old name.\n\n## Optional modules (`features`)\n\nThe modules are the author's choice, and the steps of a module wait on the map\nuntil the author confirms the set (unless the code already has the module or a\nDojo decision asks for it). A module that is on only by default is\nnot chosen (`source: \"default\"`, `unconfirmed` in `modules.list` of\n`map status --json` and `get_build_map`). Analytics is off by default: it is\nthe module with the widest consequences, so it is switched on by a decision.\n\nMake a recommendation table and show it to the author before you ask. One row\nper module, taken from `modules.list` (`on`, `source`, `steps`, `data`,\n`stores`) and from what you know about this extension:\n\n| Column | What goes in it |\n| --- | --- |\n| Module | Its name and what is set now, with the source (code, Dojo, the author, default). |\n| Cost | The steps it adds (`steps`), credits it spends, and what the author keeps up afterwards. |\n| Data | What starts leaving the user's device (`data`). \"Nothing\" is an answer too. |\n| Stores and policy | What changes in the privacy policy, the store data forms and the manifest (`stores`). |\n| Fits this extension? | How it sits with the brief and with the niche research, if `research` is done: what competitors promise, what their users complain about. |\n| Recommendation | On or off, with the reason in one sentence. |\n\nName the conflicts outright. For example: \"Analytics goes against the\npositioning 'nothing leaves your device': three of the five closest\nextensions sell exactly that promise, and switching it on means a consent\ntoggle, a policy paragraph and the Firefox data declaration. Recommendation:\noff.\" Or the other way: \"Without the uninstall survey you will not learn why\npeople leave; it sends nothing from the extension. Recommendation: on.\"\n\nWhat each module brings, for the Cost column:\n\n- **Analytics:** the author's own PostHog project, a consent toggle in the\n  extension, a paragraph in the privacy policy, the Chrome data-use form and\n  `data_collection_permissions` for Firefox.\n- **Uninstall survey and feedback form:** hosted pages the author creates in\n  Dojo, and one link each in the extension.\n- **Localization:** `_locales` files, translated listing text and screenshots\n  per language.\n- **Monetization:** a Pay application, payment-provider onboarding the author\n  completes in the browser, license terms and a paywall.\n- **Welcome page:** a page opened once after install.\n- **Promo tiles:** listing artwork, optional in every store.\n- **Niche research:** catalog reads, which spend credits; its result feeds the\n  \"Fits this extension?\" column, so when the author wants it, settle it first.\n- **CI evidence:** a workflow in the author's repository that sends scan\n  results of each build.\n\nThen ask, one module at a time where the answer is not obvious, starting with\nthe ones that are on only by default. Record each answer with\n`npx @extenshi/cli@latest map set features.<module> on|off` (`set_build_module`\non the local MCP server) and send the author to the `features` step to\nconfirm the set. Do not confirm it for them, and do not start a module's steps\nbefore they do.\n\n## How to report\n\n- The brief, with the three features and what was deferred.\n- Surfaces and the permissions they bring, taken from\n  `list_extension_templates`.\n- Stores, with what each one adds for this extension.\n- Match patterns, and why each is as wide as it is.\n- Name candidates with the collisions found, and the one chosen.\n- The module recommendation table, and which modules the author settled.\n- Decisions still open, each with the person who makes it.\n\n## Stay accurate\n\n- These are the author's decisions. Give a recommendation; do not record a\n  choice the author has not made.\n- A name with no catalog match is not a trademark clearance. Say so.\n- Do not promise a store will approve a permission. The `extension-store-readiness`\n  skill predicts review outcomes once there is a manifest.\n- Chrome review text is not in the catalog; its ratings are.\n"
            }
        ]
    },
    {
        "name": "extension-release",
        "frontmatter": {
            "name": "extension-release",
            "description": "Take a tested browser extension through release: bump the version, build one reproducible package per store, check that the listing, policy, screenshots and evidence all describe that exact package, submit to the Chrome Web Store, Firefox Add-ons and Edge Add-ons with the author's approval, follow the review, and confirm the public listing. Use when the user asks \"release my extension\", \"publish a new version\", \"submit to the Chrome Web Store\", \"submit my add-on to AMO\", \"is my extension ready to publish\", \"my extension was rejected\", or \"is the new version live yet\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-release\ndescription: >\n  Take a tested browser extension through release: bump the version, build one\n  reproducible package per store, check that the listing, policy, screenshots\n  and evidence all describe that exact package, submit to the Chrome Web Store,\n  Firefox Add-ons and Edge Add-ons with the author's approval, follow the\n  review, and confirm the public listing. Use when the user asks \"release my\n  extension\", \"publish a new version\", \"submit to the Chrome Web Store\",\n  \"submit my add-on to AMO\", \"is my extension ready to publish\", \"my extension\n  was rejected\", or \"is the new version live yet\".\n---\n\n# Extension release\n\nA release is five separate facts: a package was built, it was uploaded, it was\nsubmitted for review, the store approved it, and the listing is public. Record\neach one on its own, and never report an earlier one as a later one.\n\nOn the Build Map this skill covers the steps `ready`, `zip`, `cws`, `amo`,\n`edge`, `track` and `live`. Report them with the `extension-build` skill's\ncommands.\n\n## Running commands\n\nBefore running any `npx @extenshi/cli@latest` command, tell the user what it\ndoes and what leaves their machine, show the exact command, and wait for their\ngo-ahead. Submitting to a store is the author's decision every time: prepare\neverything, show what will be sent, and submit only after they say so for this\nversion.\n\n## What the author sets up\n\nStore accounts and store API access belong to the author and are set up by\nthem, once per store. The guides describe each:\n\n- Chrome Web Store: https://docs.extenshi.io/developers/publish-to-chrome-web-store\n  (a developer account with 2-step verification and a one-time registration\n  fee).\n- Firefox Add-ons: https://docs.extenshi.io/developers/publish-to-firefox-add-ons\n  (free).\n- Edge Add-ons: https://docs.extenshi.io/developers/publish-to-edge-add-ons\n  (free; Partner Center).\n\nPoint the author to the guide for the store and wait. Whether a store is\nconfigured is checked with `publish --validate` (below), which publishes\nnothing.\n\n## Package per browser (`zip`)\n\n1. **Bump the version** in the source manifest. Stores refuse a version they\n   already hold. The same version goes to every store.\n2. **Build, then package:**\n\n   ```bash\n   npx @extenshi/cli@latest package dist --browser chrome,edge,firefox --firefox-dir dist-firefox\n   ```\n\n   It writes one zip per browser and `extenshi-packages.json` with each sha256,\n   by default under `.extenshi/packages`. The zips are reproducible: the same\n   files give the same bytes on any machine. It reads the build directory,\n   changes nothing in it and uploads nothing.\n3. **Firefox.** Lint the build and expect 0 errors:\n\n   ```bash\n   npx web-ext@10 lint --source-dir dist-firefox\n   ```\n\n   When the code is bundled, minified or transpiled, reviewers need the source\n   and the build steps:\n\n   ```bash\n   npx @extenshi/cli@latest amo-source . --out amo-source.zip --verify <firefox package>\n   ```\n\n   archives the committed source, writes `BUILD.md`, rebuilds in a clean\n   directory and compares the result with the package. It refuses an uncommitted\n   working tree and flags a vendored minified file whose origin it cannot show.\n4. **Rerun the checks on these zips.** A version bump changes the bytes, so\n   evidence recorded for an earlier package reads `stale`. Install each zip\n   (`test smoke`, the `extension-testing` skill) and scan the final package\n   (the `extension-security-scan` skill) before going on.\n\n## Listing readiness (`ready`)\n\nEverything a store form asks for exists and describes this package.\n\n1. **Collect:** the icon set and listing artwork, screenshots per store and\n   locale, the listing draft (`CHROMEWEBSTORE.md`, `AMO.md`, `EDGE.md` from\n   `generate-listing`), the privacy policy link, the permission justifications\n   and the data declarations.\n2. **Cross-check by reading:** the name is the same in the manifest, the\n   listing and the hosted pages; the version in the manifest is the one being\n   released; every link opens; the listing describes only features this\n   version has; the screenshots show this version.\n3. **Record the release**, in a directory bound to a Dojo project:\n\n   ```bash\n   npx @extenshi/cli@latest release prepare .extenshi/packages/extenshi-packages.json --browser chrome --locales en --source-manifest src/manifest.json --listing CHROMEWEBSTORE.md --policy docs/PRIVACY.md --payment not-used --dry-run\n   ```\n\n   Read the diff, then run it without `--dry-run`. It records hashes of the\n   package, manifest, listing and policy; it runs no tests. Pass the same\n   listing file that `review-risk --listing` and `screenshots --listing` used,\n   or their evidence will not match.\n4. **Read the status:**\n\n   ```bash\n   npx @extenshi/cli@latest release status --browser chrome --json\n   ```\n\n   or `get_release_readiness`. Each check is `passed`, `failed`, `stale` (a\n   record exists for another package or input) or `unknown` (no record). A\n   `DECISION_UNDECIDED:<key>` blocker is an owner decision the author makes in\n   Dojo; `AMO_ADDON_ID_MISMATCH` means the Firefox package carries a different\n   add-on ID than the decided one.\n5. Fix what is failed or stale with the skill for that check, then read the\n   status again. Repeat per target browser.\n\n## Submit\n\nConfirm the configuration first:\n\n```bash\nnpx @extenshi/cli@latest publish <package> --stores chrome,firefox,edge --validate\n```\n\nThe upload goes from the user's machine straight to each store; the package is\nnot sent to Extenshi. With the local MCP server, `publish_extension` does the\nsame.\n\n- **Chrome Web Store (`cws`).** A new item is created by the author in the\n  Developer Dashboard, where the Store listing, Privacy and Distribution tabs\n  are also filled: the store's API does not accept them. Give the author the\n  values from `CHROMEWEBSTORE.md` field by field. For an existing item,\n  `publish <zip> --stores chrome` uploads the package and submits it.\n- **Firefox Add-ons (`amo`).** A listed submission runs end to end:\n\n  ```bash\n  npx @extenshi/cli@latest publish <zip> --stores firefox --listing AMO.md --source amo-source.zip --screenshots <dir>\n  ```\n\n  It creates the add-on on the first submission, or edits its listing, and\n  reports each step. A new add-on is created only with the decided add-on ID,\n  because the ID is permanent. `--release-notes` is public on the listing;\n  `--reviewer-notes` goes to reviewers only: say how to test the add-on and\n  how to reach anything behind a sign-in. Rerunning after a partial failure\n  resumes.\n\n  An update to an add-on that is already on AMO, with its listing left as it\n  is:\n\n  ```bash\n  npx @extenshi/cli@latest publish <zip> --stores firefox --source amo-source.zip --release-notes \"<what changed>\" --reviewer-notes \"<how to build and test>\"\n  ```\n\n  It creates the version with both notes, then uploads the source archive to\n  that version. The listing is not read or changed. If the source upload\n  fails, run the same command again: the archive goes to the version that\n  already exists.\n- **Edge Add-ons (`edge`).** The first submission is created by hand in Partner\n  Center; give the author the values from `EDGE.md`. Later versions:\n  `publish <zip> --stores edge`, which waits for the publish request to reach a\n  final status.\n\nBefore each submission, state the store, the version, the package's sha256 and\nthat the same package passed the checks, and wait for the author's yes.\n\n## Review tracking (`track`)\n\n- Read the state per store: `release status --json`, and for Chrome\n  `publish --validate`, which reads the item's status.\n- Report \"in review\" as in review. Review time is the store's and is not\n  predictable.\n- **On a rejection:** ask the author for the store's message, which arrives by\n  email and in the dashboard. Quote the policy it names, find the cause in the\n  package or the listing (`review-risk` predicts against the same policies),\n  and write each cause down as a task with the step it belongs to. Fix,\n  rebuild, bump the version when the store requires a new one, and go through\n  packaging and readiness again.\n- Do not resubmit the same package with only the reviewer notes changed unless\n  the rejection was about the notes.\n\n## Live (`live`)\n\n- Open the public listing and confirm the version it shows.\n- `get_extension` or `search_extensions` shows whether the catalog lists the\n  extension yet; say what you see, with the date.\n- Once a listing is public, its review page appears in `REVIEW_URLS` of the\n  project's integration config.\n- The first installs appear as heartbeats in the author's analytics, when the\n  collector is set up (the `extension-analytics` skill).\n\n## How to report\n\n- Version, and per store: package file and sha256, uploaded, submitted,\n  approved, public, each with a yes, a no or \"pending\" and the time.\n- Readiness checks that were failed or stale and what fixed them.\n- What waits on the author: an account, a dashboard form, an approval.\n- For a rejection: the store's reason, the cause found, the fix.\n\n## Stay accurate\n\n- A successful upload is not a submission, and a submission is not a release.\n- Never submit without the author's approval for this version, and never\n  create a store item or a Firefox add-on ID on your own initiative.\n- Do not edit a package after it was checked. A changed file is a new package\n  that needs its checks again.\n- Do not promise a review outcome or a date.\n"
            }
        ]
    },
    {
        "name": "extension-scaffold",
        "frontmatter": {
            "name": "extension-scaffold",
            "description": "Start a browser-extension repository and assemble its manifest.json: get the starter files for a new project or connect an existing codebase, write the Manifest V3 entries for each surface, turn match patterns into host permissions, add the Firefox keys, wire the rendered icons in, and prove the result packages. Use when the user asks \"scaffold my extension\", \"set up the project\", \"write the manifest\", \"make this manifest work in Firefox\", \"add the icons to the manifest\", or when a build fails because the manifest names a file that is not there.\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-scaffold\ndescription: >\n  Start a browser-extension repository and assemble its manifest.json: get the\n  starter files for a new project or connect an existing codebase, write the\n  Manifest V3 entries for each surface, turn match patterns into host\n  permissions, add the Firefox keys, wire the rendered icons in, and prove the\n  result packages. Use when the user asks \"scaffold my extension\", \"set up the\n  project\", \"write the manifest\", \"make this manifest work in Firefox\", \"add\n  the icons to the manifest\", or when a build fails because the manifest names\n  a file that is not there.\n---\n\n# Extension scaffold and manifest\n\nProduce a repository that builds, and a manifest in which every entry is needed\nand every file it names exists.\n\nOn the Build Map this skill covers the steps `scaffold`, `manifest` and\n`manifestIcons`. Report them with the `extension-build` skill's commands.\n\n## Running commands\n\nBefore running any `npx @extenshi/cli@latest` command, tell the user what it\ndoes and what leaves their machine, show the exact command, and wait for their\ngo-ahead. If the user prefers to run it, print the command and work from the\noutput they paste back.\n\n## New project or existing code\n\nDecide this first, because the starter files replace same-named files.\n\n- **A new extension with a Dojo project:** `get_project_scaffold` returns the\n  starter as files ready to write: `manifest.json` for one target browser, the\n  background worker, the panel or content-script files the project's types need,\n  placeholder icons and `src/extenshi.config.js`. Call it once per target\n  browser and keep the outputs separate. Keep `src/extenshi.config.js` as\n  returned: the project recognises the repository by it.\n- **An existing repository:** keep its code. Bind it and record its manifest\n  instead:\n\n  ```bash\n  npx @extenshi/cli@latest project bind --project <project-id> --repo owner/extension --branch main\n  npx @extenshi/cli@latest project import-manifest src/manifest.json --browser chrome --dry-run\n  ```\n\n  Remove `--dry-run` after reading the diff. These commands record metadata:\n  they do not change the source, install a scaffold or upload the repository.\n  `get_project_state` then returns `integration.file`, the content for\n  `integration.path`, and `integration.unwired`, the links not connected yet.\n- **No project yet:** work locally and say that the project integration is\n  pending. `create_project` makes one when the author asks for it.\n- **A framework (WXT, Plasmo, a bundler):** generate the project with that\n  framework's own tool, then add the integration file from `get_project_state`.\n  Some frameworks generate the manifest from their config; edit the config, not\n  the generated file.\n\nPut the code in Git before substantial work, with a README that names the build\ncommand for each browser.\n\n## The manifest\n\nWrite it from decisions already made: the name and tagline, the surfaces, the\nmatch patterns.\n\n1. **Base fields:** `manifest_version: 3`, `name`, `version`, `description`.\n   With localization, `name` and `description` are `__MSG_…__` keys and\n   `default_locale` is set.\n2. **One entry per chosen surface**, and no others: `action.default_popup`,\n   `background.service_worker`, `content_scripts` with `matches`,\n   `options_ui.page`, `side_panel.default_path`.\n3. **Permissions:** take the minimum for the chosen surfaces from\n   `list_extension_templates`. Host access comes from the match patterns. Where\n   a click starts the feature, use `activeTab` and no host permission. Put what\n   is needed only sometimes in `optional_permissions` or\n   `optional_host_permissions`.\n4. **Firefox**, when it is a target:\n   - `browser_specific_settings.gecko.id`. It is permanent after the first\n     upload, so in a Dojo project use the decided `amo.addonId` (or propose the\n     suggested default with `propose_decision`); never invent one.\n   - `browser_specific_settings.gecko.data_collection_permissions`: `required`\n     is `[\"none\"]` when nothing is collected or transmitted.\n   - `background.scripts` next to `service_worker`. Firefox refuses a Manifest\n     V3 package whose only background is a service worker; Chromium ignores the\n     extra key.\n   - `sidebar_action` in place of `side_panel`.\n5. **No file the build lacks.** Every path in the manifest (background, popup,\n   options and side-panel pages, content scripts, icons, the default locale)\n   must exist in the build output.\n6. **`web_accessible_resources`:** list files explicitly. A wildcard makes every\n   matching file readable by any web page.\n\nIn a Dojo project, send the result to the project with `import_manifest`: the\ndefault dry run returns the changes and a state hash, and a second call with\nthat hash applies them.\n\n## Icons in the manifest (`manifestIcons`)\n\nAfter the icon set is rendered (the `extension-icon-design` skill exports it):\n\n- `icons`: `16`, `32`, `48` and `128`, each pointing at a PNG.\n- `action.default_icon`: the same files for the toolbar button.\n- Use the file names of the export; do not rename a size to another.\n\n## Prove it\n\n```bash\nnpx @extenshi/cli@latest package dist --browser chrome\n```\n\nPackaging reads the build directory, changes nothing in it and uploads nothing.\nIt refuses a manifest that names a missing file, a placeholder Firefox add-on ID\nand a Firefox package with only a service worker, which makes it the check for\nthe three steps above. Then install the zip in a browser with the\n`extension-testing` skill (`test smoke`).\n\n## How to report\n\n- What was created or connected: starter files, or binding and imported\n  manifest.\n- The manifest entries per surface, and the permissions with the reason for\n  each.\n- Firefox keys set, and which value is still an open owner decision.\n- The packaging result per browser, with each refusal and its fix.\n\n## Stay accurate\n\n- Do not overwrite files in an existing repository with starter files.\n- Do not add a permission \"in case\". Adding one in a later update can disable\n  the extension for existing users until they accept it.\n- A manifest that packages is not a manifest that passes review: the\n  `extension-store-readiness` skill checks permissions against store policy.\n- Keys such as the privacy policy link and the uninstall survey link arrive\n  from their own steps. Leave them out until those pages exist.\n"
            }
        ]
    },
    {
        "name": "extension-security-scan",
        "frontmatter": {
            "name": "extension-security-scan",
            "description": "Scan a browser extension's own package before the stores see it and work through the result: run the pre-publish security scan, read the findings with their files and lines, fix the critical and high ones, rescan the rebuilt package, run the store-compliance check, and set up CI so every push is packaged, installed and recorded as evidence. Use when the user asks \"scan my extension\", \"is my extension safe to publish\", \"fix the scan findings\", \"why did the scan flag this\", \"check my package against store policy\", or \"add the checks to GitHub Actions\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-security-scan\ndescription: >\n  Scan a browser extension's own package before the stores see it and work\n  through the result: run the pre-publish security scan, read the findings with\n  their files and lines, fix the critical and high ones, rescan the rebuilt\n  package, run the store-compliance check, and set up CI so every push is\n  packaged, installed and recorded as evidence. Use when the user asks \"scan my\n  extension\", \"is my extension safe to publish\", \"fix the scan findings\", \"why\n  did the scan flag this\", \"check my package against store policy\", or \"add the\n  checks to GitHub Actions\".\n---\n\n# Extension security scan\n\nFind what a store reviewer or a security scanner would find in the package\nwhile it can still be fixed, then make the result repeatable in CI.\n\nOn the Build Map this skill covers the steps `scan`, `fix`, `selfCheck` and\n`ci`. Report them with the `extension-build` skill's commands.\n\n## Running commands\n\nBefore running any `npx @extenshi/cli@latest` command, tell the user what it\ndoes and what leaves their machine, show the exact command, and wait for their\ngo-ahead. For the scan say three things plainly: the package is uploaded to\nExtenshi for analysis, it needs the author's Extenshi account, and each run\nspends one scan from that account. Signing in is the author's step\n(https://docs.extenshi.io/developers/cli#authenticate). `get_credit_balance`\nshows what is left.\n\n## Scan (`scan`)\n\n1. **Scan the package that will ship.** Build it with `extenshi package`, so\n   the bytes are the same on every machine, and pass that zip:\n\n   ```bash\n   npx @extenshi/cli@latest scan <chrome package>.zip --report scan.md --no-open\n   ```\n\n   Without `--no-open` the HTML report opens in the browser. `--json` prints the\n   raw result. With the local MCP server, `scan_extension` runs the same scan.\n2. **Read the report.** It has the security findings and four more sections:\n   - **Store compliance:** manifest signals stores reject or delist for.\n   - **Store review prediction:** what is likely rejected, what triggers a slow\n     review, what disables the extension on update.\n   - **Store listing:** the listing rules over the name and short description in\n     every locale the package ships. Add `--listing <file>` to include the full\n     description.\n   - **Platform advisories:** code that a recent or upcoming browser release\n     changes, with file and line.\n\n   The Markdown report (`--report`) adds **declared versus used permissions**,\n   each `USED`, `NOT USED` or `CANNOT VERIFY` with the call sites, and the\n   justification questions the store will ask.\n3. **Record it for the release**, when the directory is bound to a Dojo project:\n   add `--evidence`. The record is tied to the zip's sha256 and fails on a\n   likely store rejection or any critical finding.\n\n## Fix findings (`fix`)\n\n1. **Order by severity.** Critical and high first; then what the review\n   prediction marks as a rejection.\n2. **Open every finding.** Read the code at the file and line and decide which\n   it is:\n   - **Real:** fix the code. Typical fixes are removing remotely loaded code,\n     replacing `eval` and `innerHTML` with safe equivalents, narrowing a match\n     pattern, dropping a `NOT USED` permission, updating or removing a bundled\n     library with a known vulnerability.\n   - **In a bundled library:** update the library, or replace it. Do not edit\n     minified vendor code by hand.\n   - **Not applicable:** the scanners are heuristics and over-flag some benign\n     code. Write down why it does not apply, with the file and line, and show\n     the author. Accepting a finding is their decision.\n3. **Recheck locally before spending another scan.** Two commands are free, run\n   on the machine and cover the compliance and advisory sections:\n\n   ```bash\n   npx @extenshi/cli@latest review-risk ./dist/my-extension.zip\n   npx @extenshi/cli@latest advise .\n   ```\n\n4. **Rebuild, repackage, rescan.** Group the fixes so one rescan covers them.\n   A rebuilt package has a new sha256, so evidence recorded for the earlier zip\n   no longer counts; rerun the checks that record evidence on the new one.\n5. **Stop when** no critical or high finding remains, or each remaining one has\n   the author's written acceptance.\n\n## Compliance self-check (`selfCheck`)\n\nThe same policy checks, read as a reviewer would:\n\n```bash\nnpx @extenshi/cli@latest review-risk ./dist/my-extension.zip --listing CHROMEWEBSTORE.md\n```\n\nRun it once per target store (`--store chrome`, `firefox` or `edge`). It runs\nlocally and uploads nothing. Fix what it predicts as a rejection in the manifest\nor the listing: an unjustified permission, a missing privacy policy for the data\nthe permissions imply, a listing that names another product or stuffs keywords.\nThe `extension-store-readiness` skill covers these fixes in detail.\n\n## CI evidence (`ci`)\n\nThe goal is two workflows: one that packages each browser build and installs it\nin Chromium, Edge and Firefox on every push, and a follow-up that records a\ngreen run as evidence for the release.\n\n1. **Start from the generated files.** A project scaffolded by Extenshi already\n   has `.github/workflows/extenshi-verify.yml` and `extenshi-evidence.yml`. In\n   another repository, write them from the guide:\n   https://docs.extenshi.io/developers/project-sync#ci-evidence-let-the-pipeline-attest-its-own-runs\n2. **Bind the repository to the project** (`project bind`), so a run can be\n   matched to it.\n3. **The repository secret is the author's step.** The evidence workflow reads\n   one Actions secret. The guide above says where it is created and where it is\n   stored; ask the author to do both, and do not put its value in a file, a\n   commit or the conversation.\n4. **Record from the follow-up workflow, not from a build step.** The server\n   accepts only a run that has completed, and checks through GitHub that the run\n   exists in the bound repository at that commit with that conclusion.\n5. **Try it without sending:** `evidence ingest <package> … --dry-run` validates\n   the options and prints the request it would make.\n6. **Wait for the first green run** and confirm the record:\n   `npx @extenshi/cli@latest release status --browser chrome --json`, or\n   `get_release_readiness`.\n\nA scan in CI is optional and spends a scan per run; the guide at\nhttps://docs.extenshi.io/developers/cli-github-actions shows how to gate a\nrelease on it.\n\n## How to report\n\n- The package scanned: file name and sha256.\n- Findings by severity, each with file, line, the decision (fixed, in a\n  library, not applicable) and the reason.\n- What changed between scans.\n- The compliance result per store.\n- CI: the workflows added, the first run's result, and what waits on the\n  author.\n\n## Stay accurate\n\n- A clean scan is not a guarantee of safety or of store approval. Say what the\n  scan covers: automated heuristics over the package.\n- Do not mark a finding accepted for the author, and do not silence it by\n  renaming or obfuscating code.\n- Never rescan in a loop to see whether a finding goes away. Each run costs the\n  author a scan.\n- A red CI run records failed evidence. Fix the cause; do not skip the\n  recording step to keep the status green.\n"
            }
        ]
    },
    {
        "name": "extension-store-readiness",
        "frontmatter": {
            "name": "extension-store-readiness",
            "description": "Get a browser extension ready for store review: trim the manifest to the permissions it needs, predict what the Chrome Web Store, Firefox Add-ons or Edge Add-ons will reject or send to slow manual review, check the code against recent browser changes, prepare permission justifications and the privacy practices answers, and clean up the listing text. Use when the user asks \"will my extension pass review\", \"why was my extension rejected\", \"check my manifest\", \"are my permissions too broad\", \"prepare my extension for the Chrome Web Store\", \"submit my add-on to AMO\", or \"review my store listing\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-store-readiness\ndescription: >\n  Get a browser extension ready for store review: trim the manifest to the\n  permissions it needs, predict what the Chrome Web Store, Firefox Add-ons or\n  Edge Add-ons will reject or send to slow manual review, check the code against\n  recent browser changes, prepare permission justifications and the privacy\n  practices answers, and clean up the listing text. Use when the user asks \"will\n  my extension pass review\", \"why was my extension rejected\", \"check my\n  manifest\", \"are my permissions too broad\", \"prepare my extension for the\n  Chrome Web Store\", \"submit my add-on to AMO\", or \"review my store listing\".\n---\n\n# Extension store readiness\n\nRun a pre-submission pass on an extension the user is building. It combines the\nExtenshi connector (reference data on permissions, catalog peers, docs) with the\n`@extenshi/cli` checks that run locally, so the build never leaves the machine.\n\n## Running commands\n\nBefore running any `npx @extenshi/cli@latest` command, tell the user what it does\nand what leaves their machine, show the exact command, and wait for their go-ahead.\nRun only the commands the task needs. If the user prefers to run them, print the\ncommands and work from the output they paste back.\n\n## Inputs\n\nAn unpacked extension folder or a built `.zip`, plus the store listing text if it\nexists. Ask which browsers are targeted. If there is no package yet, build one\nfirst (`extenshi package <dir> --browser chrome,edge,firefox` produces one zip\nper browser) or ask the user to.\n\n## Workflow\n\n1. **Read the manifest.** List every entry in `permissions`,\n   `optional_permissions` and `host_permissions`, plus content-script matches and\n   any `web_accessible_resources`. Note the manifest version.\n2. **Find the minimum permissions.** Call `list_extension_templates` (free, no\n   account). It states the permissions each extension shape requires (popup,\n   side panel, page enhancer, in-page assistant), the cross-browser rules (for\n   example Chromium `side_panel` versus Firefox `sidebar_action`), and that a\n   manifest must not name a file the package lacks. Compare and propose changes:\n   drop unused permissions, prefer `activeTab` over broad host access, move\n   rarely used permissions to `optional_permissions`, narrow `matches` patterns.\n   Store review flags padded permissions, and adding a permission in an update\n   can disable the extension for existing users.\n3. **Compare with peers (optional).** Use `search_extensions` for the same kind\n   of extension to see what the leaders request and how they are rated. Use it to\n   sanity-check, not to copy.\n4. **Run the local review prediction:**\n\n   ```bash\n   npx @extenshi/cli@latest review-risk ./dist/my-extension.zip\n   ```\n\n   It reads the manifest and the listing text on the user's machine and reports\n   what is likely to be **rejected**, what triggers **slow manual review**, and\n   what causes **user attrition** on update. Each finding names the store policy\n   it predicts against. Add `--listing <file>` (JSON or a `CHROMEWEBSTORE.md`) so\n   the full description is checked too, and `--json` for machine-readable output.\n   For an extension that is already published, `--extension-id <catalog id>`\n   also diffs the new manifest against the live one (this sends the id, not the\n   build).\n\n   One run predicts one store. The default is the Chrome Web Store; run it\n   again with `--store firefox` or `--store edge` for each other store the\n   extension ships to. The store sets the listing and review-process findings,\n   the name and description length limits, and the published manifest the diff\n   uses.\n5. **Fix, then re-run.** Work through findings in order: rejections first, then\n   slow-review triggers, then attrition. Change the manifest or listing, rebuild\n   and run `review-risk` again until the remaining findings are understood and\n   accepted.\n6. **Check the code against browser changes:**\n\n   ```bash\n   npx @extenshi/cli@latest advise .\n   ```\n\n   It matches the source (or a `.zip`, `.crx`, `.xpi`) against the list of\n   Chrome, Edge and Firefox changes at https://cli.extenshi.io/changes and\n   labels each match `BREAKS`, `BEHAVIOR CHANGE`, `DEPRECATED` or `OPPORTUNITY`,\n   with the file and line, the browser version and what to do. The code stays on\n   the machine; the run downloads the public list of changes (`--offline` uses\n   the list shipped with the CLI). Matching is textual, so treat each match as a\n   place to check, and the command always exits 0.\n7. **Boot the exact package (optional).** `npx @extenshi/cli@latest test smoke\n   <zip> --browser chromium` installs the package in a real browser and checks\n   that every file the manifest names is present, the service worker starts and\n   the popup, options and side-panel pages open without errors. It needs\n   Playwright in the project (`npm i -D playwright && npx playwright install\n   chromium`); `--browser firefox` needs only a Firefox binary. The\n   `extension-testing` skill covers this and scenario tests.\n8. **Prepare the store forms.**\n   - **Privacy practices:** the store derives these questions from the manifest.\n     `review-risk` predicts which data types must be declared and whether a\n     privacy policy URL is required. The answers must describe what the extension\n     actually does.\n   - **Permission justifications:** for each sensitive permission, write the\n     answer the dashboard will ask for, in the user's own words, tied to a real\n     feature. Offer wording as a starting point and tell the user to check it\n     against the code.\n   - **Listing draft:** `npx @extenshi/cli@latest generate-listing ./dist/my-extension.zip`\n     writes a `CHROMEWEBSTORE.md` from the package; `--store edge` writes\n     `EDGE.md` and `--store firefox` writes `AMO.md`. Treat it as a draft to\n     edit. `review-risk --listing` accepts any of the three.\n   - **Firefox source code:** when the Firefox build is bundled or minified, AMO\n     asks for the source. `npx @extenshi/cli@latest amo-source <project-dir>`\n     writes the source archive and a `BUILD.md` for the reviewer from the\n     committed files (dotenv files never go in), and `--verify <package>`\n     rebuilds from the archive and compares the SHA-256 with the zip to upload.\n     It does not talk to AMO.\n9. **Clean up the name and description.**\n   - Keep the name to one or two main keywords. A name that reads as a keyword\n     list (several segments split by dashes, commas or ampersands) is flagged as\n     keyword stuffing and can slow review. Put long-tail keywords in the short\n     description and the full description instead.\n   - Write the description for people. Repeating the same keyword many times is\n     also flagged.\n   - Every claim in the listing must match what the extension does.\n10. **Hand off related work.** The `extension-icon-design` skill covers the\n   icon and the store listing artwork, `extension-localization` the `_locales`\n   translations, and `extension-testing` the store screenshots.\n   `npx @extenshi/cli@latest scan ./dist/my-extension.zip` adds a security\n   scan of the package. It **uploads the package** to the Extenshi scan service,\n   needs an Extenshi account and uses one scan from the allowance, so only offer\n   it and run it when the user agrees. `search_docs` answers exact CLI flags and publishing steps.\n\n## How to report\n\n- **Blockers:** what will be rejected, with the manifest or listing line and the fix.\n- **Likely slow review:** the trigger and how to remove or justify it.\n- **Update risks:** anything that could disable the extension for current users.\n- **Forms:** predicted privacy declarations and drafted permission justifications.\n- **Next commands:** the exact commands to re-run after the fixes.\n\n## Stay accurate\n\n- The prediction is a set of heuristic checks against published store policies.\n  It does not guarantee approval and it does not replace reading the policies or\n  testing the extension in each target browser. Say so when reporting.\n- Store rules change. Re-run the check on every release, not only the first.\n- Do not write justifications or privacy answers for behaviour the extension does\n  not have, and do not suggest hiding functionality from the reviewer.\n- Firefox and Edge have their own requirements (for example a Firefox add-on id\n  under `browser_specific_settings`). `review-risk` predicts Chrome Web Store\n  review unless `--store firefox` or `--store edge` is passed, so a clean Chrome\n  run says nothing about the other two stores.\n- `advise` finds calls by their text. A call through an alias is missed, and a\n  call that is already guarded is still listed.\n"
            }
        ]
    },
    {
        "name": "extension-surfaces",
        "frontmatter": {
            "name": "extension-surfaces",
            "description": "Write the working parts of a Manifest V3 browser extension so they survive real use: a service worker that keeps no state in memory, messaging between surfaces, a versioned storage schema, content scripts that inject once and clean up, a popup and options page that work from the keyboard, a side panel, and unit tests for handlers, migrations and page hooks. Use when the user asks \"write the background script\", \"my service worker loses its state\", \"the content script runs twice\", \"build the popup\", \"add a settings page\", \"add a side panel\", or \"write tests for my extension\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-surfaces\ndescription: >\n  Write the working parts of a Manifest V3 browser extension so they survive\n  real use: a service worker that keeps no state in memory, messaging between\n  surfaces, a versioned storage schema, content scripts that inject once and\n  clean up, a popup and options page that work from the keyboard, a side panel,\n  and unit tests for handlers, migrations and page hooks. Use when the user\n  asks \"write the background script\", \"my service worker loses its state\",\n  \"the content script runs twice\", \"build the popup\", \"add a settings page\",\n  \"add a side panel\", or \"write tests for my extension\".\n---\n\n# Extension surfaces\n\nImplementation rules for each surface of a Manifest V3 extension. Most failures\nin the field come from four causes: the service worker was stopped and lost its\nstate, a content script ran twice or outlived its extension, a page called an\nAPI the browser does not have, or a surface trusted a message it should have\nchecked.\n\nOn the Build Map this skill covers the steps `bg`, `content`, `popup`,\n`options`, `sidepanel` and `tests`. Build only the surfaces the project chose,\nand report each step with the `extension-build` skill's commands.\n\n## Service worker (`bg`)\n\n- **Register every listener at the top level**, synchronously, on each start.\n  A listener added inside a callback or after an `await` is missing when the\n  browser wakes the worker for that event.\n- **Keep no state in variables.** The browser stops an idle worker after about\n  30 seconds and starts it again for the next event. Read what a handler needs\n  from `chrome.storage` and write results back.\n- **Use `chrome.alarms` for anything later than a few seconds.** A `setTimeout`\n  or `setInterval` dies with the worker.\n- **Set up in `runtime.onInstalled`:** defaults on `install`, storage migrations\n  on `update`.\n- **No DOM and no `window`.** Parse or render in an extension page or an\n  offscreen document.\n- **Firefox** runs the same file as a background script. Keep the code free of\n  service-worker-only globals, or guard them.\n\n**Message bus.** Define one message shape, for example `{ type, payload }`, and\none handler that switches on `type`.\n\n- A handler that answers asynchronously returns `true` and calls `sendResponse`\n  later, or returns a promise where the browser supports it. Without that the\n  sender gets `undefined`.\n- Check the sender: `sender.id` is the extension's own id, and for a request\n  only extension pages may make, `sender.url` starts with the extension origin.\n  A content script runs in a page the extension does not control, so validate\n  what it sends like any outside input.\n- Send to a tab with `chrome.tabs.sendMessage` and expect it to fail when the\n  tab has no content script; catch the error.\n\n**Storage schema.** Write the keys and their shapes down and give the schema a\nversion number. `storage.sync` has small quotas (about 8 KiB per item); use\n`storage.local` for anything larger. The optional `@extenshi/storage` package\nkeeps one record per key with a `schemaVersion`; it needs the `storage`\npermission, takes records up to 16 KiB, and belongs in the service worker.\n\n## Content script (`content`)\n\n- **Register it for the match patterns chosen for the target sites** and no\n  wider. For a feature started by a click, inject with\n  `chrome.scripting.executeScript` under `activeTab`.\n- **Inject once.** Guard with a marker on the page so a second injection (an\n  update, a re-click, a single-page navigation) does nothing.\n- **Follow page changes** with a `MutationObserver` scoped to the node the\n  feature needs, not the whole document, and react to navigation in single-page\n  apps.\n- **Clean up.** Disconnect observers, remove listeners and injected nodes when\n  the feature turns off. After an extension update the old script keeps running\n  without a working `chrome.runtime`: catch the \"Extension context invalidated\"\n  error and stop.\n- **Isolate the UI.** Put injected interface in a shadow root so page styles do\n  not leak in and the extension's do not leak out.\n- **Treat page content as untrusted.** Build nodes with `textContent` and DOM\n  methods, never `innerHTML` with page data. Do not pass page data to `eval` or\n  load code from a server: stores reject remotely hosted code.\n- **Keep privileged work in the worker.** The script asks over the message bus;\n  it holds no keys and no data it does not render.\n\n## Popup (`popup`)\n\n- The popup closes when it loses focus and loses its state. Load state from the\n  worker or storage on open and save every change at once.\n- Scripts live in files. The extension CSP blocks inline scripts and inline\n  event handlers.\n- Render first, then load data; show the last known state instead of a spinner\n  where one exists.\n- **Keyboard and focus:** every control is reachable with Tab in visual order,\n  the first useful control has focus on open, focus is visible, and each input\n  has a label. Use `button` and `a` elements for things that are clicked.\n- Chrome caps a popup at 800 by 600 pixels. Design for a narrow column.\n\n## Options page (`options`)\n\n- Declare it with `options_ui` and decide between an embedded page and\n  `open_in_tab`.\n- One settings schema, shared with the worker: defaults, types and limits in one\n  module.\n- Validate on input and on save; show the error next to the field.\n- Save to storage and let other surfaces follow with `storage.onChanged`, so a\n  change applies without a reload.\n\n## Side panel (`sidepanel`)\n\n- Chromium: `side_panel.default_path` and the `sidePanel` permission. To open\n  it from the toolbar button, call\n  `chrome.sidePanel.setPanelBehavior({ openPanelOnActionClick: true })` in the\n  worker.\n- Firefox: `sidebar_action` with the same page. Detect the API before calling\n  it, so one code base serves both.\n- The panel stays open across tabs. Follow `tabs.onActivated` and\n  `tabs.onUpdated` when its content depends on the page.\n\n## Unit tests (`tests`)\n\n- Keep logic in pure functions that take data and return data; the files that\n  call `chrome.*` stay thin. Test the functions directly.\n- **Handlers:** each message type, with a valid payload, a malformed one and a\n  sender that must be refused.\n- **Storage migrations:** from each earlier schema version to the current one,\n  and from empty storage.\n- **Content hooks:** against saved HTML fixtures of the target pages, including\n  a second run on the same document.\n- Use a small fake of the `chrome` APIs the code calls. `@extenshi/storage`\n  accepts a `MemoryArea` in tests.\n- Run the project's test command and report the real result. A check in a real\n  browser (the package installs, the popup opens, the content script injects)\n  belongs to the `extension-testing` skill.\n\n## How to report\n\n- Per surface: the files written and what each one handles.\n- The message types and the storage keys, as a short table.\n- What was tested and how: unit tests run, pages opened in a browser, target\n  sites tried.\n- Behaviour not verified, for example a worker restart or a denied permission,\n  named as not verified.\n\n## Stay accurate\n\n- Test on the real target sites and across a worker restart before calling a\n  surface done. A surface that works right after loading the unpacked folder\n  has not been through a restart.\n- API availability differs between Chrome, Edge and Firefox and between\n  versions. Check the browser's documentation for an API before relying on it;\n  the `extension-browser-changes` skill finds calls that a release changed.\n- Do not add a permission to make a call work without telling the author: the\n  manifest is theirs to approve.\n"
            }
        ]
    },
    {
        "name": "extension-testing",
        "frontmatter": {
            "name": "extension-testing",
            "description": "Test a packaged browser extension in real browsers with the Extenshi CLI: check that the exact zip installs and boots in Chromium, Edge and Firefox, run scenario tests against its popup, options and side panel, and shoot the store screenshots per locale. Use when the user asks to \"test my extension\", \"does my extension load in Firefox\", \"smoke test the build\", \"write tests for my extension popup\", \"test against Chrome beta\", or \"make the store screenshots\".\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-testing\ndescription: >\n  Test a packaged browser extension in real browsers with the Extenshi CLI:\n  check that the exact zip installs and boots in Chromium, Edge and Firefox,\n  run scenario tests against its popup, options and side panel, and shoot the\n  store screenshots per locale. Use when the user asks to \"test my extension\",\n  \"does my extension load in Firefox\", \"smoke test the build\", \"write tests for\n  my extension popup\", \"test against Chrome beta\", or \"make the store\n  screenshots\".\n---\n\n# Extension testing\n\nProve that the package the user is about to upload works in a browser. The\ncommands install the exact zip in a real browser on the user's machine and\nreport what the browser itself says. They are free and need no Extenshi\naccount.\n\n## Running commands\n\nBefore running a command, say what it does, show it and wait for the user's\ngo-ahead. The package is not uploaded. The commands start a local browser and\nmay download a browser build into a cache outside the project\n(`~/Library/Caches/extenshi/browsers` or `~/.cache/extenshi/browsers`).\nScenarios make whatever network requests the extension itself makes. `npx`\ndownloads the CLI from the npm registry.\n\n## What is needed\n\n- A built extension: a store zip, the `extenshi-packages.json` that\n  `npx @extenshi/cli@latest package <dir> --browser chrome,edge,firefox`\n  writes, or an unpacked build folder with `manifest.json` at its root.\n- For Chromium and Edge, Playwright in the project. It is not bundled with the\n  CLI, so ask before installing it:\n  `npm i -D playwright && npx playwright install chromium`\n  (`npx playwright install msedge` for Edge).\n- For Firefox, only a Firefox binary on the usual install paths or in `PATH`\n  (`--firefox-bin` or `FIREFOX_BIN` otherwise).\n\n## 1. Smoke test: does the package boot?\n\n```bash\nnpx @extenshi/cli@latest test smoke .extenshi/packages/extenshi-packages.json --browser chromium\nnpx @extenshi/cli@latest test smoke .extenshi/packages/extenshi-packages.json --browser firefox\n```\n\nIt checks that every file the manifest names is in the zip, the browser loads\nthe extension and its service worker (or Firefox background) starts, the\nbrowser reports no manifest errors, and the popup, options and side-panel pages\nopen without uncaught errors or `console.error`. The exit code is 1 when a\ncheck fails; `--json` prints the result as JSON.\n\nContent scripts are checked only on pages you name:\n\n```bash\nnpx @extenshi/cli@latest test smoke dist --browser chromium --site http://127.0.0.1:4178/fixture.html\n```\n\n`--site` is repeatable and takes http or https pages. It passes when every\nscript of each matching `content_scripts` entry was injected and the extension\nraised no errors there. Serve local fixtures from a static server on\n`127.0.0.1`; content scripts do not run on `file://`. `--site` is not supported\non Firefox yet.\n\nTo test a browser version other than the installed one, add `--channel beta`\n(`stable`, `beta`, `dev`, `canary`; Firefox: `stable`, `beta`, `dev`, `esr`) or\n`--version 157` (a major version; not for Edge).\n\n## 2. Scenario tests: do the features work?\n\nScenarios live in `extenshi.tests.json` next to the build:\n\n```json\n{\n  \"format\": \"extenshi.tests\",\n  \"version\": 1,\n  \"scenarios\": [\n    {\n      \"id\": \"popup-dark-toggle\",\n      \"title\": \"Dark mode toggle restyles the popup\",\n      \"open\": \"popup\",\n      \"steps\": [\n        { \"click\": \"#dark\" },\n        { \"expectChanged\": true },\n        { \"expectStorage\": { \"key\": \"theme\", \"equals\": \"dark\" } },\n        { \"expectNoConsoleError\": true }\n      ]\n    }\n  ]\n}\n```\n\n```bash\nnpx @extenshi/cli@latest test run .extenshi/packages/extenshi-packages.json --browser chromium\n```\n\n- `open` is `popup`, `options`, `side_panel`, `sidebar`, `page:<path in the\n  extension>`, `fixture:<file>` or `url:https://…`.\n- Action steps: `click`, `hover`, `type` + `text`, `press`, `scroll`, `wait`,\n  `waitFor`, `storage`, `clickControl` (by visible label). Checks:\n  `expectText`, `expectNoText`, `expectControl`, `expectStorage`,\n  `expectChanged`, `expectRendered`, `expectNoConsoleError`,\n  `expectNoRequestTo`, `expectManifest`.\n- `--only <id>` runs one scenario, `--out <dir>` saves the result and images.\n- A field the CLI does not know is refused with its path. Get the full format\n  from `search_docs` or https://docs.extenshi.io/developers/cli#extenshi-test-run\n  before using a step you have not seen above.\n\nWrite scenarios from what the listing promises and what users do, one promise\nper scenario. Two commands help you start:\n\n- `npx @extenshi/cli@latest test scenarios draft <package> --browser chromium`\n  opens the extension's pages, records their controls in `.extenshi/recon.json`,\n  presses a few labelled controls and writes `extenshi.tests.draft.json`.\n- `npx @extenshi/cli@latest test scenarios prompt <package>` prints a brief for\n  writing `extenshi.tests.agent.json` from that inventory.\n\nBoth files run as **not written by the author**: such scenarios need an\n`evidence` quote, cannot use `eval`, and refuse controls whose label looks\ndestructive (delete, pay, send). Show the scenarios to the user. The ones they\naccept are copied into their own `extenshi.tests.json`; do not copy them\nyourself without asking.\n\n## 3. Store screenshots per locale\n\n```bash\nnpx @extenshi/cli@latest screenshots ./dist --scenes store/scenes.json --locales en,de,ja\n```\n\nA scenes file lists what to open and which steps to run before each capture:\n\n```json\n{\n  \"version\": 1,\n  \"scenes\": [\n    { \"name\": \"popup\", \"open\": \"popup\", \"steps\": [{ \"click\": \"#enable\" }, { \"wait\": 300 }] },\n    { \"name\": \"options\", \"open\": \"options\", \"crop\": { \"selector\": \"main\", \"padding\": 24 } }\n  ]\n}\n```\n\nThe command switches the browser UI language for each locale and stops when\n`chrome.i18n` does not report that locale, so it never writes English\nscreenshots labelled German. It writes 1280×800 PNGs (accepted by all three\nstores; `--small` for each store's smaller size) under\n`store-screenshots/<store>/<locale>/` with a `screenshots.json` of hashes. The\nChrome Web Store takes at most 5 screenshots per locale and Edge at most 6. The\nbuild is never modified. Show the screenshots to the user before they go into a\nstore dashboard; choosing them is the user's decision.\n\n## How to report\n\n- Per browser: passed, failed or not run, with the browser version the result\n  names.\n- Each failed check or differing step, quoted from the output, with the file\n  it points at.\n- What was not covered (below), so a pass is not read as more than it is.\n\n## Stay accurate\n\n- A smoke pass means the package boots without errors. Pages are opened, not\n  clicked through, and the popup opens as a tab rather than from the toolbar.\n- A differing scenario step is an observation. It can come from the extension,\n  the scenario, the page or the browser; read the step before blaming the code.\n- On Firefox most steps are not implemented yet. A scenario that uses one is\n  reported `unsupported`, never `passed`, and a passed Firefox result attests\n  only that the pages opened without errors.\n- The Chrome leg runs on Chromium, because Google Chrome ignores\n  `--load-extension`. Firefox screenshots are rendered in Chromium from\n  the same build.\n- These commands do not replace using the extension by hand in each target\n  browser before a release.\n"
            }
        ]
    },
    {
        "name": "extension-vetting",
        "frontmatter": {
            "name": "extension-vetting",
            "description": "Check whether a browser extension looks safe to install, using the Extenshi catalog: publisher and popularity, permissions in plain language, security score, user reviews, and safer alternatives. Use when the user asks \"is this extension safe\", \"should I install X\", \"what does this extension have access to\", \"is this Chrome/Firefox/Edge extension legit\", or pastes a store link and wants a second opinion before installing.\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: extension-vetting\ndescription: >\n  Check whether a browser extension looks safe to install, using the Extenshi\n  catalog: publisher and popularity, permissions in plain language, security\n  score, user reviews, and safer alternatives. Use when the user asks \"is this\n  extension safe\", \"should I install X\", \"what does this extension have access\n  to\", \"is this Chrome/Firefox/Edge extension legit\", or pastes a store link and\n  wants a second opinion before installing.\n---\n\n# Extension vetting\n\nGive a person an evidence-based read on one extension before they install it.\nEverything comes from the Extenshi connector (`search_extensions`,\n`get_extension`, `get_security`, `get_reviews`). Nothing is installed, run or\nread from the user's browser.\n\n## Workflow\n\n1. **Identify the extension.**\n   - If the user gave a store link, take the id from it and note the store:\n     `chromewebstore.google.com/detail/<name>/<id>` is Chrome,\n     `microsoftedge.microsoft.com/addons/detail/<name>/<id>` is Edge,\n     `addons.mozilla.org/.../addon/<slug>` is Firefox. Chrome and Edge ids look\n     identical, so always pass `store` with a Chrome or Edge `store_id`.\n   - Otherwise call `search_extensions` with the name as `query`, `limit: 5`, and\n     confirm the match with the user when several listings share a name. Copycat\n     names are common; compare publisher and install counts before choosing.\n2. **Read the listing.** `get_extension` returns publisher, ratings per store,\n   install counts, categories, last update and the security badge. Note how long\n   the extension has existed, how recently it was updated, and how many people use it.\n3. **Read the security data.** `get_security` returns the safety score (0-100,\n   higher is safer, the same number the website shows), the risk category\n   (`NONE`, `LOW`, `MEDIUM`, `HIGH`, `CRITICAL`), finding counts by severity, the\n   top grouped findings and an approximate **install-dialog preview** built from\n   the permissions the store lists. It reads existing results and does not start\n   a new scan. It costs 3 read credits; `get_credit_balance` shows what is left.\n4. **Translate the permissions.** Explain each permission in the install-dialog\n   preview in one plain sentence and say whether it fits the extension's stated\n   purpose. A page-translation tool reading all sites is expected; a PDF viewer\n   asking for browsing history is not. Broad access such as all-sites or\n   `<all_urls>`, `webRequest`, `cookies`, `history`, `clipboardRead` and\n   `nativeMessaging` deserves an explicit mention.\n5. **Sample the reviews.** `get_reviews` returns review excerpts for Firefox and\n   Edge listings. For Chrome it returns only the store-level aggregate and a link\n   to the reviews tab, because Chrome review text cannot be redistributed. Say\n   which case applies. Look for repeated complaints (ads injected, settings\n   hijacked, sudden ownership change, paywall added after install) and for\n   review dates clustered in a short window.\n6. **Offer alternatives when the picture is mixed.** Search the same category\n   with `search_extensions`, for example `risk: [\"NONE\",\"LOW\"]`, `minRating: 4`,\n   `sortBy: \"safety\"`, and present two or three with the same facts.\n\n## How to report\n\nLead with a one-line conclusion, then the evidence. Suggested shape:\n\n- **Bottom line:** `Looks fine`, `Install with care`, or `Look for an alternative`,\n  in one sentence with the main reason.\n- **Who and how popular:** publisher, users, rating, last update, store(s).\n- **Security data:** safety score, risk category, finding counts, date of the last scan.\n- **What it can access:** the permissions, in plain language.\n- **What users say:** the pattern in the reviews, or the aggregate for Chrome.\n- **If unsure:** what would change the answer.\n\n## Stay accurate\n\n- The safety score and findings are automated estimates of risk, not a verdict on\n  the publisher's intent. Many findings are ordinary behaviour in benign code, so\n  never present a finding count as proof of wrongdoing, and never call an\n  extension \"safe\" or \"malicious\" outright. Say what the data shows.\n- An extension with no score has **not been scanned yet**. That is not the same\n  as safe; say so.\n- The data is a snapshot from the last scan. A later update can change behaviour.\n- Do not invent facts the tools did not return (owner history, revenue, private\n  data practices). If a field is missing, say it is missing.\n- Never claim to have opened, run or tested the extension.\n"
            }
        ]
    },
    {
        "name": "installed-extensions-audit",
        "frontmatter": {
            "name": "installed-extensions-audit",
            "description": "Audit the browser extensions a person already has installed: look up the safety score and risk category of every one in a single batch and produce a ranked list of what to review first. Use when the user asks to \"audit my extensions\", \"check what I have installed\", \"which of my extensions are risky\", \"clean up my browser extensions\", or shares a list of extension ids or names.\n"
        },
        "files": [
            {
                "path": "SKILL.md",
                "text": "---\nname: installed-extensions-audit\ndescription: >\n  Audit the browser extensions a person already has installed: look up the\n  safety score and risk category of every one in a single batch and produce a\n  ranked list of what to review first. Use when the user asks to \"audit my\n  extensions\", \"check what I have installed\", \"which of my extensions are risky\",\n  \"clean up my browser extensions\", or shares a list of extension ids or names.\n---\n\n# Installed extensions audit\n\nTurn \"what is in my browser?\" into a short, ranked to-do list. A whole batch of\nup to 40 extensions costs one read credit, so a normal browser profile is one or\ntwo calls.\n\n## Step 1: get the list of extension ids\n\nOnly the ids leave the machine. Ask the user for one of these:\n\n- **From a terminal, all browsers at once:** `npx @extenshi/guard@latest list`\n  reads the browser profiles on the machine (Chrome, Edge, Brave, Vivaldi,\n  Opera, Arc, Chromium, Firefox and others) and prints every installed\n  extension per browser and profile; `--json` gives the same as JSON. It runs\n  locally, needs no account and sends nothing. Explain that before running it,\n  and take the ids from its output.\n- **Chrome:** open `chrome://extensions`, turn on **Developer mode**, and copy\n  the **ID** shown under each extension.\n- **Edge:** the same on `edge://extensions` with **Developer mode** on.\n- **Firefox:** open `about:support` and copy the id of each entry in the\n  **Extensions** section.\n- **Names only:** if the user only has names, find each with `search_extensions`,\n  confirm the match, and use its store id. Say which ones you could not match.\n\nIf the user prefers to script it, the Chrome `management` API can list installed\nextensions; a working example is in the `samples/` folder of\nhttps://github.com/Extenshi-io/extenshi-io.\n\n## Step 2: look them up in one batch\n\nCall `get_risk_by_store_ids` with `extensions: [{ store_id, store }, ...]`, at\nmost 40 per call. `store` (`CHROME`, `FIREFOX` or `EDGE`) is required for every\nentry because Chrome and Edge ids share one format. For more than 40, make\nseveral calls. Alternatively the user can run this from a terminal, which reads\n`store:id` lines from a file. Prefer the connector; offer this route only if the\nuser wants it, and explain what it sends (the ids) before running it:\n\n```bash\nnpx @extenshi/cli@latest risk --file ids.txt\n```\n\nThe response gives, per extension, the safety score (0-100, higher is safer), the\nrisk category, severity counts, the last scan date and the catalog URL. Ids with\nno catalog listing come back under `notInCatalog`, and extensions without a score\nhave `scanned: false`.\n\n## Step 3: rank and explain\n\nSort into three groups and present them as a table (name, store, score, category):\n\n1. **Review first:** risk category `HIGH` or `CRITICAL`, or the lowest scores.\n2. **Worth a look:** `MEDIUM`, plus anything not updated in over a year.\n3. **No flags:** `NONE` or `LOW`.\n\nThen list separately, without judging them: extensions that were **not scanned**\nand ids that are **not in the catalog**. Neither means safe.\n\n## Step 4: go deeper on the top few\n\nFor the two or three highest-risk entries, call `get_security` (3 read credits\neach) and explain the permissions and top findings in plain language. Apply the\n`extension-vetting` skill's reporting rules. Ask the user whether they still use\neach one; an unused extension with broad permissions is the easiest win.\n\n## What to recommend\n\n- Suggest **reviewing** each flagged extension and removing the ones the user no\n  longer needs. Do not tell the user to delete everything above a threshold.\n- Point to `search_extensions` for a lower-risk alternative when a flagged\n  extension is one they rely on.\n- For removing or disabling several extensions in one go, mention\n  `npx @extenshi/guard@latest scan`. It is a guided flow in the user's own\n  terminal: it asks for consent, sends a minimal inventory (store ids, versions\n  and install details, never names or browsing data) to their Extenshi account,\n  shows the flagged ones and removes\n  or disables the ones the user picks; `npx @extenshi/guard@latest undo` puts\n  them back. It needs an Extenshi sign-in. Do not run it for the user.\n- Remind them that a low score is an automated estimate. It is a reason to look\n  closer, not a verdict on the publisher.\n\n## Stay accurate\n\n- Do not claim anything about extensions that were not looked up.\n- A score reflects the last scan; extensions update. Suggest repeating the audit\n  every few months.\n- Mention that sideloaded or company-managed extensions may not be in the catalog.\n"
            }
        ]
    }
];
//# sourceMappingURL=skills.js.map