vastai-local-dev-loop
Sets up a fast, reproducible local development loop for Vast.ai GPU projects to minimize cloud costs.
Install
mkdir -p .claude/skills/vastai-local-dev-loop && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5336" && unzip -o skill.zip -d .claude/skills/vastai-local-dev-loop && rm skill.zipInstalls to .claude/skills/vastai-local-dev-loop
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.
Configure Vast.ai local development with testing and fast iteration.Key capabilities
- →Structure projects with API clients and job runners
- →Mock Vast.ai API responses for unit testing
- →Test Docker images locally in CPU mode
- →Verify CLI authentication and account balance
- →Implement dry-run workflows for training scripts
How it works
It establishes a local development loop by mocking the Vast.ai API and using Docker to simulate the containerized environment. This allows developers to validate logic and job orchestration without incurring cloud GPU costs.
Inputs & outputs
When to use vastai-local-dev-loop
- →Setting up local development environments
- →Testing GPU job provisioning
- →Mocking Vast.ai API for fast iteration
About this skill
Vast.ai Local-to-GPU Canary Loop
Overview
Keep slow marketplace operations out of the inner loop. Validate code and the container locally, publish an immutable image, then use a single policy-constrained GPU rental only for the behavior that cannot be proven without CUDA.
Prerequisites
- Local unit and CPU-mode test commands with expected outputs
- Immutable image registry and a reproducible startup contract
- Canary GPU, price, reliability, timeout, and cleanup policy
Instructions
Step 1: Define the local contract
Use Read and Grep to identify entrypoints, required files, ports, and environment names. Write an explicit smoke command that works without cloud credentials.
Step 2: Run local gates
Execute unit tests, build the image, start it in CPU mode where supported, and validate its health or process exit contract.
Step 3: Publish immutable bytes
Push a digest or commit-addressed image. Reject mutable latest as canary evidence because the remote host may pull different bytes.
Step 4: Rent the smallest canary
Search verified offers within the budget, create one instance with the immutable image, and record the contract ID before polling.
Step 5: Compare GPU behavior
Run the same smoke assertion plus a CUDA-specific check. Capture structured output and the image digest, not interactive screenshots.
Step 6: Tear down on every path
Copy only the required evidence, destroy the instance, and confirm removal even when the canary fails.
Authentication
Inject the scoped Vast.ai key only into the local control process. Put workload secrets in an approved runtime secret mechanism and never bake them into the image or startup script.
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
- Local test/build receipt and immutable image identity
- GPU canary offer, instance, state, and assertion evidence
- Confirmed teardown plus a classified local/remote delta
Return commit, image digest, offer and instance IDs, local/GPU outcomes, elapsed time, estimated cost, and cleanup status.
Examples
A model-server change passes CPU request-shape tests, is pushed by digest, then runs one CUDA inference on a verified low-cost GPU before the disposable contract is destroyed.
Error Handling
| Failure | Response |
|---|---|
| Local smoke fails | Do not rent a GPU; fix the deterministic local failure first. |
| Remote bytes differ | Destroy the canary and republish an immutable digest. |
| GPU assertion fails only remotely | Collect driver, CUDA, image, and command evidence before teardown. |
| Teardown is uncertain | Treat the instance as actively billable and escalate with its ID. |
Resources
When not to use it
- →Testing code that requires actual GPU hardware acceleration
- →Performance benchmarking on CPU-only environments
Prerequisites
Limitations
- →Local testing uses CPU mode which may not catch GPU-specific errors
- →Mock return values must be manually updated if the API interface changes
How it compares
It shifts testing from the cloud to a local containerized environment, reducing costs and iteration time compared to deploying to a remote GPU instance for every change.
Compared to similar skills
vastai-local-dev-loop side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| vastai-local-dev-loop (this skill) | 1 | 2mo | Review | Intermediate |
| documenso-local-dev-loop | 2 | 2mo | Review | Beginner |
| gentleman-e2e | 1 | 8mo | Review | Intermediate |
| nx-run-tasks | 1 | 8mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
documenso-local-dev-loop
jeremylongshore
Set up local development environment and testing workflow for Documenso. Use when configuring dev environment, setting up test workflows, or establishing rapid iteration patterns with Documenso. Trigger with phrases like "documenso local dev", "documenso development", "test documenso locally", "documenso dev environment".
gentleman-e2e
Gentleman-Programming
Docker-based E2E testing patterns for Gentleman.Dots installer. Trigger: When editing files in installer/e2e/, writing E2E tests, or adding platform support.
nx-run-tasks
nrwl
Helps with running tasks in an Nx workspace. USE WHEN the user wants to execute build, test, lint, serve, or run any other tasks defined in the workspace.
firecrawl-local-dev-loop
jeremylongshore
Configure FireCrawl local development with hot reload and testing. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with FireCrawl. Trigger with phrases like "firecrawl dev setup", "firecrawl local development", "firecrawl dev environment", "develop with firecrawl".
bazel-build-optimization
wshobson
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.
modal
davila7
Run Python code in the cloud with serverless containers, GPUs, and autoscaling. Use when deploying ML models, running batch processing jobs, scheduling compute-intensive tasks, or serving APIs that require GPU acceleration or dynamic scaling.