- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill switch-extension-source -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill switch-extension-source -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill switch-extension-source -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add BlackBeltTechnology/pi-agent-dashboard --skill switch-extension-source -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/BlackBeltTechnology/pi-agent-dashboard/tree/HEAD/.pi/skills/switch-extension-source來自發布者
Toggle a monorepo extension between npm (published) and local (working tree) source.
GUI equivalent: Settings → Packages exposes a per-row Reset to published version action (change: reset-override-to-npm) that resets a local/git-installed row back to its canonical
npm:<name>— install-first / remove-second, confirm-gated. It is the one-click UI analog ofswitch <pkg> npmhere; keep the two semantically aligned (both drop the localpackages[]registration only, never the working-tree files).
On a dev machine you want extensions to load your live working tree so edits take effect. Distribution users consume the published npm package. Both can be wired at once across two config layers, and whichever pi resolves last wins — non-deterministic ("I edited it but nothing changed"). This skill enforces exactly one source per package.
GLOBAL ~/.pi/agent/settings.json "packages": [...]
npm -> "npm:<npmName>"
local -> "<repoRoot>/packages/<dir>" (dir path; pi resolves package.json "pi")
PROJECT <repo>/.pi/settings.json "packages":[{ source, extensions:["+packages/<dir>/<entry>"] }]
local overlay -> only with --overlay; loads ONLY inside this repo; needs pi.extensions
local (default) = global dir path → loads in every session everywhere.
local --overlay = project overlay → loads only when running pi inside this repo.
npx tsx ./scripts/switch-source.ts status # where each installed pkg loads from
npx tsx ./scripts/switch-source.ts local <pkg> # -> local working tree (global path)
npx tsx ./scripts/switch-source.ts local <pkg> --overlay# -> local, this-repo-only (extensions only)
npx tsx ./scripts/switch-source.ts npm <pkg> # -> published npm build
<pkg> = monorepo dir name (kb-extension) OR npm name (@blackbelt-technology/pi-dashboard-kb-extension).
Each switch removes all other representations of that package, timestamped-backs-up every file it
edits (*.bak-switch-*), and re-validates JSON before writing.
status — see current source per package.local <pkg> or npm <pkg> — flip it. Script guarantees single-source.packages[] is read at session init, so the change takes effect on the
next session start. Respawn sessions or npm run reload (reload alone may not re-resolve
the package list in an already-running process — fresh session is the guaranteed path).dashboardPluginBridges /
_dashboardManagedPackages. This skill does NOT toggle those — leave them to the dashboard UI.npm mode your
working-tree edits do NOT load until you local again.--overlay needs pi.extensions — skill-only packages (pi.skills, no extensions) can't use
the overlay form; use plain local (global dir path).status showing
one source.npx tsx ./scripts/switch-source.ts status shows the target package at exactly one source.python3 -c "import json; json.load(open('<file>'))" confirms both settings files are valid JSON.Switch a monorepo extension/skill package between its published npm source and its local working-tree source, guaranteeing exactly one source per package. Use when "my edits don't take effect", "load
---name: switch-extension-sourcedescription: Switch a monorepo extension/skill package between its published npm source and its local working-tree source…---# .pi/skills/switch-extension-source/SKILL.md總覽
Switch a monorepo extension/skill package between its published npm source and its local working-tree source, guaranteeing exactly one source per package. Use when "my edits don't take effect", "load local extension", "test the published npm build", or reconciling dev vs distribution package sources.
常見問題
從發布者下載 .pi/skills/switch-extension-source/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/BlackBeltTechnology/pi-agent-dashboard。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。