#!/bin/sh # Pull ECC skills from this site into a project's skills directory. # Usage: SKILLS_BASE=https://your-host sh pull-skills.sh api-design tdd-workflow # Skills are from Everything Claude Code by Affaan Mustafa (github.com/affaan-m/ECC), MIT. set -eu base="${SKILLS_BASE:?set SKILLS_BASE to the site URL}" base="${base%/}" dest="${SKILLS_DEST:-.claude/skills}" [ "$#" -gt 0 ] || { echo "usage: SKILLS_BASE= sh pull-skills.sh [...]" >&2; exit 2; } mkdir -p "$dest" tmp=$(mktemp -d) trap 'rm -rf "$tmp"' EXIT for name in "$@"; do case "$name" in *[!a-z0-9._-]*|.*) echo "skipping invalid skill name: $name" >&2; continue ;; esac curl -fsSL "$base/downloads/$name.zip" -o "$tmp/$name.zip" if command -v unzip >/dev/null 2>&1; then unzip -oq "$tmp/$name.zip" -d "$dest" else python3 -m zipfile -e "$tmp/$name.zip" "$dest" fi echo "installed $dest/$name" done