-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync-github-skills.sh
More file actions
executable file
·39 lines (35 loc) · 1.51 KB
/
sync-github-skills.sh
File metadata and controls
executable file
·39 lines (35 loc) · 1.51 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
#!/usr/bin/env bash
set -euo pipefail
# Re-clone all GitHub-managed skills into the toolkit
# Usage: ./sync-github-skills.sh
SKILLS="plugins/watson-toolkit/skills"
sync_gh() {
local name="$1" repo="$2" subpath="${3:-}"
echo "Syncing $name from $repo..."
local tmp=$(mktemp -d)
git clone --depth 1 "$repo" "$tmp" 2>&1 | tail -1
if [[ -n "$subpath" ]]; then
if [[ ! -d "$tmp/$subpath" ]]; then
echo "ERROR: subpath '$subpath' not found in $repo — aborting $name sync (keeping existing copy)"
rm -rf "$tmp"
return 1
fi
rm -rf "$SKILLS/$name"
cp -r "$tmp/$subpath" "$SKILLS/$name"
else
rm -rf "$SKILLS/$name"
mv "$tmp" "$SKILLS/$name"
fi
rm -rf "$tmp" "$SKILLS/$name/.git"
}
sync_gh "autoresearch" "https://github.com/uditgoenka/autoresearch.git" ".claude/skills/autoresearch"
sync_gh "complete-code-review" "https://github.com/jeremyknows/complete-code-review.git"
sync_gh "decide" "https://github.com/jeremyknows/decide.git"
sync_gh "humanizer" "https://github.com/blader/humanizer.git"
sync_gh "prism" "https://github.com/jeremyknows/PRISM.git"
sync_gh "publish-skills" "https://github.com/jeremyknows/publish-skills.git"
sync_gh "random-thought" "https://github.com/jeremyknows/random-thought.git"
sync_gh "skill-doctor" "https://github.com/jeremyknows/skill-doctor.git"
sync_gh "x-fetch" "https://github.com/jeremyknows/x-fetch.git"
echo ""
echo "Done. Run 'git diff --stat' to review, then commit."