Files
computer-playbook/scripts/install/skills/update.sh
T
Environment TestandClaude Sonnet 4.6 6c8547c6a4 feat(skills): add agent skills install/update pipeline and caveman docs
- Add scripts/install/skills/install.sh to restore skills from
  skills-lock.json via npx skills experimental_install
- Add scripts/install/skills/update.sh to update all skills by
  re-running skills add for each source in skills-lock.json
- Add make install-skills and make update-skills targets
- Add .github/workflows/update-skills.yml for daily automated updates
  matching Dependabot schedule (00:00 UTC), opens PR on lock changes
- Add docs/agents/meta/caveman.md as SPOT for caveman mode, startup
  notification, and token-budget tier progression
- Update AGENTS.md with RFC 2119-compliant skills installation check
- Update docs/agents/action/commit.md: replace ALWAYS with MUST
- Update pyproject.toml: respect-gitignore = true, exclude .agents
- Track skills-lock.json and add .agents to .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 12:54:43 +02:00

39 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# shellcheck shell=bash
# Update all agent skills to their latest versions and refresh skills-lock.json.
# Reads unique sources from skills-lock.json and re-runs skills add for each.
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd -- "${SCRIPT_DIR}/../../.." && pwd)"
log() { printf '%s\n' "$*"; }
warn() { printf '%s\n' "$*" >&2; }
if ! command -v npx &>/dev/null; then
warn "skills: npx not found — cannot update."
warn "Install Node.js to enable skills: https://nodejs.org"
exit 1
fi
if ! command -v jq &>/dev/null; then
warn "skills: jq not found — cannot parse skills-lock.json."
exit 1
fi
cd "${REPO_ROOT}"
lockfile="skills-lock.json"
if [[ ! -f "${lockfile}" ]]; then
warn "skills: ${lockfile} not found in ${REPO_ROOT}."
exit 1
fi
log "skills: updating from ${lockfile}..."
jq -r '.skills[].source' "${lockfile}" | sort -u | while read -r source; do
log "skills: updating ${source}..."
npx --yes skills add --yes "${source}"
done
log "skills: update complete."