-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup
More file actions
executable file
·40 lines (33 loc) · 1.02 KB
/
setup
File metadata and controls
executable file
·40 lines (33 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
set -e
IDSTACK_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILLS_DIR="$HOME/.claude/skills"
# Support --local flag for project-scoped install
if [ "$1" = "--local" ]; then
SKILLS_DIR="$(pwd)/.claude/skills"
fi
mkdir -p "$SKILLS_DIR"
echo "Installing idstack..."
echo " source: $IDSTACK_DIR"
echo " target: $SKILLS_DIR"
echo ""
# Link repo root so skill symlinks can resolve relatively
ln -snf "$IDSTACK_DIR" "$SKILLS_DIR/idstack"
# Link each skill directory that contains a SKILL.md
for skill_dir in "$IDSTACK_DIR"/*/; do
if [ -f "$skill_dir/SKILL.md" ]; then
skill_name="$(basename "$skill_dir")"
target="$SKILLS_DIR/$skill_name"
if [ -L "$target" ] || [ ! -e "$target" ]; then
ln -snf "idstack/$skill_name" "$target"
echo " linked: /$skill_name"
else
echo " skipped: $skill_name (non-symlink already exists at $target)"
fi
fi
done
echo ""
echo "idstack installed successfully."
echo " Skills directory: $SKILLS_DIR"
echo ""
echo "Open Claude Code and try: /needs-analysis"