Skip to content

Templates ​

A template is a working extension you start from instead of an empty directory. Reach for one when you want something that builds, runs, and loads in a browser before you change a line.

The six starters ​

Each starter is the same small extension, a sidebar panel plus a content script, in a different language or framework. Pick the one you write in.

StarterWritten inCreate it
JavaScriptPlain JavaScript--template javascript
TypeScriptTypeScript--template typescript
ReactReact with TypeScript--template react
PreactPreact with TypeScript--template preact
VueVue with TypeScript--template vue
SvelteSvelte with TypeScript--template svelte

Every starter page shows the same three ways in, with a clip of each:

  • The terminal. npx extension@latest create my-extension --template <slug>, then npm run dev. No account and nothing hosted. This is the Extension.js framework on your machine.
  • An agent. With the MCP server installed, "Create a React extension and run it" calls extension_create with the template and extension_dev to run it.
  • The catalog. templates.extension.dev runs each template live in the page and turns it into a private repository of your own with one click.

Quick start ​

bash
npx extension@latest create my-extension --template react
cd my-extension
npm run dev

The first command creates the project and installs its dependencies. The last one opens a browser with the extension loaded.

How it works ​

templates.extension.dev renders the whole catalog, one card per template. Each template page carries a copyable CLI command, a download of the built extension, and one click that turns the template into a repository of your own. The preview on that page is the template compiled and running, not a screenshot of it.

The repository click opens www.extension.dev/import?template=<slug>&private=true, carrying the repository name and description from the card. That page creates a private GitHub repository from the template and connects it as a project. Configuration works signed out. Creating the repository writes to your GitHub account, so that step needs a GitHub session. See Import for what happens on that page.

The catalog does not author its templates. It pins a commit of extension-js/examples and ships it as a content-addressed artifact. A fidelity harness re-derives the catalog from the pinned source and fails when the rendered listing and the real files disagree.

Reference ​

What a catalog page shows:

RouteShows
/<slug>The template running live in the browser emulator
/<slug>/instructionsWhat the template does and how to work in it
/<slug>/sourceThe real files, browsable in the page
/a/<artifactId>A shared artifact, kept for 90 days

What the 59 templates cover:

GroupExamples
SurfacesPopup, side panel, new tab, devtools
Content scriptsMain world, multiple entries, CSS modules, Sass, Less
FrameworksReact, Preact, Svelte, Vue, TypeScript, plain JavaScript
ToolingESLint, Prettier, Stylelint, Playwright, Nx and Turborepo monorepos
AIChatGPT, Claude, Gemini, Perplexity, Transformers.js

For a full-page surface instead of a popup, start from the New Tab template.

When it fails ​

  • Repository creation is refused with a rate limit. The limit is 20 repository creations per hour per user, and the 429 answer carries the seconds to wait. Wait, or run the CLI command on the template page in the meantime.
  • A fix made to a template does not last. The next corpus sync overwrites it. Fix the template in extension-js/examples, and the next pin brings the fix into the catalog.
  • An /a/<artifactId> link returns nothing. Shared artifacts are kept 90 days. Republish from the source that produced the artifact.
  • The create click asks for a sign-in. Browsing and configuration work signed out. Creating the repository writes to your GitHub account, so that step needs a GitHub session.

Next ​