16 lines
618 B
Shell
Executable file
16 lines
618 B
Shell
Executable file
#!/bin/sh
|
|
# Copies the skills from the agent-skills repository into skills/.
|
|
# Usage: sh scripts/sync-skills.sh [path to agent-skills] (default: ../agent-skills)
|
|
# Edit the skills in agent-skills, never here: this folder is overwritten.
|
|
set -eu
|
|
here=$(cd "$(dirname "$0")/.." && pwd)
|
|
src=${1:-"$here/../agent-skills"}
|
|
if [ ! -d "$src/skills" ]; then
|
|
echo "sync-skills: $src/skills not found" >&2
|
|
exit 1
|
|
fi
|
|
rm -rf "$here/skills"
|
|
mkdir -p "$here/skills"
|
|
cp -R "$src/skills/." "$here/skills/"
|
|
count=$(find "$here/skills" -name SKILL.md | wc -l | tr -d ' ')
|
|
echo "sync-skills: $count skills copied from $src/skills"
|