Skill files now downloadable at https://cortex.hydrascale.net/skills/<name>.skill Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
717 B
Bash
Executable File
28 lines
717 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Packages all skills in /data/skills/ into .skill zip files in /data/skills/dist/
|
|
set -e
|
|
|
|
SKILLS_DIR="/data/skills"
|
|
DIST_DIR="/data/skills/dist"
|
|
mkdir -p "$DIST_DIR"
|
|
|
|
cd "$SKILLS_DIR"
|
|
|
|
for skill_dir in */; do
|
|
skill_name="${skill_dir%/}"
|
|
# Skip non-skill directories
|
|
if [ ! -f "$skill_dir/SKILL.md" ]; then
|
|
continue
|
|
fi
|
|
output="$DIST_DIR/${skill_name}.skill"
|
|
echo "Packaging $skill_name -> $output"
|
|
# .skill files are just zips of the skill directory
|
|
cd "$SKILLS_DIR"
|
|
zip -r "$output" "$skill_dir" -x "*.pyc" -x "__pycache__/*" > /dev/null
|
|
echo " Done: $(du -h "$output" | cut -f1)"
|
|
done
|
|
|
|
echo "All skills packaged in $DIST_DIR"
|
|
ls -lh "$DIST_DIR"
|
|
|