extension-add

A command guide for adding a new part of a browser extension, such as a sidebar, popup, content script, or settings page.

In plain words
What is it for?
Use it to add extension features with React, Vue, Svelte, Preact, or plain JavaScript.
Why use it?
It explains how to fit the new part into the existing project and browser manifest without guessing the required files or settings.

Command

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.

agentmods
npx agentmods add commands/extensiondev/mcp/extension-add
Clone the repo
git clone --depth 1 https://github.com/extensiondev/mcp
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00018 $0.00778
Opus 5 $0.00009 $0.00389
Sonnet 5 $0.00004 $0.00156
Haiku 4.5 $0.00002 $0.00078

Measured yesterday against content hash 7e35a00e28aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

extension-add 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 yesterday.

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.

claude/commands/extension-add.md · 64 lines

How it starts

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

Add a new feature surface to the current extension project. The user said: $ARGUMENTS

Parse arguments

  • First argument: feature type, one of: sidebar, popup, content-script, background, newtab, options, devtools
  • Second argument (optional): framework, one of: react, vue, svelte, preact, vanilla. Default: detect from existing project, fall back to react

Steps

  1. Validate the project

    • Check that src/manifest.json exists
    • Read it to understand what's already configured
    • Detect the framework from existing dependencies in package.json
  2. Get the reference pattern If MCP tool extension_add_feature is available, use it. It returns the exact manifest additions, files to create, and reference template.

    If MCP tool extension_templates (action: "source") is available, read the reference template source to get real implementation patterns.

  3. Update manifest.json Add the required fields to src/manifest.json. Use the extension.dev cross-browser format:

    Feature Chromium Firefox
    Sidebar "chromium:side_panel": {"default_path": "sidebar/index.html"} + "chromium:permissions": ["sidePanel"] "firefox:sidebar_action": {"default_panel": "sidebar/index.html"}
    Popup "chromium:action": {"default_popup": "action/index.html"} "firefox:browser_action": {"default_popup": "action/index.html"}
    Content script "content_scripts": [{"matches": ["<all_urls>"], "js": ["content/scripts.ts"]}] Same
    Background "background": {"chromium:service_worker": "background.ts", "firefox:scripts": ["background.ts"]} Same (prefixed)
    New tab "chrome_url_overrides": {"newtab": "newtab/index.html"} Same
    Options "options_ui": {"page": "options/index.html", "open_in_tab": true} Same
    DevTools "devtools_page": "devtools/index.html" Same

Read the full file on GitHub · 64 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. yesterday First seen · 64 lines · 18 tokens per session scan A 7e35a00e28aa

Subscribe to this mod's changes

extension-add is a command published in the GitHub repository extensiondev/mcp (1 stars, last pushed 2d ago), licensed Apache-2.0. It adds 18 tokens to every session and 778 once invoked, about $0.0001 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.