feat(plugin): single-session install + setup flow#175
Conversation
When CLAUDE_PLUGIN_DATA env var is unset (e.g., mid-session MCP registration), use homedir-based default so native dep installation still works. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New Step 0.5 in /bp-setup: detects if the MCP server is running and registers it via `claude mcp add` if missing, enabling install-then- setup in a single Claude Code session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Declare skills directory and MCP server config paths in plugin.json for proper plugin discovery. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add section explaining how Step 0.5 bridges the gap between plugin install and MCP server availability within the same session. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Code ReviewFound 3 issues:
Generated with Claude Code If useful, react with a thumbs-up. Otherwise, thumbs-down. |
The `if (!pluginDataDir) return` guard became dead code after adding the `homedir()` fallback — the expression always produces a truthy string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show the full `claude mcp add` invocation with -e flags in the diagram, and note that Claude Code deduplicates by server name so the user-scoped and plugin-managed entries don't conflict. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
homedir()fallback forCLAUDE_PLUGIN_DATAso native deps install works without the env var/bp-setupwizard: mid-session MCP server registration viaclaude mcp addskillsandmcpServersfields inplugin.jsonmanifestChanges
fix(plugin): fallback CLAUDE_PLUGIN_DATA to ~/.betterpromptfeat(plugin): add mid-session MCP registration to setup wizardchore(plugin): add skills and mcpServers fields to plugin manifestdocs(plugin): document single-session install flowTest Plan
/bp-setup— verify Step 0.5 registers MCP serverscan_sessionstool works after mid-session registrationnative-deps.tsfallback: unsetCLAUDE_PLUGIN_DATA, verify~/.betterpromptis usedGenerated with Claude Code using /ship-it