firefox-scaffold

firefox-scaffold is a command for Claude Code from acaprino/daodan. It costs 70 tokens per session (1,613 once invoked), scanned A, original, MIT.

A generator for a new Firefox WebExtension, including its manifest, folders, scripts, development configuration, and a working popup. A WebExtension is a browser add-on built with web technologies.

In plain words
What is it for?
Use it to scaffold a new Firefox extension with Manifest V3, optional sidebar, content script, or options page support, and settings prepared for AMO submission.
Why use it?
It removes the repetitive setup work and creates a structure that can be loaded and tested immediately with Firefox's web-ext tool.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the browser-extensions plugin — 1 skill, 3 commands, 1 agent shipped together

Good fit Use it to scaffold a new Firefox extension with Manifest V3, optional sidebar, content script, or options page support, and settings prepared for AMO submission.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/acaprino/daodan/firefox-scaffold
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Made for: Claude Code.

Or install browser-extensions, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for firefox-scaffold

README.md
[![agentmods](https://agentmods.dev/badge/commands/acaprino/daodan/firefox-scaffold.svg)](https://agentmods.dev/commands/acaprino/daodan/firefox-scaffold)
Your own site
<a href="https://agentmods.dev/commands/acaprino/daodan/firefox-scaffold"><img src="https://agentmods.dev/badge/commands/acaprino/daodan/firefox-scaffold.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,613 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.01613
Opus 5 $0.00035 $0.00807
Sonnet 5 $0.00014 $0.00323
Haiku 4.5 $0.00007 $0.00161

Measured 7d ago against content hash 2f29f226d78a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

firefox-scaffold scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

exports/claude/plugins/browser-extensions/commands/firefox-scaffold.md · 232 lines

How it starts

The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Firefox Extension Scaffold

Scaffold a production-ready Firefox WebExtension with Manifest V3 defaults, web-ext CLI integration, and AMO-compatible structure.

CRITICAL RULES

  1. Default to Manifest V3. Firefox MV3 supports both background.scripts (event pages with DOM access, unlike Chrome) and declarativeNetRequest. Only use V2 when the user has an explicit reason (ESR Firefox target, specific APIs not in V3).
  2. Generate a working "Hello World" the user can load immediately via web-ext run. No TODO placeholders as the only content of any file.
  3. Match AMO submission requirements from day one: no binary blobs without source, no obfuscated code, valid semver, unique id in browser_specific_settings.
  4. Never hardcode user identity. If the user does not specify --author or --id, prompt them.

Procedure

1. Parse arguments

  • extension-name: required, kebab-case (becomes directory name + manifest name slugified)
  • --mv V2 | V3: manifest version (default V3)
  • --sidebar: include sidebar_action
  • --content-script: include content script template (default: include)
  • --options-page: include options UI template

If extension id not provided, ask the user for their preferred format ({extension-name}@example.com or email-style) -- AMO requires a unique ID.

2. Directory layout

<extension-name>/
  manifest.json
  src/
    background.js            (or background.ts if --ts)
    content.js               (if --content-script)
    popup/
      index.html
      popup.js
      popup.css
    options/                 (if --options-page)
      index.html
      options.js
    sidebar/                 (if --sidebar)
      index.html
      sidebar.js
  icons/
    icon-48.png
    icon-96.png
  web-ext-config.js
  .web-ext-artifacts/        (gitignored, build output)
  .gitignore
  package.json
  README.md

3. Write manifest.json (MV3)

{
  "manifest_version": 3,
  "name": "{{Extension Name}}",
  "version": "0.1.0",
  "description": "{{One-line description}}",
  "author": "{{Author from prompt}}",
  "icons": {
    "48": "icons/icon-48.png",
    "96": "icons/icon-96.png"
  },
  "browser_specific_settings": {
    "gecko": {
      "id": "{{extension-id from prompt}}",
      "strict_min_version": "128.0"
    }
  },
  "permissions": [],
  "host_permissions": [],
  "background": {
    "scripts": ["src/background.js"]
  },
  "action": {
    "default_popup": "src/popup/index.html",
    "default_title": "{{Extension Name}}"
  },
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["src/content.js"]
    }
  ]
}

Read the full file on GitHub · 232 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 232 lines · 70 tokens per session scan A 2f29f226d78a

Subscribe to this mod's changes

firefox-scaffold is a command published in the GitHub repository acaprino/daodan (8 stars, last pushed 2d ago), licensed MIT. It adds 70 tokens to every session and 1,613 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.