-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
54 lines (46 loc) · 1.71 KB
/
setup
File metadata and controls
54 lines (46 loc) · 1.71 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
# assay setup — register verification skills with Claude Code
set -e
ASSAY_DIR="$(cd "$(dirname "$0")" && pwd -P)"
CLAUDE_SKILLS_DIR="$HOME/.claude/skills"
echo "assay — verification skills for Claude Code"
echo ""
# ─── Ensure ~/.claude/skills/ exists ─────────────────────────────────
mkdir -p "$CLAUDE_SKILLS_DIR"
# ─── Link assay repo into skills directory ───────────────────────────
ASSAY_LINK="$CLAUDE_SKILLS_DIR/assay"
if [ -L "$ASSAY_LINK" ]; then
# Update existing symlink
ln -snf "$ASSAY_DIR" "$ASSAY_LINK"
echo " updated: $ASSAY_LINK -> $ASSAY_DIR"
elif [ -e "$ASSAY_LINK" ]; then
echo " error: $ASSAY_LINK exists and is not a symlink" >&2
echo " remove it manually and re-run setup" >&2
exit 1
else
ln -snf "$ASSAY_DIR" "$ASSAY_LINK"
echo " linked: $ASSAY_LINK -> $ASSAY_DIR"
fi
# ─── Link each skill into skills directory ───────────────────────────
linked=()
for skill_dir in "$ASSAY_DIR"/*/; do
if [ -f "$skill_dir/SKILL.md" ]; then
skill_name="$(basename "$skill_dir")"
target="$CLAUDE_SKILLS_DIR/$skill_name"
if [ -L "$target" ] || [ ! -e "$target" ]; then
ln -snf "assay/$skill_name" "$target"
linked+=("$skill_name")
else
echo " skipped: $skill_name (target exists and is not a symlink)"
fi
fi
done
if [ ${#linked[@]} -gt 0 ]; then
echo " linked skills: ${linked[*]}"
else
echo " no skills found (SKILL.md files not yet created)"
fi
echo ""
echo "assay ready."
echo " skills dir: $CLAUDE_SKILLS_DIR/assay"
echo " source: $ASSAY_DIR"