Initial project setup with reflect skill
Reusable Claude Code skills shared across projects via symlinks into ~/.claude/skills/. Includes the /reflect skill for structured milestone reflections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
50
scripts/install.sh
Executable file
50
scripts/install.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Symlink all skills from this repo into ~/.claude/skills/ (personal scope)
|
||||
# so they're available across all Claude Code projects.
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
SKILLS_SRC="$REPO_DIR/skills"
|
||||
SKILLS_DST="$HOME/.claude/skills"
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
mkdir -p "$SKILLS_DST"
|
||||
|
||||
installed=0
|
||||
skipped=0
|
||||
|
||||
for skill_dir in "$SKILLS_SRC"/*/; do
|
||||
[ -d "$skill_dir" ] || continue
|
||||
skill_name="$(basename "$skill_dir")"
|
||||
target="$SKILLS_DST/$skill_name"
|
||||
|
||||
if [ -L "$target" ]; then
|
||||
existing="$(readlink -f "$target")"
|
||||
expected="$(readlink -f "$skill_dir")"
|
||||
if [ "$existing" = "$expected" ]; then
|
||||
echo -e "${YELLOW}SKIP${NC} $skill_name (already linked)"
|
||||
skipped=$((skipped + 1))
|
||||
continue
|
||||
else
|
||||
echo -e "${YELLOW}UPDATE${NC} $skill_name (repointing symlink)"
|
||||
rm "$target"
|
||||
fi
|
||||
elif [ -e "$target" ]; then
|
||||
echo -e "${YELLOW}SKIP${NC} $skill_name (non-symlink exists at $target — remove manually to update)"
|
||||
skipped=$((skipped + 1))
|
||||
continue
|
||||
fi
|
||||
|
||||
ln -s "$skill_dir" "$target"
|
||||
echo -e "${GREEN}INSTALLED${NC} $skill_name → $target"
|
||||
installed=$((installed + 1))
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Done. Installed: $installed, Skipped: $skipped"
|
||||
echo "Skills are now available as slash commands in Claude Code (e.g. /reflect M8)"
|
||||
Reference in New Issue
Block a user