From b09e46ebd1aafb9028a7e08d828619047d01dd9f Mon Sep 17 00:00:00 2001 From: Symbiont Date: Thu, 19 Mar 2026 20:03:11 +0000 Subject: [PATCH] Add package_all.sh and Caddy /skills/ endpoint Skill files now downloadable at https://cortex.hydrascale.net/skills/.skill Co-Authored-By: Claude Opus 4.6 --- .gitignore | 1 + package_all.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 package_all.sh diff --git a/.gitignore b/.gitignore index 108584f..7316aa6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.skill +dist/ diff --git a/package_all.sh b/package_all.sh new file mode 100755 index 0000000..81913ee --- /dev/null +++ b/package_all.sh @@ -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" +