Add package_all.sh and Caddy /skills/ endpoint

Skill files now downloadable at https://cortex.hydrascale.net/skills/<name>.skill

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Symbiont 2026-03-19 20:03:11 +00:00
parent 1c7288edce
commit b09e46ebd1
2 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.skill *.skill
dist/

27
package_all.sh Executable file
View File

@ -0,0 +1,27 @@
#!/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"