VA

vastai-cost-tuning

Reduce Vast.ai cloud costs by optimizing instance selection and automating usage monitoring.

Install

mkdir -p .claude/skills/vastai-cost-tuning && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/6640" && unzip -o skill.zip -d .claude/skills/vastai-cost-tuning && rm skill.zip

Installs to .claude/skills/vastai-cost-tuning

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Optimize Vast.ai GPU cloud costs through smart instance selection and
69 charsno explicit “when” trigger
Intermediate

Key capabilities

  • →Select GPUs based on cost-per-TFLOP analysis
  • →Compare interruptible and on-demand instance pricing
  • →Implement auto-destroy safeguards for instances
  • →Detect and destroy idle GPU instances
  • →Generate daily cost burn rate reports
  • →Pre-install dependencies in Docker images

How it works

The skill analyzes GPU specifications and pricing to recommend cost-efficient instances, then implements scripts to manage instance lifecycles and monitor utilization. It uses `vastai` CLI commands and Python scripts to automate these tasks.

Inputs & outputs

You give it
Vast.ai instance data, GPU specifications, desired maximum hours
You get back
GPU cost-efficiency analysis, spot vs on-demand comparison, auto-destroy watchdog, idle instance detection script, daily cost burn rate report

When to use vastai-cost-tuning

  • →Compare cost-per-TFLOP across different GPU models
  • →Automate instance lifecycle management
  • →Implement auto-destroy safeguards for idle instances
  • →Analyze Vast.ai billing and usage history

About this skill

Vast.ai GPU Cost and Leakage Control

Overview

Optimize total useful-work cost, not headline GPU price. Account for performance, reliability, storage, bandwidth, loading behavior, stopped-instance charges, interruptible semantics, and recovery overhead.

Prerequisites

  • GPU/VRAM, throughput, reliability, geography, disk, and completion-time requirements
  • Hourly and total budget plus checkpoint/restart cost assumptions
  • Instance, volume, charge, and invoice inventory for the analysis window

Instructions

Step 1: Build a normalized offer set

Search verified rentable offers and retain GPU price, storage, bandwidth, reliability, dlperf, dlperf_usd, network, and host constraints.

Step 2: Model useful-work cost

Estimate runtime from measured throughput, then add storage, data transfer, startup, checkpoint, failure, and operator recovery costs.

Step 3: Choose rental semantics

Use on-demand when completion certainty dominates. Use bid pricing only for checkpointed work and pass an explicit bid; a bid search alone does not create an interruptible rental.

Step 4: Find leakage

Identify stopped instances still paying storage, idle active GPUs, abandoned volumes, oversized disks, duplicate canaries, and failed jobs without teardown.

Step 5: Apply bounded changes

Destroy confirmed abandoned resources, resize only through a tested replacement path, and preserve external artifacts before irreversible actions.

Step 6: Reconcile savings

Compare charges and invoices before and after using completed-work units, not just hourly rate, and record any service or reliability regression.

Authentication

Use billing-read for analysis and separate instance-write authority for approved cleanup. Never grant billing-write or credit-transfer permission to an optimizer.

Tool Discipline

Use Read and Grep to inspect manifests, configuration, provider output, and existing tests before proposing a mutation. Use Write or Edit only for the approved plan, implementation, test, or redacted receipt; do not create, update, destroy, or fund Vast.ai resources without explicit operator approval.

Output

  • Normalized offer and useful-work cost model
  • Leak inventory with owner and safe disposition
  • Verified savings, performance delta, and cleanup receipt

Return window, workload unit, selected offer policy, resource IDs, modeled/actual cost, savings, and unresolved billing risk.

Examples

A checkpointed batch job selects a high dlperf_usd bid offer with an explicit bid, while an idle stopped instance and orphaned volume are destroyed after artifact verification; savings are measured per completed batch.

Error Handling

FailureResponse
Required pricing field is absentMark the offer incomparable rather than assuming zero cost.
Spot work lacks external checkpointsUse on-demand or add recovery before selecting bid pricing.
Stopped instance is called freeCorrect the model because storage charges continue until destruction.
Cleanup ownership is unclearDo not destroy; assign an owner and preserve the leak in the report.

Resources

When not to use it

  • →When wall-clock time savings do not justify a 10x price premium for H100 GPUs
  • →When GPU idle at $2/hr is acceptable due to waiting for data download

Prerequisites

Vast.ai account with billing historyUnderstanding of your workload's GPU requirementsvastai CLI installed

Limitations

  • →H100 GPUs are only cost-effective when wall-clock time justifies a 10x price premium
  • →Pre-staging data is required to avoid idle GPU costs during data downloads

How it compares

This skill automates the selection and management of Vast.ai GPU instances based on cost and utilization, unlike manual provisioning that might overlook dynamic pricing and idle resource waste.

Compared to similar skills

vastai-cost-tuning side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
vastai-cost-tuning (this skill)12moReviewIntermediate
home-assistant-manager910moReviewAdvanced
observability-engineer125moNo flagsAdvanced
prometheus-configuration64moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore →

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

home-assistant-manager

komal-SkyNET

Expert-level Home Assistant configuration management with efficient deployment workflows (git and rapid scp iteration), remote CLI access via SSH and hass-cli, automation verification protocols, log analysis, reload vs restart optimization, and comprehensive Lovelace dashboard management for tablet-optimized UIs. Includes template patterns, card types, debugging strategies, and real-world examples.

9110

observability-engineer

sickn33

Build production-ready monitoring, logging, and tracing systems. Implements comprehensive observability strategies, SLI/SLO management, and incident response workflows. Use PROACTIVELY for monitoring infrastructure, performance optimization, or production reliability.

1242

prometheus-configuration

wshobson

Set up Prometheus for comprehensive metric collection, storage, and monitoring of infrastructure and applications. Use when implementing metrics collection, setting up monitoring infrastructure, or configuring alerting systems.

645

mlops-engineer

sickn33

Build comprehensive ML pipelines, experiment tracking, and model registries with MLflow, Kubeflow, and modern MLOps tools. Implements automated training, deployment, and monitoring across cloud platforms. Use PROACTIVELY for ML infrastructure, experiment management, or pipeline automation.

333

network-info

UKGovernmentBEIS

Gather network configuration and connectivity information including interfaces, routes, and DNS

329

senior-devops

davila7

Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup, infrastructure as code, deployment automation, and monitoring. Use when setting up pipelines, deploying applications, managing infrastructure, implementing monitoring, or optimizing deployment processes.

720

Search skills

Search the agent skills registry