convez.ai
SkillDesenvolvimento WebAvançado
codyhxyz

Criar e publicar extensões Chrome em uma sessão

codyhxyz/create-chrome-extension

Scaffolding, validação e publicação de extensões Chrome automáticas

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill que automatiza todo o ciclo de vida de extensões Chrome: scaffolding inicial, preenchimento de metadados de listagem, captura de screenshots, configuração de OAuth e envio ao Chrome Web Store — tudo orquestrado numa única sessão. Inclui validação de conformidade com regras CWS e proxy de credenciais.

Instalação

$npx convez-ai codyhxyz/create-chrome-extension

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
3
Forks
2
Acompanhando
0
Saúde
71%
Último commit
há 2 semanas
Versão
v0.1.0
Issues abertas
2
Contribuidores
1

Casos de uso

  • Criar extensões Chrome prontas para publicação sem decorrer horas com regras CWS
  • Validar estrutura e conformidade de extensões antes de submeter ao Web Store
  • Automatizar geração de screenshots, copy e políticas de privacidade

Veredito

Ferramenta especializada de alto valor para desenvolvedores que precisam publicar extensões Chrome. Reduz significativamente o atrito do deploy ao Web Store, mas exige familiaridade com WXT, TypeScript e processos de publicação. Implementação sólida com validação robusta em duas camadas.

README

A tradução para o português deste README ainda está na fila.

create-chrome-extension

A Claude Code plugin that ships your Chrome extension — scaffold, fill the listing, capture screenshots, set up OAuth, and submit to the Chrome Web Store, in one session.

WXT + React 19 + Tailwind v4 + TypeScript. Eight skills, one validator, one ship gate.

Before → After

Before: "I have a Chrome extension idea and a vague memory that the Web Store has a bunch of rules I'll discover the night I try to ship."

After: Extension scaffolded to your profile, structural validator green, listing copy + 5 screenshots + 30-second promo filled in, OAuth wired up, zip uploaded and polling. ~Half a day end-to-end.

What you walk away with

  • A working WXT extension matching your profile — content-script-only, popup, side panel, or full hybrid
  • Listing copy, 5 screenshots, and a 30-second promo that pass the Chrome Web Store's content rules — encoded as validators in scripts/validate-cws.ts, not as vibes
  • An auto-generated privacy policy hosted on GitHub Pages (npm run setup:privacy) and wired into the welcome page
  • A deployable credential proxy (proxy/, with Cloudflare Workers and Vercel scaffolds; proxy-authed/ for extensions with user sign-in) so your third-party API keys never land in the shipped bundle — the no-bundled-credentials validator rule is the forcing function
  • OAuth credentials wired so npm run ship does the build → version-sync → upload → poll for you
  • A check:cws:ship gate that refuses to produce a zip until the listing is submission-ready
  • Two-layer validation — generic repo-health (Layer 1) + CWS-specific rules (Layer 2), so you don't ship an extension that passes CWS but has no tests and no lint

Two-layer validation

The factory validates on two orthogonal axes:

  • Layer 1 — generic repo health. scripts/readiness.sh (ported from parcadei's ContinuousClaudeV4.7, MIT) checks ~20 rules across 6 categories: lint/formatter config, type checking, pre-commit hooks, lockfile, tests, coverage, README, CLAUDE.md/AGENTS.md, .env.example, .gitignore, CODEOWNERS, issue/PR templates. Runs as Phase 0 in cws-ship — advisory by default (prints score, offers autofix via scripts/readiness-fix.sh, proceeds regardless). Set CCE_READINESS_REQUIRED=1 to make a low score (<70%) block submission. A corresponding opt-in validator rule ship-ready-generic-health (severity: warn) surfaces the score inside npm run check:cws:ship --json when the same env var is set.
  • Layer 2 — CWS-specific rules. scripts/validate-cws.ts — ~24 rules covering CSP, host permissions, remote-code patterns, listing drift, privacy policy reachability, screenshot/video readiness, etc. Authoritative for submission gating.

The two layers are independent. Layer 1 is off the shipping critical path unless you opt in.

Examples

Scaffold a side-panel-style extension and strip the rest:

> /create-chrome-extension:cce-init

Walks an interview about your concept → picks the matching profile (e.g. side-panel-app) → deletes the entrypoints you won't use → confirms npm run check:cws is green.

Fill the listing and clear the four content rules:

> /create-chrome-extension:cws-content

Interviews you for name, short description, host origins, welcome copy → writes wxt.config.ts and entrypoints/welcome/config.ts → re-runs the validator with the four content rules now active.

Capture the five required Web Store screenshots:

> /create-chrome-extension:cws-screens

Interviews for the five panel concepts → writes screenshots/config.ts → runs npm run screenshots to render 1280×800 PNGs from your live extension.

Submit to the Web Store:

> /create-chrome-extension:cws-ship

Gates on npm run check:cws:ship → version-syncs against the live listing → confirms with you → submits via the CWS API (or falls back to manual zip upload if you skipped OAuth).

Install

TL;DR: You need both a scaffolded factory repo (the extension's source) and the Claude Code plugin (the skills that drive it).

1. Scaffold the factory

Either use the CLI:

npx create-chrome-extension my-extension
cd my-extension

Or clone directly:

git clone https://github.com/codyhxyz/create-chrome-extension.git my-extension
cd my-extension
npm install

2. Install the Claude Code plugin (inside your new repo)

/plugin marketplace add codyhxyz/codyhxyz-plugins
/plugin install create-chrome-extension@codyhxyz-plugins

Or install straight from this repo's marketplace:

/plugin marketplace add codyhxyz/create-chrome-extension
/plugin install create-chrome-extension@create-chrome-extension

The eight skills (cce-init, cce-import, cce-rename, cws-content, cws-screens, cws-ship, cws-video, setup-cws-credentials) appear under the /create-chrome-extension: namespace and operate on the factory repo you opened in Claude Code.

  • cce-init — fresh-clone onboarding (profile strip, OAuth, structural green).
  • cce-import — convert an existing vanilla MV3 extension into the WXT factory layout.
  • cce-rename — rebrand an existing factory project (display name, slug, description, folder).

Skipping the plugin? The factory still ships as a working codebase — npm run dev, npm run build, npm run check:cws:ship, npm run ship all work without the plugin. The plugin just automates the conversational pieces (interviews, validator-output → fix recipes).

Usage

Inside a freshly cloned factory repo, the canonical session is:

  1. /create-chrome-extension:cce-init — interview, strip, confirm green
  2. /create-chrome-extension:cws-content — fill the listing
  3. /create-chrome-extension:cws-screens — render screenshots
  4. /create-chrome-extension:cws-video — produce the 30-second promo (optional)
  5. /create-chrome-extension:setup-cws-credentials — Google Cloud + OAuth (one-time)
  6. /create-chrome-extension:cws-ship — version-sync, upload, poll

Each skill is independently invocable — re-run cws-content after a copy change, re-run cws-screens after a UI change, etc.

Why this exists

The Chrome Web Store enforces ~18 content rules that aren't assembled in one place anywhere in Google's docs. The factory encodes them as validators (npm run check:cws, npm run check:cws:ship) so you can't accidentally ship a half-baked listing. The skills are the conversational layer over those validators — they interview you, write the right files, and re-run the checker.

This plugin won't: write your extension's actual feature code, design your UI, generate marketing screenshots that aren't grounded in your live extension, or submit to anywhere other than the Chrome Web Store.

Architecture

A Chrome extension is a small distributed system: separate surfaces that can't share variables and only talk via typed messages.

┌───────────────────────────── CHROME BROWSER ──────────────────────────────┐
│                                                                            │
│   ┌──────────────┐     ┌────────────────┐     ┌───────────────────────┐  │
│   │  POPUP       │     │  OPTIONS PAGE  │     │  SIDE PANEL           │  │
│   │  (React+TW)  │     │  (React+TW)    │     │  (React+TW)           │  │
│   └──────┬───────┘     └────────┬───────┘     └───────────┬───────────┘  │
│          │                      │  typed messages         │              │
│          └──────────────────────┼─────────────────────────┘              │
│                                 ▼                                         │
│                        ┌────────────────────┐                             │
│                        │  BACKGROUND WORKER │  ←── alarms, storage,      │
│                        │  (service worker)  │      network, "the brain"  │
│                        └─────────┬──────────┘                             │
│                                  │ messages                               │
│                                  ▼                                        │
│   ┌─────────────────────────────────────────────────────────────────┐    │
│   │  ACTIVE WEB PAGE                                                │    │
│   │   ┌─────────────────┐         ┌──────────────────┐             │    │
│   │   │ Page DOM        │  ◄────  │ CONTENT SCRIPT   │             │    │
│   │   │ + Shadow DOMs   │         │ (vanilla TS)     │             │    │
│   │   └─────────────────┘         └──────────────────┘             │    │
│   └─────────────────────────────────────────────────────────────────┘    │
└───────────────────────────────────────────────────────────────────────────┘

Messaging is typed via utils/messaging.ts — TypeScript catches mismatched payloads at compile time.

The Factory Idea

Start with everything; delete what you don't need.

   ┌──────────────┐    delete what     ┌──────────────┐
   │ Full hybrid  │ ─── you don't ───► │ Lean         │
   │ (everything) │     need           │ extension    │
   └──────────────┘                    └──────────────┘

Profiles: content-script-only, popup-based, side-panel app, full hybrid. See docs/01-extension-type-profiles.md.

Lifecycle

   1. CLONE          npx create-chrome-extension my-extension
        ▼
   2. STRIP          /create-chrome-extension:cce-init
        ▼
   3. DEV            npm run dev    → opens Chrome, HMR
        ▼
   4. BUILD          npm run build  → .output/chrome-mv3/
        ▼
   5. SCREENSHOTS    /create-chrome-extension:cws-screens → npm run screenshots
        ▼
   6. ZIP            npm run zip    → gated on check:cws:ship
        ▼
   7. SUBMIT         /create-chrome-extension:cws-ship
        ▼
   8. REVIEW         CWS review → live on store   ◄──┐
        ▼                                            │
   9. ITERATE        bug fixes / features ───────────┘  (back to DEV)
        ▼
  10. KEEPALIVE      GitHub Action auto-bumps + republishes every 4 months
                     so the listing doesn't go stale (opt-in via 4 secrets)

Commands

CommandDescription
npm run devDev server with HMR (opens Chrome — no "Load unpacked" step needed)
npm run buildProduction build → pops a styled Finder window with the folder to drag onto chrome://extensions
npm run zipBuild + zip → pops a styled Finder window with the .zip + opens the CWS devconsole to upload into
npm run compileTypeScript type check
npm run check:cwsCWS structural check (runs in CI)
npm run check:cws:shipCWS submission-readiness gate (run before zip)
npm run version-syncCompare local version to live CWS version (no-ops without CWS secrets)
npm run shipEnd-to-end publish: check:cws:ship → version-sync → wxt zip → upload & poll
npm run screenshotsRender 1280×800 CWS screenshots from screenshots/config.ts
npm run import -- <vanilla-dir>Convert an existing vanilla MV3 extension into this factory's WXT layout (driven by cce-import skill). --dry-run to preview.
npm run rename -- "<New Name>"Rebrand the factory in place — updates wxt.config.ts, package.json, og.config.mjs, entrypoint configs (driven by cce-rename skill).
npm run setup:cwsOne-time: provision a GCP project + enable the Chrome Web Store API (driven by setup-cws-credentials skill)
npm run setup:privacyGenerate + host a privacy policy on GitHub Pages from your manifest's permissions; wires the URL into the welcome config. --self-host=<url> to skip gh-pages
npm run setup:proxyDeploy the proxy/ Cloudflare Worker + write VITE_PROXY_URL into .env.local
npm run dev:firefoxDev server for Firefox

All setup:* scripts share a schemaVersion: 1 JSON envelope when run with --json — skills parse that envelope to drive conversational recovery.

Docs

Ver o original no GitHub

Bom para

Relacionados