-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·54 lines (47 loc) · 1.57 KB
/
Copy pathsetup
File metadata and controls
executable file
·54 lines (47 loc) · 1.57 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
# vouch — install Claude Code plugin via symlinks into ~/.claude/
set -euo pipefail
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CLAUDE_DIR="${HOME}/.claude"
SKILLS_DIR="${CLAUDE_DIR}/skills"
AGENTS_DIR="${CLAUDE_DIR}/agents"
mkdir -p "${SKILLS_DIR}" "${AGENTS_DIR}"
echo "Installing vouch from: ${REPO_DIR}"
echo
# Skills (each is a directory; we symlink the directory)
for skill in vouch-init vouch-run vouch-verify vouch-promote vouch-witness vouch-status vouch-resume; do
src="${REPO_DIR}/skills/${skill}"
dst="${SKILLS_DIR}/${skill}"
if [[ -e "${dst}" || -L "${dst}" ]]; then
# Refuse to clobber a non-symlink — that's the user's own thing
if [[ -L "${dst}" ]]; then
rm "${dst}"
else
echo "✗ refusing to overwrite ${dst} (not a symlink)" >&2
exit 1
fi
fi
ln -s "${src}" "${dst}"
echo " ✓ skill: ${skill}"
done
echo
# Subagents (single .md files)
for agent in vouch-stage vouch-adversary vouch-judge; do
src="${REPO_DIR}/agents/${agent}.md"
dst="${AGENTS_DIR}/${agent}.md"
if [[ -e "${dst}" || -L "${dst}" ]]; then
if [[ -L "${dst}" ]]; then
rm "${dst}"
else
echo "✗ refusing to overwrite ${dst} (not a symlink)" >&2
exit 1
fi
fi
ln -s "${src}" "${dst}"
echo " ✓ agent: ${agent}"
done
echo
echo "Helpers stay in: ${REPO_DIR}/helpers/"
echo "Skills locate them via the PLUGIN_DIR convention they describe."
echo
echo "Installed. Next: /vouch-init in any project directory."