-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·131 lines (112 loc) · 3.18 KB
/
Copy pathbootstrap.sh
File metadata and controls
executable file
·131 lines (112 loc) · 3.18 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/usr/bin/env bash
set -euo pipefail
repo_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
cd "$repo_dir"
cli=(npx --yes skills@1.5.14)
agents=(codex claude-code)
managed_skill_roots=(
"${HOME}/.agents/skills"
"${CLAUDE_CONFIG_DIR:-${HOME}/.claude}/skills"
)
run_add() {
local add_log
add_log="$(mktemp "${TMPDIR:-/tmp}/agent-skills-add.XXXXXX")"
if ! "${cli[@]}" add "$@" 2>&1 | tee "$add_log"; then
rm -f "$add_log"
return 1
fi
if grep -Fq "Failed to install" "$add_log"; then
echo "skills@1.5.14 reported a partial installation." >&2
rm -f "$add_log"
return 1
fi
rm -f "$add_log"
}
owned_skills=(
code-review
gemini-files-api
harness-engineering
hint-overlay-visual-verification
ios-xcodegen
lifecycle-and-side-effects-correctness
mechanism-audit
meeting-transcription
silent-pushes-setup
spec-creation-updating
swift-testing
swiftui-view-refactor
xcode-build
xcode-cloud
)
run_add . \
--global --agent "${agents[@]}" --skill "${owned_skills[@]}" --yes --copy
run_add 'jamesrochabrun/skills#2.1.1' \
--global --agent "${agents[@]}" --skill swift-concurrency --yes --copy
asc_skills=(
asc-app-create-ui
asc-apple-ads
asc-aso-audit
asc-build-lifecycle
asc-cli-usage
asc-crash-triage
asc-id-resolver
asc-localize-metadata
asc-metadata-sync
asc-notarization
asc-ppp-pricing
asc-release-flow
asc-revenuecat-catalog-sync
asc-screenshot-resize
asc-shots-pipeline
asc-signing-setup
asc-submission-health
asc-subscription-localization
asc-testflight-orchestration
asc-whats-new-writer
asc-workflow
asc-xcode-build
)
asc_commit='c77169ab1a9595bbd426ec943797b36072ccf8e3'
asc_source_dir="$(mktemp -d "${TMPDIR:-/tmp}/asc-skills-source.XXXXXX")"
cleanup_asc_source() {
rm -rf -- "$asc_source_dir"
}
trap cleanup_asc_source EXIT
git -C "$asc_source_dir" init --quiet
git -C "$asc_source_dir" remote add origin \
'https://github.com/rorkai/app-store-connect-cli-skills.git'
git -C "$asc_source_dir" fetch --quiet --depth 1 origin "$asc_commit"
git -C "$asc_source_dir" checkout --quiet --detach FETCH_HEAD
if [[ "$(git -C "$asc_source_dir" rev-parse HEAD)" != "$asc_commit" ]]; then
echo "ASC skill source did not resolve to the reviewed commit." >&2
exit 1
fi
run_add "$asc_source_dir" \
--global --agent "${agents[@]}" --skill "${asc_skills[@]}" --yes --copy
cleanup_asc_source
trap - EXIT
managed_skills=(
"${owned_skills[@]}"
swift-concurrency
"${asc_skills[@]}"
)
for skill_root in "${managed_skill_roots[@]}"; do
missing=false
for skill in "${managed_skills[@]}"; do
if [[ ! -f "$skill_root/$skill/SKILL.md" ]]; then
echo "Missing managed skill entrypoint: $skill_root/$skill/SKILL.md" >&2
missing=true
fi
done
if [[ "$missing" == true ]]; then
exit 1
fi
done
for skill_root in "${managed_skill_roots[@]}"; do
bash "$skill_root/gemini-files-api/scripts/bootstrap.sh"
if [[ ! -f "$skill_root/gemini-files-api/scripts/node_modules/@google/genai/package.json" ]]; then
echo "Gemini dependency bootstrap did not complete in $skill_root." >&2
exit 1
fi
done
echo "Installed the ${#managed_skills[@]}-skill global baseline. Restart agent clients to reload skills."