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:
parent
1c7288edce
commit
b09e46ebd1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
*.skill
|
||||
dist/
|
||||
|
||||
27
package_all.sh
Executable file
27
package_all.sh
Executable 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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user