#!/bin/sh # Install the proxium memory skills for any agent that reads Agent Skills (SKILL.md). # # curl -fsSL https://proxium.tech/skills/install.sh | sh # curl -fsSL https://proxium.tech/skills/install.sh | sh -s -- --project # # The skills tell an agent when to read the proxium project memory and when to # write to it. They need the proxium MCP server connected in the agent: # https://proxium.tech/connect # # Folders (agentskills.io): # ~/.agents/skills Codex, Gemini CLI, Cursor, GitHub Copilot, VS Code, OpenCode, goose, Amp # ~/.claude/skills Claude Code # --project writes to ./.agents/skills and ./.claude/skills of the current folder, # for a repository the whole team shares. --dir PATH writes to PATH only. # # It replaces only the folders proxium-memory, proxium-memory-recall and # proxium-memory-save, and touches nothing else. set -eu BASE="${PROXIUM_SKILLS_URL:-https://proxium.tech/skills}" SKILLS="proxium-memory proxium-memory-recall proxium-memory-save" usage() { echo "usage: install.sh [--project | --dir PATH]" >&2 exit 2 } case "${1:-}" in "") TARGETS="$HOME/.agents/skills $HOME/.claude/skills" ;; --project) TARGETS="$(pwd)/.agents/skills $(pwd)/.claude/skills" ;; --dir) [ -n "${2:-}" ] || usage; TARGETS="$2" ;; -h|--help) usage ;; *) usage ;; esac command -v curl >/dev/null 2>&1 || { echo "install.sh: curl is needed" >&2; exit 1; } TMP="$(mktemp -d)" trap 'rm -rf "$TMP"' EXIT INT TERM # Download every skill before writing one, so a failed download changes nothing. for s in $SKILLS; do mkdir -p "$TMP/$s" if ! curl -fsSL "$BASE/$s/SKILL.md" -o "$TMP/$s/SKILL.md"; then echo "install.sh: could not download $BASE/$s/SKILL.md" >&2 exit 1 fi head -n 1 "$TMP/$s/SKILL.md" | grep -q '^---$' || { echo "install.sh: $BASE/$s/SKILL.md is not a skill file" >&2 exit 1 } done for t in $TARGETS; do mkdir -p "$t" for s in $SKILLS; do rm -rf "${t:?}/$s" mkdir -p "$t/$s" cp "$TMP/$s/SKILL.md" "$t/$s/SKILL.md" done echo "installed $SKILLS into $t" done echo "Connect the MCP server too, if you have not: https://proxium.tech/connect"