agentic-toolkit/setup.sh
Khalim Conn-Kowlessar 66aa00532c fix: use claude-code agent target in setup.sh
`claude` is not a valid value for the skills CLI `--agent` flag;
correct value is `claude-code`. Without this, setup.sh fails with
"Invalid agents: claude" before installing any skills.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 10:43:04 +00:00

73 lines
2.5 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 \
--yes
echo "==> Installing Domna skills from $domna_pkg"
npx --yes skills@latest add "$domna_pkg" \
--skill '*' \
--agent "$AGENT_TARGET" \
--copy \
--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.
2. Commit the skills-lock.json + .claude/skills/ (or whichever directory
the installer wrote to) so teammates can reproduce.
3. Re-run setup.sh whenever agentic-toolkit bumps its pinned versions.
EOF