Browse the docs

Making an extension with AI

Describe an extension in a sentence, read the checked TypeScript Claude wrote and the permissions it asks for, try it, and install it in Develop mode.

Say what an extension should add: an action, a trigger, a condition, a sensor or a menu bar item. Claude writes it as a real TypeScript extension against the SDK. Before you see anything, Switchboard compiles it, checks it and runs its test. You read it, try it, and install it.

Make one #

  1. Open Extensions (⌥⌘3) and choose Develop, or choose File > New Extension with AI….

  2. Type what it should add in the Make with AI field. For example: "An action that counts the words on the clipboard and shows a HUD".

  3. The chips under the field (Action, Trigger, Condition, Sensor, Menu bar item) are Switchboard's guess from your sentence. Click to change them.

  4. Press ⏎. This takes 10 to 40 seconds: the sheet says Writing…, Compiling… and Checking… as each phase finishes.

It needs a model: your own key or Switchboard's relay, set up in Settings › AI. Without one the sheet says so and opens Settings for you. The model is always Claude Sonnet, because this is code. The footer shows the model and what it cost.

What you review #

The sheet shows what you would be installing:

  • What it does, in a plain paragraph, for someone who does not read TypeScript.

  • Permissions, each in words with the line of code that needs it: "Network: reaches api.day.example (src/index.ts:14)". A permission your sentence did not imply is marked Unexpected, and Install stays off until you have ticked it as fine, or chosen Remove and Recompile, which asks Claude again without that permission.

  • The files, one tab each: switchboard.json, src/index.ts and the test, read-only, with colour.

  • Checks: manifest, compile, rules and test, each with a green dot. The rules are the gallery's: every permission must be used by the code and every use must be asked for, no wildcard hosts, no eval, no Node modules, no obfuscation, nothing that polls faster than every 5 seconds.

  • Try it: runs the extension in the Runtime with fake services (nothing touches the internet or your Mac). For an action, type parameters in Run with…; a trigger shows when it fires and has Simulate; a menu bar item shows its text. The extension's log is underneath.

If Claude's first try does not pass the checks, the errors go back to it once. If the second try fails too, the sheet says Couldn't make this compile, shows what Claude wrote, and offers Open Folder and Discard.

Install #

Install (⌘⏎) moves the folder to your Develop folder (~/Switchboard-Extensions/<name>/, changeable in Settings › Develop, which also sets the id prefix such as com.yourname) and loads it. It turns Develop mode on for you, because the extension is unsigned: Switchboard did not sign it and the gallery did not review it, so only install what you have read. The sandbox still holds: the extension can do only what its permissions say, and a host or path it did not list fails when it runs.

The extension appears in Extensions › Develop with Made with AI beside its name, and in Installed like any other. Remove deletes the copy Switchboard loaded; your folder stays. From there it is a normal extension folder: open it in an editor, run switchboard ext dev <folder> for a live reload loop, add more with Writing an extension, or submit it to the gallery.

From a macro #

When a macro Claude made needs an action you do not have ("a step that posts to Day's quick add"), the Make with AI sheet lists it with Make it. That opens Make an extension with the sentence filled in, and after Install it takes you back to the macro to make it again with the new action available.

From the Terminal and from agents #

The same checks are a command and an MCP tool, so Claude Code can write extensions the way you would:

switchboard ext new ~/Switchboard-Extensions/word-count --from action-pack
switchboard ext check ~/Switchboard-Extensions/word-count

check_extension runs the check and install_extension installs after you approve the permissions on the card. There is no "write me an extension" tool: the agent writes the files and uses the check, as you do.

Gotchas #

  • Claude can write code that compiles and still does the wrong thing. Read the paragraph, then the code, and use Try it.

  • The checks are not a security audit. They catch what they can; the sandbox and your reading are the fence.

  • Switchboard sends your sentence, the SDK's types and its own starter files to the model, never your macros, clipboard or files.