-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.sh
More file actions
executable file
·35 lines (35 loc) · 1.36 KB
/
ci.sh
File metadata and controls
executable file
·35 lines (35 loc) · 1.36 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
#!/bin/bash
############################################################
# Script to perform the "Continuous Integration" validation
############################################################
# Create VENV
python -m venv pyenv
source pyenv/bin/activate
# Install the validation tool
pip install skills-ref
# Validate all skills
skills_base_folder=".claude/skills"
for skill_folder in $(ls $skills_base_folder)
do
skill_file="$skills_base_folder/$skill_folder/SKILL.md"
echo "[+] Validate skill file: $skill_file"
pyenv/bin/agentskills validate $skill_file
done
# Update the skills catalog
echo "[+] Generate the skills descriptor file (catalog)"
skills_descriptor="skills_catalog.xml"
skills_folders=""
for skill_folder in $(ls $skills_base_folder)
do
skills_folders="$skills_base_folder/$skill_folder $skills_folders"
done
pyenv/bin/agentskills to-prompt $skills_folders > $skills_descriptor
sed -i 's|/home/runner/work/code-assistant-skills-security-utils/code-assistant-skills-security-utils|https://github.com/righettod/code-assistant-skills-security-utils/tree/main|g' $skills_descriptor
cat $skills_descriptor
echo "[+] Update the skills catalog HTML representation"
xsltproc skills_catalog.xsl skills_catalog.xml > docs/index.html
cd .claude/
rm ../docs/skills.zip 2>/dev/null
date > build-date.txt
zip -r ../docs/skills.zip build-date.txt skills/
rm build-date.txt