firefox-lint

firefox-lint is a command for Claude Code from acaprino/daodan. It costs 56 tokens per session (889 once invoked), scanned A, original, MIT.

A linting and security check for Firefox WebExtensions, which are browser add-ons built with web technologies. It runs Mozilla's official linter and checks for risky APIs, remote code, excessive permissions, and migration problems.

In plain words
What is it for?
Use it before pushing or submitting a Firefox extension to check its manifest, permissions, source code, and compatibility with Manifest V3.
Why use it?
It catches issues that could block an add-on review or create security risks but may be missed by the standard linter alone.

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 before pushing or submitting a Firefox extension to check its…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/acaprino/daodan/firefox-lint
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-lint

README.md
[![agentmods](https://agentmods.dev/badge/commands/acaprino/daodan/firefox-lint.svg)](https://agentmods.dev/commands/acaprino/daodan/firefox-lint)
Your own site
<a href="https://agentmods.dev/commands/acaprino/daodan/firefox-lint"><img src="https://agentmods.dev/badge/commands/acaprino/daodan/firefox-lint.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 889 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.00056 $0.00889
Opus 5 $0.00028 $0.00445
Sonnet 5 $0.00011 $0.00178
Haiku 4.5 $0.00006 $0.00089

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

Security

Grade A, and why

firefox-lint 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-lint.md · 101 lines

How it starts

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

Firefox Extension Lint

Comprehensive pre-publish lint for a Firefox WebExtension.

CRITICAL RULES

  1. Run web-ext lint first -- Mozilla's official linter catches AMO-blocking issues (remote code, missing icons, invalid manifest).
  2. Then scan source for anti-patterns that web-ext lint misses: eval/Function, remote script injection, wildcards in host_permissions, stored tokens in non-session storage.
  3. Report results grouped by severity matching AMO's own review criteria.

Procedure

1. Run web-ext lint

cd "$TARGET"
npx web-ext lint --pretty

Parse the output. If --json flag set, use --output=json and parse JSON.

2. Static checks beyond web-ext lint

Run these greps / AST checks against src/:

Forbidden / high-risk APIs (AMO review often rejects)

  • eval(, new Function( -- AMO blocks unless justified
  • document.write( -- CSP violation
  • innerHTML = with user-controlled input -- XSS risk
  • Remote script loading: <script src="https://..."> in extension pages
  • browser.tabs.executeScript with dynamic code strings (MV2)

Permission bloat

  • <all_urls> in host_permissions -- AMO reviewers ask "why?"
  • "tabs" permission without reading tab URL/title/favIcon (often over-requested)
  • "storage" permission without any browser.storage.* call (dead permission)
  • "webNavigation" without onBeforeNavigate / onCompleted listeners

Auth / storage anti-patterns

  • Tokens / API keys in localStorage (persists, shared with content scripts if all_frames)
  • Secrets hardcoded in source
  • browser.storage.local for secrets -- acceptable but document the trust boundary

Manifest V3 migration issues (if MV3)

  • browser.webRequest.onBeforeRequest with ["blocking"] -- MV3 removed blocking webRequest on Chrome; Firefox still supports it but discourage for cross-browser
  • Service worker / event page confusion -- Firefox MV3 uses event pages (DOM access OK), Chrome MV3 uses service workers
  • Missing declarativeNetRequest rules when webRequest is being deprecated

Read the full file on GitHub · 101 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 · 101 lines · 56 tokens per session scan A 02bd3f7a7196

Subscribe to this mod's changes

firefox-lint is a command published in the GitHub repository acaprino/daodan (8 stars, last pushed yesterday), licensed MIT. It adds 56 tokens to every session and 889 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.