Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.
TypeScript agentai-agentai-agentsai-assistantandroidautomationchatgptcoding-agentcomputer-usedesktop-appelectronllmlocal-firstmcpmulti-agentollamaopenaiprivacyself-hostedtypescript
name: plugin-building description: "Build and locally test a Pi Bot connection plugin with the bundled SDK." metadata: pibot-version: "6" pibot-name: "Build a plugin"
Clarify target and effects; default to read-only, confirm writes and disable irreversible actions.
- Create a dedicated directory inside the current workplace. Copy template/ from this skill into it. Never develop inside the skill directory.
- Read sdk/README.md and the packed SDK declarations. Install sdk/pibot-plugin-sdk.tgz using npm install --offline --ignore-scripts --no-audit --no-fund. Do not substitute a registry package. If an offline dependency is missing, report it; do not claim offline installation succeeded.
- Implement tools with @pibot/plugin-sdk using the documented createStdioServer API. Validate inputs, classify read-only/write/destructive behavior, use bounded results, AbortSignal and timeouts. stdout is MCP only; diagnostics go to stderr without credentials or file content.
- Set
.claude-plugin/plugin.jsonname/version/description andpibotApp: true; this is a Pi Bot application plugin, not a skill package or ordinary MCP import. If a secret or API key is needed, never collect it in chat, plugin_install config, source,.env, command arguments, logs, or the package; direct the user to Connections → Access tokens and use the existing token/secret channel. Use.mcp.jsononly as the application's runtime adapter with minimal network domains and portable relative paths using ${CLAUDE_PLUGIN_ROOT}; do not deliver standalone skills/. Follow Pi Bot UI style: simple and restrained, paired Chinese and English, consistent in light and dark themes; use human-readable labels and help text, bilingual enum options, conditional visibility for mutually exclusive settings, and never expose internal environment variable names as user copy. - Start the stdio server locally with a bounded MCP client; initialize, tools/list and tools/call a harmless read-only tool. Close transport and child on success, failure, timeout and cancellation. Check input errors; do not call writes/destructive tools to test real accounts. If the read-only tool needs an external API, first verify that
.mcp.jsonandpibot.jsondeclare the narrow network domain. A command sandbox without that domain is not evidence of a plugin bug: do not treatENOTFOUND, proxy denial, or DNS failure as a code failure, and do not disable isolation just to test it. - Keep dependencies portable in the plugin package; no symlinks, absolute development paths, secrets or unrelated files. Re-run plugin-review after changes.
- Call plugin_install with the plugin folder path and only nonsensitive config. Test the external API through the installed connector sandbox, using the plugin's declared network domain. If the current test environment lacks that network permission, finish the protocol-level self-test, install the plugin, and report “real network call not verified”; never present a test-environment network failure as an installation failure or switch to an outside-sandbox run to bypass it. A successful result is the installation receipt; if unavailable or rejected, report that result instead of bypassing checks. Updating uses the same tool.
- If the result is needs_setup, tell the user to open Connections → Access tokens to create or select the token, then complete this plugin's existing settings form. Never ask for a key in chat. Deliver name, version, domains and actual self-test/install status.