fix(update): pass full name@marketplace to claude plugin update
`claude plugin update` rejects a bare plugin name when multiple
marketplaces are registered — the CLI demands `name@marketplace`.
update-all.sh stripped the suffix via `${_p%%@*}`, causing every
marketplace plugin update to fail with "Plugin not found". Fixed
by passing the unmodified spec from `claude plugin list`.
Also adds install + update paths for external skills distributed
through the `npx skills` CLI (vercel-labs/skills):
- alchaincyf/darwin-skill
- alchaincyf/find-skills
These land in ~/.agents/skills/ and are now symlinked into
$REPO/skills/ via link.sh using absolute paths — the previous
relative `../../.agents/...` targets resolved incorrectly when
the repo is cloned below $HOME (as ~/Documents/claude/), leaving
dangling symlinks.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5e6222a824
commit
618025cae2
4
.gitignore
vendored
4
.gitignore
vendored
@ -44,6 +44,10 @@ skills/unfreeze
|
|||||||
# Emil Design Engineering skill symlink — auto-created by link.sh
|
# Emil Design Engineering skill symlink — auto-created by link.sh
|
||||||
skills/emil-design-eng
|
skills/emil-design-eng
|
||||||
|
|
||||||
|
# External skills installed via `npx skills add` — auto-created by link.sh
|
||||||
|
skills/darwin-skill
|
||||||
|
skills/find-skills
|
||||||
|
|
||||||
# Local project config (per-machine, not shared)
|
# Local project config (per-machine, not shared)
|
||||||
.claude/
|
.claude/
|
||||||
|
|
||||||
|
|||||||
@ -455,6 +455,44 @@ else
|
|||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# ============================================================
|
||||||
|
# STEP 8.5 — EXTERNAL SKILLS (npx skills add …)
|
||||||
|
# ============================================================
|
||||||
|
# Cross-agent skills distributed via the `skills` npm package
|
||||||
|
# (vercel-labs/skills). Installed into ~/.agents/skills/ and
|
||||||
|
# symlinked into $REPO/skills/ by link.sh using absolute paths.
|
||||||
|
echo "── Step 8.5: External skills via npx ──────────────────────"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
NPX_SKILLS=(
|
||||||
|
"alchaincyf/darwin-skill"
|
||||||
|
"alchaincyf/find-skills"
|
||||||
|
)
|
||||||
|
|
||||||
|
if ! command -v npx &>/dev/null; then
|
||||||
|
warn "npx not available — skipping external skills"
|
||||||
|
else
|
||||||
|
for _src in "${NPX_SKILLS[@]}"; do
|
||||||
|
_name="${_src##*/}"
|
||||||
|
_dst="$HOME/.agents/skills/$_name"
|
||||||
|
if [ -d "$_dst" ]; then
|
||||||
|
ok "$_name already installed ($_dst)"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
info "Installing $_name via: npx -y skills add $_src"
|
||||||
|
if npx -y skills add "$_src" 2>/dev/null; then
|
||||||
|
if [ -d "$_dst" ]; then
|
||||||
|
ok "$_name installed"
|
||||||
|
else
|
||||||
|
warn "$_name installed but not at expected path $_dst"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
err "$_name install failed — run manually: npx -y skills add $_src"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
|
||||||
# ============================================================
|
# ============================================================
|
||||||
# STEP 9 — SHELL CONFIG (alias + env vars)
|
# STEP 9 — SHELL CONFIG (alias + env vars)
|
||||||
# ============================================================
|
# ============================================================
|
||||||
@ -526,10 +564,13 @@ echo " 🔄 ui-ux-pro-max — user scope (~400 tokens)"
|
|||||||
echo " 🔄 context7 CLI — ctx7 (npm global, standalone or MCP setup)"
|
echo " 🔄 context7 CLI — ctx7 (npm global, standalone or MCP setup)"
|
||||||
echo " 🔄 graphifyy — codebase knowledge graph (pipx, PreToolUse hook)"
|
echo " 🔄 graphifyy — codebase knowledge graph (pipx, PreToolUse hook)"
|
||||||
echo " 🔄 emil-design-eng — UI polish, animations, component craft (curl → symlink)"
|
echo " 🔄 emil-design-eng — UI polish, animations, component craft (curl → symlink)"
|
||||||
|
echo " 🔄 darwin-skill — autonomous skill optimizer (npx skills, ~/.agents/skills/)"
|
||||||
|
echo " 🔄 find-skills — skill discovery helper (npx skills, ~/.agents/skills/)"
|
||||||
echo ""
|
echo ""
|
||||||
echo " All plugins installed at: user scope (~/.claude/plugins/)"
|
echo " All plugins installed at: user scope (~/.claude/plugins/)"
|
||||||
echo " GStack at: ~/.claude/skills/gstack/ (symlink → submodule)"
|
echo " GStack skills symlinked individually into ~/.claude/skills/ (→ submodule)"
|
||||||
echo " Emil Design Eng at: ~/.claude/skills/emil-design-eng/ (symlink → skills-external)"
|
echo " Emil Design Eng at: ~/.claude/skills/emil-design-eng/ (symlink → skills-external)"
|
||||||
|
echo " npx skills at: ~/.agents/skills/ (symlinked into ~/.claude/skills/)"
|
||||||
echo ""
|
echo ""
|
||||||
echo " → Restart Claude Code — plugins load automatically"
|
echo " → Restart Claude Code — plugins load automatically"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
21
link.sh
21
link.sh
@ -57,6 +57,27 @@ else
|
|||||||
echo "⚠️ emil-design-eng not found — run: make plugin"
|
echo "⚠️ emil-design-eng not found — run: make plugin"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# External skills installed via `npx skills add` live under
|
||||||
|
# $HOME/.agents/skills/. We symlink them into $REPO/skills/ with
|
||||||
|
# absolute paths so the link stays valid regardless of where the
|
||||||
|
# repo is cloned (relative ../../ paths broke on repos deeper than
|
||||||
|
# one level below $HOME).
|
||||||
|
NPX_EXTERNAL_SKILLS=(darwin-skill find-skills)
|
||||||
|
for _ext in "${NPX_EXTERNAL_SKILLS[@]}"; do
|
||||||
|
_target="$HOME/.agents/skills/$_ext"
|
||||||
|
_link="$REPO/skills/$_ext"
|
||||||
|
if [ ! -d "$_target" ]; then
|
||||||
|
echo "⚠️ $_ext not installed at $_target — run: make plugin"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ -L "$_link" ] && [ "$(readlink "$_link")" = "$_target" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
rm -f "$_link"
|
||||||
|
ln -sf "$_target" "$_link"
|
||||||
|
CHANGED=$((CHANGED + 1))
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$CHANGED" -eq 0 ]; then
|
if [ "$CHANGED" -eq 0 ]; then
|
||||||
echo "✅ All symlinks already up to date."
|
echo "✅ All symlinks already up to date."
|
||||||
else
|
else
|
||||||
|
|||||||
@ -210,6 +210,32 @@ else
|
|||||||
info "emil-design-eng not installed — skipping (run: make plugin)"
|
info "emil-design-eng not installed — skipping (run: make plugin)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ── 7.5. Update external skills (npx skills) ──
|
||||||
|
echo ""
|
||||||
|
echo "── Updating external skills (npx skills)..."
|
||||||
|
if command -v npx &>/dev/null; then
|
||||||
|
NPX_SKILLS=(
|
||||||
|
"alchaincyf/darwin-skill"
|
||||||
|
"alchaincyf/find-skills"
|
||||||
|
)
|
||||||
|
for _src in "${NPX_SKILLS[@]}"; do
|
||||||
|
_name="${_src##*/}"
|
||||||
|
if [ ! -d "$HOME/.agents/skills/$_name" ]; then
|
||||||
|
info "$_name not installed — skipping (run: make plugin)"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# `skills add` is idempotent and pulls latest from the source repo,
|
||||||
|
# which is the closest thing to an update operation the CLI exposes.
|
||||||
|
if npx -y skills add "$_src" 2>/dev/null; then
|
||||||
|
ok "$_name refreshed from $_src"
|
||||||
|
else
|
||||||
|
warn "$_name refresh failed — run manually: npx -y skills add $_src"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
info "npx not available — skipping external skills"
|
||||||
|
fi
|
||||||
|
|
||||||
# ── 8. Update marketplace plugins ──
|
# ── 8. Update marketplace plugins ──
|
||||||
echo ""
|
echo ""
|
||||||
echo "── Updating marketplace plugins..."
|
echo "── Updating marketplace plugins..."
|
||||||
@ -220,7 +246,9 @@ if command -v claude &>/dev/null; then
|
|||||||
while IFS= read -r _p; do
|
while IFS= read -r _p; do
|
||||||
_name="${_p%%@*}"
|
_name="${_p%%@*}"
|
||||||
info "Updating $_name..."
|
info "Updating $_name..."
|
||||||
if claude plugin update "$_name" 2>/dev/null; then
|
# Pass the full "name@marketplace" spec — the CLI rejects
|
||||||
|
# the bare name when several marketplaces are registered.
|
||||||
|
if claude plugin update "$_p" 2>/dev/null; then
|
||||||
ok "$_name updated"
|
ok "$_name updated"
|
||||||
else
|
else
|
||||||
warn "$_name update failed"
|
warn "$_name update failed"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user