#!/usr/bin/env bash # dsh-skills — shared DeepSeek Harness skills installer (bash/macOS/Linux) # Copies/updates the skills catalog into the DSH user skills directory. set -euo pipefail # Resolve target: $1 if given, else $DSH_HOME/skills else ~/.dsh/skills TARGET="${1:-}" if [ -z "$TARGET" ]; then if [ -n "${DSH_HOME:-}" ]; then TARGET="$DSH_HOME/skills"; else TARGET="$HOME/.dsh/skills"; fi fi SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SRC="$SCRIPT_DIR/skills" if [ ! -d "$SRC" ]; then echo "skills/ directory not found at $SRC. Run from a repo clone." >&2 exit 1 fi mkdir -p "$TARGET" for dir in "$SRC"/*/; do name="$(basename "$dir")" echo "Syncing skill: $name" rm -rf "$TARGET/$name" cp -R "$dir" "$TARGET/$name" done echo "Done. Skills installed to $TARGET. Restart the agent to refresh the catalog."