agentic-toolkit/setup.sh
2026-05-05 16:51:23 +00:00

69 lines
2.3 KiB
Bash
Executable file

#!/usr/bin/env bash
#
# Install Domna's curated skill set into the current repo.
#
# Run from the root of the target repo:
# curl -fsSL https://raw.githubusercontent.com/Hestia-Homes/agentic-toolkit/main/setup.sh | bash
# Or, if you've cloned agentic-toolkit:
# bash /path/to/agentic-toolkit/setup.sh
#
# What this does:
# 1. Adds Matt Pocock's skills (mattpocock/skills) at the version Domna trusts.
# 2. Adds Domna's own skills (Hestia-Homes/agentic-toolkit).
# 3. Writes/updates skills-lock.json so the install is reproducible.
#
# To upgrade Matt's skills across all Domna repos:
# - Bump MATTPOCOCK_REF in this script (agentic-toolkit repo).
# - Devs re-run setup.sh in their target repos.
#
set -euo pipefail
# --- pinned versions -----------------------------------------------------------
# Bump these refs in agentic-toolkit when Domna decides to upgrade. Devs in
# target repos pick up the new pins on their next setup.sh run.
MATTPOCOCK_SOURCE="mattpocock/skills"
MATTPOCOCK_REF="" # leave empty to track HEAD; set to a commit SHA to pin
DOMNA_SOURCE="Hestia-Homes/agentic-toolkit"
DOMNA_REF="" # leave empty to track HEAD; set to a commit SHA to pin
AGENT_TARGET="claude-code" # Claude Code agent install layout
# --- guards --------------------------------------------------------------------
if ! command -v npx >/dev/null 2>&1; then
echo "error: npx is required (install Node.js >= 20)." >&2
exit 1
fi
if [[ ! -d .git ]]; then
echo "error: run this script from the root of a git repository." >&2
exit 1
fi
# --- install -------------------------------------------------------------------
mattpocock_pkg="$MATTPOCOCK_SOURCE${MATTPOCOCK_REF:+#$MATTPOCOCK_REF}"
domna_pkg="$DOMNA_SOURCE${DOMNA_REF:+#$DOMNA_REF}"
echo "==> Installing Matt Pocock skills from $mattpocock_pkg"
npx --yes skills@latest add "$mattpocock_pkg" \
--skill '*' \
--agent "$AGENT_TARGET" \
--copy \
--global \
--yes
echo "==> Installing Domna skills from $domna_pkg"
npx --yes skills@latest add "$domna_pkg" \
--skill '*' \
--agent "$AGENT_TARGET" \
--copy \
--global \
--yes
# --- post-install reminder -----------------------------------------------------
cat <<'EOF'
==> Done. Next steps:
1. Run /setup-matt-pocock-skills (one-time per repo) to record the issue
tracker, triage labels, and domain-doc layout.
EOF