-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-claude-skill.sh
More file actions
executable file
·74 lines (64 loc) · 2.09 KB
/
install-claude-skill.sh
File metadata and controls
executable file
·74 lines (64 loc) · 2.09 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
set -euo pipefail
REPO="codewriter-packages/Unity-Prefab-XML"
BRANCH="main"
BASE_URL="https://raw.githubusercontent.com/${REPO}/${BRANCH}"
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
TARGET="$HOME/.claude"
for arg in "$@"; do
case "$arg" in
--local) TARGET=".claude" ;;
--help|-h)
echo "Usage: install-claude-skill.sh [--local]"
echo ""
echo "Install PrefabXML skill and agent for Claude Code."
echo ""
echo "By default installs to ~/.claude (available in all projects)."
echo "Use --local to install into .claude/ in the current directory."
exit 0
;;
*)
echo "Unknown option: $arg (use --help for usage)"
exit 1
;;
esac
done
SKILL_DIR="$TARGET/skills/prefabxml"
AGENT_DIR="$TARGET/agents"
echo -e "${GREEN}PrefabXML Claude Skill Installer${NC}"
echo "================================="
echo ""
echo "Target: $TARGET"
echo ""
mkdir -p "$SKILL_DIR" "$AGENT_DIR"
download() {
local url="${BASE_URL}/$1"
local dest="$2"
echo -n " ${dest} ... "
if curl -fsSL "$url" -o "$dest" 2>/dev/null; then
echo -e "${GREEN}ok${NC}"
else
echo -e "${YELLOW}failed${NC}"
return 1
fi
}
echo "Downloading files:"
download ".claude/skills/prefabxml/SKILL.md" "$SKILL_DIR/SKILL.md"
download "FORMAT.md" "$SKILL_DIR/FORMAT.md"
download "GUIDE.md" "$SKILL_DIR/GUIDE.md"
download ".claude/skills/prefabxml/TEMPLATES.md" "$SKILL_DIR/TEMPLATES.md"
download ".claude/agents/agent-prefabxml.md" "$AGENT_DIR/agent-prefabxml.md"
echo ""
echo -e "${GREEN}Done!${NC}"
echo ""
echo "Installed:"
echo " Skill: /prefabxml — generate .prefabxml from text description"
echo " Agent: agent-prefabxml — parallel prefab generation subagent"
echo ""
echo "Usage:"
echo " /prefabxml settings panel with volume slider and music toggle"
echo " @agent-prefabxml create a leaderboard screen"
echo ""
echo -e "${YELLOW}To update, run this script again.${NC}"