Python 88.3%
TypeScript 7.6%
Shell 4.1%
1#!/usr/bin/env bash2# STATUS: LIVE_VERIFIED 2026-09-18 — same sequence executed via scripts/live.py (list anthropic skills, create custom skill,3# retrieve, versions list/create/retrieve, download, delete version, delete skill). Skills API is GA: no beta header needed.4# Usage: source scripts/lib.sh && bash examples/anthropic/skills/skills_lifecycle.sh (requires jq)5set -eo pipefail6cd "$(dirname "$0")/../../.."7# shellcheck disable=SC10918source scripts/lib.sh9OUTF=$(mktemp); trap 'rm -f "$OUTF"' EXIT10call() { ant "$@" > "$OUTF"; OUT="$(cat "$OUTF")"; } # runs a request, keeps body in $OUT and status in $ANT_STATUS1112# 1. Anthropic-provided skills (observed ids: xlsx, pptx, pdf, docx)13ant GET "/v1/skills?source=anthropic" | jq -c '.data[] | {id, display_name, latest_version_id}'; log_request anthropic GET /v1/skills "$ANT_STATUS" 0 "skills example list anthropic"1415# 2. create a tiny custom skill (multipart; files[] repeatable; SKILL.md needs YAML frontmatter name+description)16tmp=$(mktemp -d); mkdir -p "$tmp/atlas-platform-agent-demo"17cat > "$tmp/atlas-platform-agent-demo/SKILL.md" <<'MD'18---19name: atlas-platform-agent-demo20description: Tiny demo skill created by the API Atlas example; says OK when asked for a status check.21---22# Atlas demo skill23When the user asks for a status check, reply with exactly `OK`.24MD25created=$(ant POST /v1/skills -H 'Content-Type: multipart/form-data' -F "files[]=@$tmp/atlas-platform-agent-demo/SKILL.md;filename=atlas-platform-agent-demo/SKILL.md" -F 'display_name=atlas-platform-agent-demo')26log_request anthropic POST /v1/skills "$ANT_STATUS" 0 "skills example create"27sid=$(echo "$created" | jq -r .id); v1=$(echo "$created" | jq -r .latest_version_id); echo "created $sid latest_version_id=$v1"2829# 3. retrieve, versions, latest, download (zip)30ant GET "/v1/skills/$sid" | jq -c '{id, display_name, source}'; log_request anthropic GET "/v1/skills/{id}" "$ANT_STATUS" 0 "skills example retrieve"31ant GET "/v1/skills/$sid/versions" | jq -c '{n: (.data|length), next_page}'; log_request anthropic GET "/v1/skills/{id}/versions" "$ANT_STATUS" 0 "skills example versions"32ant GET "/v1/skills/$sid/versions/latest" | jq -c '{id, name, description}'; log_request anthropic GET "/v1/skills/{id}/versions/latest" "$ANT_STATUS" 0 "skills example version latest"33ant GET "/v1/skills/$sid/versions/$v1/content" > "$tmp/skill.zip"; log_request anthropic GET "/v1/skills/{id}/versions/{v}/content" "$ANT_STATUS" 0 "skills example download"; echo "downloaded $(wc -c < "$tmp/skill.zip") bytes (zip)"3435# 4. new version (2 files) → then delete it (only a non-last version can be deleted)36v2=$(ant POST "/v1/skills/$sid/versions" -H 'Content-Type: multipart/form-data' -F "files[]=@$tmp/atlas-platform-agent-demo/SKILL.md;filename=atlas-platform-agent-demo/SKILL.md" -F "files[]=@$tmp/atlas-platform-agent-demo/SKILL.md;filename=atlas-platform-agent-demo/notes.md" | jq -r .id)37log_request anthropic POST "/v1/skills/{id}/versions" "$ANT_STATUS" 0 "skills example version create"; echo "v2=$v2"38ant DELETE "/v1/skills/$sid/versions/$v2" | jq -c .; log_request anthropic DELETE "/v1/skills/{id}/versions/{v}" "$ANT_STATUS" 0 "skills example version delete"3940# 5. delete skill (removes remaining versions) — cleanup41ant DELETE "/v1/skills/$sid" | jq -c .; log_request anthropic DELETE "/v1/skills/{id}" "$ANT_STATUS" 0 "skills example delete"42rm -rf "$tmp"43