From burrow
Use when installing burrow as a Claude Code plugin, setting up burrow on a new system, or when the user says 'install burrow', 'set up burrow', 'add burrow plugin'. Handles all registration, symlinking, venv creation, and verification automatically.
How this skill is triggered — by the user, by Claude, or both
Slash command
/burrow:installThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Fully automated installation of burrow as a Claude Code plugin. Discovers all paths dynamically — no hardcoded assumptions.
Fully automated installation of burrow as a Claude Code plugin. Discovers all paths dynamically — no hardcoded assumptions.
Locate the burrow repo on this system. Check in order:
# Check common locations dynamically
BURROW_DIR=""
for candidate in \
"$(pwd)" \
"$(dirname "${CLAUDE_PLUGIN_ROOT:-/dev/null}")" \
"$HOME/.claude/plugins/burrow" \
"/workspace/burrow" \
"$(find / -maxdepth 4 -name 'pyproject.toml' -path '*/burrow/*' 2>/dev/null | head -1 | xargs dirname 2>/dev/null)"; do
if [ -f "$candidate/burrow/protocol.py" ] && [ -f "$candidate/.claude-plugin/plugin.json" ]; then
BURROW_DIR="$candidate"
break
fi
done
If not found, clone it:
git clone https://github.com/slapglif/burrow.git ~/.claude/plugins/burrow
BURROW_DIR="$HOME/.claude/plugins/burrow"
cd "$BURROW_DIR"
uv venv 2>/dev/null || python3 -m venv .venv
uv pip install -e . 2>/dev/null || .venv/bin/pip install -e .
Verify the MCP server imports:
cd "$BURROW_DIR" && .venv/bin/python -c "from burrow.mcp_server import mcp; print('OK')"
Dynamically find the Claude config directory:
CLAUDE_DIR="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
PLUGINS_DIR="$CLAUDE_DIR/plugins"
SETTINGS="$CLAUDE_DIR/settings.json"
INSTALLED="$PLUGINS_DIR/installed_plugins.json"
if [ "$(readlink -f "$BURROW_DIR")" != "$(readlink -f "$PLUGINS_DIR/burrow" 2>/dev/null)" ]; then
ln -sfn "$BURROW_DIR" "$PLUGINS_DIR/burrow"
fi
Use Python to add the entry dynamically:
import json, os
from datetime import datetime, timezone
installed_path = os.path.expanduser("~/.claude/plugins/installed_plugins.json")
burrow_dir = os.path.realpath(BURROW_DIR)
with open(installed_path) as f:
data = json.load(f)
now = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.000Z")
# Get git SHA if available
sha = ""
try:
import subprocess
sha = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=burrow_dir).decode().strip()
except Exception:
pass
data.setdefault("plugins", {})["burrow@local"] = [{
"scope": "user",
"installPath": burrow_dir,
"version": "0.2.0",
"installedAt": now,
"lastUpdated": now,
"gitCommitSha": sha
}]
with open(installed_path, "w") as f:
json.dump(data, f, indent=2)
import json, os
settings_path = os.path.expanduser("~/.claude/settings.json")
with open(settings_path) as f:
data = json.load(f)
data.setdefault("enabledPlugins", {})["burrow@local"] = True
with open(settings_path, "w") as f:
json.dump(data, f, indent=2)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \
| timeout 5 uv --directory "$BURROW_DIR" run burrow-mcp 2>/dev/null \
| python3 -c "import json,sys; d=json.loads(sys.stdin.readline()); print('MCP OK:', d['result']['serverInfo']['name'])"
cd "$BURROW_DIR" && .venv/bin/python -c "
import asyncio
from burrow.peer import Peer
async def test():
p = Peer('wss://reg.ai-smith.net', 'install-test')
await p.connect()
print(f'Registry OK: connected as {p.id}')
await p.ws.close()
asyncio.run(test())
"
Print a summary:
uv not installed: Install with curl -LsSf https://astral.sh/uv/install.sh | shuv venv + uv pip install, never --systemln -sfn (force + no-deref) to overwrite safely{"version": 2, "plugins": {}} first{"enabledPlugins": {}} firstwss://reg.ai-smith.net — no local port needed for clientsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub slapglif/burrow