check_extension
Runs Switchboard's whole check on an extension folder without installing it.
Details #
An agent that writes an extension itself (Claude Code, with the SDK docs) points this at the folder and gets the same check a person gets in Make an extension: the manifest against the SDK's schema, the TypeScript compile (with the compiler inside Switchboard, so no npm), the gallery's rules (every permission against the code that uses it, banned APIs, obfuscation) and the folder's own tests, run in the real Runtime with fake services. Nothing is installed and nothing is changed except the dist/ folder the compile writes.
{ "jsonrpc": "2.0", "id": 7, "method": "tools/call",
"params": { "name": "check_extension", "arguments": { "folder": "~/Switchboard-Extensions/word-count" } } }
A sound extension answers "ok": true. Otherwise the result is an error with one line per problem, each starting with the step that found it, so the agent can fix the files and call it again:
{ "ok": false, "id": "com.me.word-count",
"steps": [{ "name": "manifest", "status": "passed" }, { "name": "compile", "status": "failed" },
{ "name": "rules", "status": "skipped" }, { "name": "test", "status": "skipped" }],
"problems": ["compile: src/index.ts(6,41): error TS2339: Property 'read' does not exist on type ..."],
"permissions": [{ "permission": "clipboard", "words": "Clipboard: reads (src/index.ts:6)", "lines": ["src/index.ts:6 const text = await ctx.clipboard.readText()"] }] }
Gotchas #
There is no "write me an extension" tool. The agent writes the files, as a person would, and uses this tool and install_extension.
The test step runs only when the earlier steps pass.