Files
z 63dca40710 docs: split monolithic replicate skill into four focused skills
Replaces the single skills/replicate/ skill with four:

- find-models: search API, collections, schemas, model selection guidance
- compare-models: evaluating models by cost, speed, quality, capabilities
- run-models: predictions, polling, webhooks, streaming, file I/O, concurrency, multi-model workflows
- prompt-images: prompting techniques for image generation and editing models (sourced from 14 Replicate blog posts)

The find-models and run-models skills include runnable code snippets in bash, Python, and JavaScript pulled from the comprehensive skill branch. The prompt-images skill is new content distilled from Replicate's blog.

Also updates script/lint to validate all skills by default.
2026-04-17 07:47:05 -07:00

47 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
# script/lint: Validate Agent Skills definitions with skills-ref.
# skills-ref is the reference CLI for the Agent Skills spec (agentskills.io).
# It provides the `agentskills` executable with a `validate` subcommand.
# Uses uvx if available for a clean, isolated install of the validator.
# Falls back to a local Python module install if uv is not present.
set -e
cd "$(dirname "$0")/.."
[ -z "$DEBUG" ] || set -x
if [ $# -gt 0 ]; then
SKILL_PATHS="$*"
else
SKILL_PATHS=""
for d in skills/*/; do
[ -f "$d/SKILL.md" ] && SKILL_PATHS="$SKILL_PATHS $d"
done
fi
validate() {
if command -v uv >/dev/null 2>&1; then
uvx --from skills-ref agentskills validate "$1"
return
fi
PYTHON_BIN="${PYTHON_BIN:-python3}"
if ! command -v "$PYTHON_BIN" >/dev/null 2>&1; then
if command -v python >/dev/null 2>&1; then
PYTHON_BIN=python
else
echo "python not found. Install Python 3 or uv to run skills-ref." >&2
exit 1
fi
fi
"$PYTHON_BIN" -m skills_ref validate "$1"
}
for SKILL_PATH in $SKILL_PATHS; do
echo "==> Validating Agent Skills in $SKILL_PATH"
validate "$SKILL_PATH"
done