Repository navigation
Description
Summary
init-plugins.sh installs zero plugins because:
- The
claude-plugins-officialmarketplace is never registered beforeclaude plugin installis called - The ralphex marketplace uses the wrong GitHub repo path (
ralphex/ralphex— doesn't exist) - The Playwright ARM64
.mcp.jsonpatch targets the marketplace source directory, but Claude Code reads from the cache directory at runtime
All failures are invisible because 2>/dev/null || true suppresses every error.
Environment
- Claude Code CLI:
2.1.104 - Image:
ghcr.io/gatezh/devcontainers/claude-code:latest(andclaude-code-sandbox) - Arch:
aarch64(Apple Silicon) andamd64
Steps to reproduce
- Build a devcontainer from the
claude-codetemplate - Let
postCreateCommandruninit-plugins.sh - Open a Claude Code session
$ claude plugin marketplace list
No marketplaces configured
$ claude plugin list
No plugins installed. Use `claude plugin install` to install a plugin.All 11 plugin installs failed silently.
Root cause
Bug 1 — Missing marketplace registration
The script jumps straight to claude plugin install "<name>@claude-plugins-official" without first running claude plugin marketplace add. The official marketplace is not auto-configured — it must be added explicitly:
claude plugin marketplace add anthropics/claude-plugins-officialPer the official plugin docs, marketplace registration is a prerequisite for plugin installation.
Bug 2 — Wrong ralphex repo path
The script references ralphex/ralphex which returns "Repository not found" on GitHub. The correct path is umputun/ralphex:
# WRONG — repo doesn't exist
claude plugin marketplace add ralphex/ralphex
# CORRECT
claude plugin marketplace add umputun/ralphexBug 3 — Playwright ARM64 patch targets wrong path
The script patches:
~/.claude/plugins/marketplaces/claude-plugins-official/external_plugins/playwright/.mcp.json
But Claude Code reads the config from the cache directory:
~/.claude/plugins/cache/claude-plugins-official/playwright/<version-hash>/.mcp.json
These are independent copies (not symlinks). The patch has no runtime effect. The cache path includes a version hash that changes on updates, so it must be resolved dynamically:
PLAYWRIGHT_MCP_CACHE=$(claude plugin list --json 2>/dev/null \
| jq -r '.[] | select(.id == "playwright@claude-plugins-official") | .installPath')Bug 4 — Silent error suppression
claude plugin install "$plugin" 2>/dev/null || trueThis swallows all stderr output and ignores all non-zero exit codes. When every plugin install fails, the script reports success with zero output. This makes the first three bugs invisible.
Suggested fix
# ── Claude Code marketplaces ────────────────────────────────────────────────
# Register marketplaces before installing plugins. The official marketplace is
# NOT auto-configured — it must be added explicitly.
MARKETPLACES=(
"anthropics/claude-plugins-official"
"umputun/ralphex"
)
for marketplace in "${MARKETPLACES[@]}"; do
if claude plugin marketplace add "$marketplace" 2>&1; then
echo "✔ Marketplace added: $marketplace"
else
echo "⚠ Failed to add marketplace: $marketplace" >&2
fi
done
# ── Claude Code plugins ─────────────────────────────────────────────────────
PLUGINS=(
"frontend-design@claude-plugins-official"
"code-review@claude-plugins-official"
"typescript-lsp@claude-plugins-official"
"code-simplifier@claude-plugins-official"
"playwright@claude-plugins-official"
"superpowers@claude-plugins-official"
"explanatory-output-style@claude-plugins-official"
"claude-md-management@claude-plugins-official"
"claude-code-setup@claude-plugins-official"
"posthog@claude-plugins-official"
"ralphex@ralphex"
)
for plugin in "${PLUGINS[@]}"; do
if claude plugin install "$plugin" 2>&1; then
echo "✔ Installed: $plugin"
else
echo "⚠ Failed to install: $plugin" >&2
fi
done
# ── Playwright MCP: use Chromium on ARM64 ───────────────────────────────────
# Resolve the cache path dynamically — it includes a version hash.
if [ "$(uname -m)" = "aarch64" ]; then
PLAYWRIGHT_MCP_CACHE=$(claude plugin list --json 2>/dev/null \
| jq -r '.[] | select(.id == "playwright@claude-plugins-official") | .installPath')
if [ -n "$PLAYWRIGHT_MCP_CACHE" ] && [ -f "$PLAYWRIGHT_MCP_CACHE/.mcp.json" ]; then
jq '.playwright.args = ["@playwright/mcp@latest", "--browser", "chromium"]' \
"$PLAYWRIGHT_MCP_CACHE/.mcp.json" > /tmp/playwright-mcp.json \
&& mv /tmp/playwright-mcp.json "$PLAYWRIGHT_MCP_CACHE/.mcp.json"
fi
fiAll three commands (marketplace add, plugin install, plugin list --json) are idempotent — safe to re-run.
Impact
- All devcontainer users get zero plugins installed (default + sandbox variants)
- ARM64 users don't get the Chromium fallback even if plugins were somehow manually installed
- Failures are completely silent — users discover the problem only when skills are missing at runtime
Activity
gatezh commentedon Apr 14, 2026
Analysis
Investigated against the current code and latest official plugin docs. Here's what holds up and what doesn't:
Bug 1 — Missing marketplace registration
Fix is correct, but the reasoning is inaccurate. The docs state: "The official Anthropic marketplace (
claude-plugins-official) is automatically available when you start Claude Code." It IS auto-configured — but only on first interactive launch. Sinceinit-plugins.shruns inpostCreateCommand(before any interactive session), the marketplace isn't available yet. So adding it explicitly is still the right fix, just for a different reason.Notably, the root repo's own
.devcontainer/init-plugins.shalready does this correctly — it registers both marketplaces before installing. Theclaude-codeimage script was written earlier and never updated to match.Bug 2 — Wrong ralphex repo path
Partially valid. The issue says the script "references
ralphex/ralphex" — that path doesn't appear in the code. What's actually missing is theclaude plugin marketplace addcall entirely. The plugin array hasralphex@ralphex(line 32) but no marketplace is ever registered for it. The root repo's script correctly usesumputun/ralphex.Bug 3 — Playwright ARM64 patch targets wrong path
Valid. The docs confirm plugins run from cache (
~/.claude/plugins/cache), not the marketplace source directory. The current patch at line 42 has no runtime effect.However, the suggested
claude plugin list --jsonwith.installPathis not documented anywhere in the official CLI reference. The only documented path mechanism is${CLAUDE_PLUGIN_ROOT}(available inside plugin hooks/configs, not external scripts). Using afind-based lookup against the cache directory is more robust than relying on undocumented CLI output.Bug 4 — Silent error suppression
Fully valid.
2>/dev/null || truehides everything. The root repo's script already uses a better pattern with warning logs.Summary
claude plugin list --jsonis undocumented — usingfindinsteadFix incoming.
fix(claude-code): register marketplaces + fix ARM64 cache path in ini…
fix(claude-code): register marketplaces + fix ARM64 cache path in ini…