feat(caveman): full install — plugin + standalone hooks + MCP scaffold
Wires JuliusBrussee/caveman into the always-on tier alongside
security-guidance and superpowers. Caveman compresses Claude's output
tokens (~75%) by speaking like a caveman while keeping technical
substance. Three layers:
1. Plugin (caveman@caveman, marketplace JuliusBrussee/caveman)
— adds /caveman, /caveman-commit, /caveman-review, /caveman-stats,
/caveman-help, /cavecrew, /compress + 3 cavecrew agents +
SessionStart/UserPromptSubmit hooks from the plugin path.
2. Standalone hooks (statusline + stats badge) deployed by
caveman's own hooks/install.sh into ~/.claude/hooks/. Paths in
settings.json normalized to ~/.claude/hooks/... so this user's
home dir doesn't leak across machines.
3. caveman-shrink MCP proxy — NOT auto-registered. The bare proxy
fails health checks because it requires an upstream MCP server
to wrap. install-plugins.sh STEP 5.5 prints a snippet showing how
to register a wrapped entry (e.g. caveman-shrink-fs) when the user
decides which upstream to compress.
New helper enable_plugin() for explicit always-on activation —
'claude plugin install' only copies into cache, doesn't write
enabledPlugins. Idempotent via Python json check.
doctor.sh adds detect_caveman / detect_caveman_hooks / detect_caveman_shrink
checks plus a 300t passive-cost adder. update-all.sh refreshes hook
files via the upstream installer's --force mode.
.gitignore covers caveman runtime files materialized into hooks/
because ~/.claude/hooks is symlinked to this repo.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
94b79d2ebb
commit
e4f4edc121
@@ -224,6 +224,36 @@ else
|
||||
info "emil-design-eng not installed — skipping (run: make plugin)"
|
||||
fi
|
||||
|
||||
# ── 7.4. Update Caveman (hooks + MCP shrink) ──
|
||||
# Plugin updates are handled by the marketplace plugin update loop below
|
||||
# (step 8). This step refreshes the standalone hook files (statusline +
|
||||
# stats badge) that live outside the plugin in ~/.claude/hooks/.
|
||||
echo ""
|
||||
echo "── Updating Caveman extras (hooks + MCP shrink)..."
|
||||
if [ -f "$HOME/.claude/hooks/caveman-statusline.sh" ]; then
|
||||
CAVEMAN_HOOKS_URL="https://raw.githubusercontent.com/JuliusBrussee/caveman/main/hooks/install.sh"
|
||||
CAVEMAN_HOOKS_TMP="$(mktemp -t caveman-hooks-XXXXXX.sh)"
|
||||
if curl -fsSL "$CAVEMAN_HOOKS_URL" -o "$CAVEMAN_HOOKS_TMP" \
|
||||
&& bash "$CAVEMAN_HOOKS_TMP" --force 2>/dev/null; then
|
||||
ok "Caveman hooks refreshed"
|
||||
else
|
||||
warn "Caveman hooks refresh failed — re-run install-plugins.sh"
|
||||
fi
|
||||
rm -f "$CAVEMAN_HOOKS_TMP"
|
||||
else
|
||||
info "Caveman hooks not installed — skipping (run: make plugin)"
|
||||
fi
|
||||
# MCP shrink uses 'npx -y caveman-shrink' which always fetches latest from
|
||||
# npm at invocation time — no explicit update needed. We only check for
|
||||
# user-defined wrappers (caveman-shrink-*), since the bare proxy fails
|
||||
# health checks without an upstream.
|
||||
if command -v claude &>/dev/null \
|
||||
&& claude mcp list 2>/dev/null | grep -q '^caveman-shrink-'; then
|
||||
ok "caveman-shrink wrappers detected (auto-update via npx -y)"
|
||||
else
|
||||
info "caveman-shrink not wrapped — manual setup (see install-plugins.sh STEP 5.5)"
|
||||
fi
|
||||
|
||||
# ── 7.5. Update external skills (npx skills) ──
|
||||
echo ""
|
||||
echo "── Updating external skills (npx skills)..."
|
||||
|
||||
Reference in New Issue
Block a user