Example result: Build a simple Chrome extension
AI-generated example · Build · Extension
Updated

Build a simple Chrome extension

This prompt writes every file for a small Chrome extension and explains why each permission is needed. It includes instructions to load it unpacked, and asks the AI not to collect any browsing data.

text-code-chrome-extension-builder — claude — 77 words

Act as a developer experienced with Chrome extensions (Manifest V3).

The extension should: [WHAT IT DOES, e.g. show word count of selected text]
Where it works: [e.g. on every page, or only on docs.google.com]

Give me every file (manifest.json, scripts, popup if needed) with the smallest set of permissions possible, and explain why each permission is needed. Include step-by-step instructions to load it unpacked in Chrome and test it. Do not collect or send any browsing data.

Fewer permissions means fewer scary warnings when you install it. Ask the AI to justify each one.

Get a better result

What you will get

A complete Manifest V3 extension: a manifest, the scripts and any popup, with the smallest set of permissions, a reason given for each one, and steps to load it unpacked and test it.

Common mistake

It asks for access to all websites.

Fix: Name the exact sites or say “only on the active tab when I click the icon”, and ask for the narrower permission.

Also watch for
  • The extension fails to load. Open the extensions page, switch on developer mode, and paste the exact error back in. Manifest typos are common.
  • Old Manifest V2 code appears. Say “service worker, not background page” and ask it to check every API against Manifest V3.
Try a variation: add a settings page

Ask for an options page that saves one setting, using the extension storage API rather than anything that leaves your browser.

Still not right? Reply with this

It loads now. List every permission in the manifest with a one-line reason I could show in the store listing, and remove any we do not need.

Guides on this topic

More chat & writing prompts

See all 465 →