#!/bin/bash # install-paliadin-skill — copy the Paliadin skill into the local Claude # Code config so the long-lived `claude` pane on this host picks it up. # # Run on every host that hosts a Paliadin tmux session — that means: # - mRiver (m's laptop, the prod target reached via SSH from paliad.de) # - any laptop running paliad's LocalPaliadinService directly # # The skill at ~/.claude/skills/paliadin/SKILL.md is what teaches Claude # to react to `[PALIADIN:]` envelopes by writing the response to # /tmp/paliadin/.txt. It survives /clear and fresh sessions because # Claude's skill router auto-matches by description, not by an in-memory # system prompt. # # Idempotent — re-running after a repo update is the supported way to # refresh the skill on a host. set -euo pipefail src_dir="$(cd "$(dirname "$0")/skills/paliadin" && pwd)" dst_dir="${CLAUDE_SKILLS_DIR:-$HOME/.claude/skills}/paliadin" if [[ ! -f "$src_dir/SKILL.md" ]]; then echo "install-paliadin-skill: missing $src_dir/SKILL.md" >&2 exit 1 fi mkdir -p "$dst_dir" cp "$src_dir/SKILL.md" "$dst_dir/SKILL.md" echo "installed: $dst_dir/SKILL.md"