From 69a77aaf9ba641b4aa6c069da8408fb97513a853 Mon Sep 17 00:00:00 2001 From: sameeeeeeep <191771413+sameeeeeeep@users.noreply.github.com> Date: Fri, 2 Oct 2026 19:10:35 +0530 Subject: [PATCH] switchboard plugin: install from its own 2 MB repo Adding this repo as a marketplace clones ~600 MB and takes ~1m50s, close to Claude Code's 120 s clone limit. plugin/publish.sh mirrors plugin/ to sameeeeeeep/switchboard-plugin (marketplace still named `switchboard`, so the id stays switchboard@switchboard). Install there takes ~7 s; the installed connector initializes and lists all 23 tools. Existing `marketplace add sameeeeeeep/switchboard` installs keep working. Co-Authored-By: Claude Opus 5.5 --- plugin/README.md | 10 +++++-- plugin/publish.sh | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 3 deletions(-) create mode 100755 plugin/publish.sh diff --git a/plugin/README.md b/plugin/README.md index 1b1f283..7edf4a2 100644 --- a/plugin/README.md +++ b/plugin/README.md @@ -22,13 +22,17 @@ its own installation cache; that cache is a generated copy, not a separate sourc Start a new Codex task after installation. Review/trust the plugin's hooks in Codex's `/hooks` UI; installation does not automatically trust lifecycle hooks. Tools and skills work independently. -Claude's marketplace installation is also supported: +Claude's marketplace installation is also supported, in Claude Code: ```text -/plugin marketplace add sameeeeeeep/switchboard -/plugin install switchboard@switchboard +/plugin install switchboard --marketplace sameeeeeeep/switchboard-plugin ``` +`sameeeeeeep/switchboard-plugin` is a ~2 MB mirror of this directory made by `plugin/publish.sh`, so +the install doesn't clone this whole repo. Its marketplace is also named `switchboard`, so the plugin +id stays `switchboard@switchboard`; an existing `/plugin marketplace add sameeeeeeep/switchboard` +keeps working. + Use one installation route per host. The checkout installer detects an enabled Claude plugin and avoids adding a standalone duplicate. Repo `.claude/skills/*` entries are discovery symlinks to the canonical skills here, not separately maintained copies. diff --git a/plugin/publish.sh b/plugin/publish.sh new file mode 100755 index 0000000..ae19733 --- /dev/null +++ b/plugin/publish.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# Mirror this plugin to its own small repo, github.com/sameeeeeeep/switchboard-plugin. +# +# The source of truth stays here. The small repo exists so `/plugin install switchboard +# --marketplace sameeeeeeep/switchboard-plugin` clones ~2 MB instead of the whole switchboard repo +# (~600 MB on disk), which can pass Claude Code's 120 s clone limit on slow connections. +# The marketplace keeps the name `switchboard`, so the plugin id stays `switchboard@switchboard`. +# +# node plugin/connector/build.mjs && plugin/publish.sh # bump .claude-plugin/plugin.json first +set -eu +cd "$(dirname "$0")" + +REPO=sameeeeeeep/switchboard-plugin +VERSION=$(python3 -c 'import json; print(json.load(open(".claude-plugin/plugin.json"))["version"])') +TMP=$(mktemp -d) +trap 'rm -rf "$TMP"' EXIT + +gh repo clone "$REPO" "$TMP/repo" -- -q +(cd "$TMP/repo" && git rm -rq --ignore-unmatch . >/dev/null) + +# Tracked files only, so local caches (__pycache__, etc.) never ship. +git ls-files -z . | (cd "$TMP/repo" && xargs -0 -I{} sh -c 'mkdir -p "$(dirname "{}")"') +git ls-files -z . | xargs -0 -I{} cp -p "{}" "$TMP/repo/{}" +cp ../LICENSE "$TMP/repo/LICENSE" + +cat > "$TMP/repo/.claude-plugin/marketplace.json" <<'EOF' +{ + "name": "switchboard", + "description": "Switchboard for Claude Code: the operator connector and skills for the Switchboard Mac app.", + "owner": { "name": "sameeeeeeep", "url": "https://github.com/sameeeeeeep/switchboard" }, + "plugins": [ + { + "name": "switchboard", + "source": "./", + "description": "One Switchboard connector and operator skills for Claude Code and Codex: tasks, notch, whiteboard, PIP, and wrapps." + } + ] +} +EOF + +# Lead the mirrored README with the install that applies to this repo. +{ + cat <<'EOF' +# Switchboard plugin for Claude Code + +Mirror of [`plugin/`](https://github.com/sameeeeeeep/switchboard/tree/main/plugin) in the +Switchboard repo, published here so installing it downloads ~2 MB instead of the whole repo. +Edit the source there, not here. + +Install, in Claude Code: + +```text +/plugin install switchboard --marketplace sameeeeeeep/switchboard-plugin +``` + +The visible surfaces (notch, whiteboard, PIP) need the [Switchboard Mac app](https://thelastprompt.ai/switchboard). + +--- + +EOF + cat README.md +} > "$TMP/repo/README.md" + +cd "$TMP/repo" +claude plugin validate --strict . >/dev/null +git add -A +if git diff --cached --quiet; then + echo "no changes to publish" +else + git commit -qm "switchboard plugin $VERSION (mirrored from sameeeeeeep/switchboard plugin/)" + git push -q origin HEAD:main +fi +echo "published $REPO ($VERSION)"