/vastai-pack:vastai-upgrade-migrationfrom vastai-pack
Upgrades Vast.ai CLI, migrates API versions, and handles breaking changes. Useful when updating vastai, detecting deprecations, or migrating between API versions.
Ships in vastai-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
!vastai --version 2>/dev/null || echo 'vastai CLI not installed'
!pip show vastai 2>/dev/null | grep -E "^(Name|Version)" || echo 'N/A'
Upgrade the Vast.ai CLI and Python SDK, handle API changes, and migrate between GPU configurations. The CLI is distributed via PyPI as vastai and tracks the REST API at cloud.vast.ai/api/v0.
vastai CLI installed# Check installed version
vastai --version
pip show vastai | grep Version
# Upgrade to latest
pip install --upgrade vastai
# Verify upgrade
vastai --version
vastai show user # Verify auth still works
# Compare CLI help output before and after upgrade
import subprocess
def get_cli_commands():
result = subprocess.run(["vastai", "--help"], capture_output=True, text=True)
commands = set()
for line in result.stdout.split('\n'):
stripped = line.strip()
if stripped and not stripped.startswith('-') and not stripped.startswith('usage'):
cmd = stripped.split()[0] if stripped.split() else ""
if cmd.isalpha():
commands.add(cmd)
return commands
# Run before and after upgrade to detect removed commands
# The REST API is at v0 — if Vast.ai introduces v1, update base URL
OLD_BASE = "https://cloud.vast.ai/api/v0"
NEW_BASE = "https://console.vast.ai/api/v0" # Alternative endpoint
# Test both endpoints
import requests
for base in [OLD_BASE, NEW_BASE]:
try:
resp = requests.get(f"{base}/users/current",
headers={"Authorization": f"Bearer {api_key}"})
print(f"{base}: {resp.status_code}")
except Exception as e:
print(f"{base}: {e}")
# Update GPU workload images to latest CUDA
# Old: pytorch/pytorch:1.13-cuda11.7-runtime
# New: pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime
# Test new image locally before deploying
docker pull pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime
docker run --rm pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime python -c "import torch; print(torch.__version__)"
# Verify CUDA compatibility with target GPU hosts
vastai search offers 'cuda_max_good>=12.1 num_gpus=1' --limit 5
#!/bin/bash
set -euo pipefail
echo "Post-upgrade verification..."
vastai show user && echo " Auth: OK"
vastai search offers 'num_gpus=1 rentable=true' --limit 1 --raw | python3 -c "import sys,json; offers=json.load(sys.stdin); print(f' Search: OK ({len(offers)} offers)')"
vastai show instances && echo " Instances: OK"
echo "Upgrade verified."
| Error | Cause | Solution |
|---|---|---|
| CLI command removed after upgrade | Breaking change in new version | Pin to previous version: pip install vastai==0.2.8 |
| Auth fails after upgrade | API key format changed | Re-run vastai set api-key YOUR_KEY |
| CUDA mismatch after image update | Host CUDA older than image requires | Filter offers by cuda_max_good>=VERSION |
For CI/CD integration, see vastai-ci-integration.
Safe upgrade: Pin the current version in requirements.txt, upgrade in a test environment, run the verification script, then update production.
CUDA migration: Move from CUDA 11.7 to 12.1 by updating Docker images and filtering offers with cuda_max_good>=12.1.
What SKILL.md sets; muted values are Claude Code's defaults
24 skills in this plugin
/vastai-ci-integrationConfigure Vast.ai CI/CD integration with GitHub Actions and automated GPU testing.
Use when setting up automated testing on GPU instances,
or integrating Vast.ai provisioning into CI/CD pipelines.
Trigger with phrases like "vastai CI", "vastai github actions",
"vastai automated testing", "vastai pipeline".
/vastai-common-errorsDiagnose and fix Vast.ai common errors and exceptions.
Use when encountering Vast.ai errors, debugging failed instances,
or troubleshooting GPU rental issues.
Trigger with phrases like "vastai error", "fix vastai",
"vastai not working", "debug vastai", "vastai instance failed".
/vastai-core-workflow-aExecute Vast.ai primary workflow: GPU instance provisioning and job execution.
Use when renting GPUs for training, searching offers by price and specs,
or managing the full instance lifecycle from search to teardown.
Trigger with phrases like "vastai rent gpu", "vastai training job",
"vastai provision instance", "run job on vastai".
/vastai-core-workflow-bExecute Vast.ai secondary workflow: multi-instance orchestration, spot recovery, and cost optimization.
Use when running distributed training, handling spot preemption,
or optimizing GPU spend across multiple instances.
Trigger with phrases like "vastai distributed training", "vastai spot recovery",
"vastai multi-gpu", "vastai cost optimization".
/vastai-cost-tuningOptimize Vast.ai GPU cloud costs through smart instance selection and lifecycle management.
Use when analyzing GPU spending, reducing training costs,
or implementing budget controls for Vast.ai workloads.
Trigger with phrases like "vastai cost", "vastai billing",
"reduce vastai costs", "vastai pricing", "vastai budget".
/vastai-data-handlingManage training data and model artifacts securely on Vast.ai GPU instances.
Use when transferring data to instances, managing checkpoints,
or implementing secure data lifecycle on rented hardware.
Trigger with phrases like "vastai data", "vastai upload data",
"vastai checkpoints", "vastai data security", "vastai artifacts".
npx claudepluginhub flight505/skill-forge --plugin vastai-packOther plugins' skills for the same job