vastai-enterprise-rbac
Configure Vast.ai enterprise SSO, role-based access control, and organization management. Use when implementing SSO integration, configuring role-based permissions, or setting up organization-level controls for Vast.ai. Trigger with phrases like "vastai SSO", "vastai RBAC", "vastai enterprise", "vastai roles", "vastai permissions", "vastai SAML".
Install
mkdir -p .claude/skills/vastai-enterprise-rbac && curl -L -o skill.zip "https://mcp.directory/api/skills/download/7609" && unzip -o skill.zip -d .claude/skills/vastai-enterprise-rbac && rm skill.zipInstalls to .claude/skills/vastai-enterprise-rbac
About this skill
Vast.ai Enterprise RBAC
Overview
Control access to Vast.ai GPU instances and spending through API key management, team-level budgets, and GPU allocation policies. Vast.ai uses a marketplace model with per-GPU-hour pricing (RTX 4090 ~$0.20/hr, A100 ~$1.50/hr, H100 ~$3.00/hr).
Prerequisites
- Vast.ai account(s) with API keys
- Understanding of team GPU usage patterns
- Budget allocation per team/project
Instructions
Step 1: Team API Key Strategy
# Separate API keys per team for billing isolation
# Option A: Separate Vast.ai accounts per team
# Option B: Single account with application-level controls
TEAM_CONFIGS = {
"ml-research": {
"api_key_env": "VASTAI_KEY_RESEARCH",
"gpu_whitelist": ["A100", "H100_SXM"],
"max_instances": 8,
"daily_budget": 200.00,
"max_dph": 4.00,
},
"ml-engineering": {
"api_key_env": "VASTAI_KEY_ENGINEERING",
"gpu_whitelist": ["RTX_4090", "A100"],
"max_instances": 4,
"daily_budget": 50.00,
"max_dph": 2.00,
},
"data-science": {
"api_key_env": "VASTAI_KEY_DATASCIENCE",
"gpu_whitelist": ["RTX_4090", "RTX_3090"],
"max_instances": 2,
"daily_budget": 10.00,
"max_dph": 0.30,
},
}
Step 2: Policy Enforcement Layer
class VastPolicyEnforcer:
def __init__(self, team_config):
self.config = team_config
self.client = VastClient(api_key=os.environ[team_config["api_key_env"]])
def can_provision(self, gpu_name, num_gpus=1):
"""Check if provisioning is allowed by team policy."""
if gpu_name not in self.config["gpu_whitelist"]:
return False, f"GPU {gpu_name} not in team whitelist"
running = len([i for i in self.client.show_instances()
if i.get("actual_status") == "running"])
if running >= self.config["max_instances"]:
return False, f"Instance limit reached ({running}/{self.config['max_instances']})"
return True, "OK"
def provision_with_policy(self, gpu_name, image, disk_gb=20):
allowed, reason = self.can_provision(gpu_name)
if not allowed:
raise PermissionError(f"Policy violation: {reason}")
offers = self.client.search_offers({
"gpu_name": {"eq": gpu_name},
"dph_total": {"lte": self.config["max_dph"]},
"reliability2": {"gte": 0.95},
"rentable": {"eq": True},
})
if not offers.get("offers"):
raise RuntimeError("No offers matching policy constraints")
return self.client.create_instance(
offers["offers"][0]["id"], image, disk_gb)
Step 3: Audit Logging
import json, datetime
class AuditLogger:
def __init__(self, log_file="vast_audit.jsonl"):
self.log_file = log_file
def log(self, team, action, details):
entry = {
"timestamp": datetime.datetime.utcnow().isoformat(),
"team": team,
"action": action,
**details,
}
with open(self.log_file, "a") as f:
f.write(json.dumps(entry) + "\n")
# Usage
audit = AuditLogger()
audit.log("ml-research", "provision", {
"gpu": "A100", "offer_id": 12345, "dph": 1.50})
audit.log("ml-research", "destroy", {
"instance_id": 67890, "duration_hours": 4.2, "total_cost": 6.30})
Step 4: Spending Reports
def team_spending_report(audit_file="vast_audit.jsonl"):
"""Generate spending report from audit log."""
import json
costs = {}
with open(audit_file) as f:
for line in f:
entry = json.loads(line)
if entry["action"] == "destroy" and "total_cost" in entry:
team = entry["team"]
costs.setdefault(team, 0)
costs[team] += entry["total_cost"]
print("Team Spending Report:")
for team, cost in sorted(costs.items(), key=lambda x: -x[1]):
print(f" {team}: ${cost:.2f}")
Output
- Team-specific API key configuration
- Policy enforcement layer (GPU whitelist, instance limits, budget caps)
- Audit logging for all provisioning and destruction events
- Spending reports per team
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Policy violation on provision | GPU not in whitelist or limit reached | Request policy change or destroy idle instances |
| Budget exceeded | Team exceeded daily limit | Alert team lead; pause provisioning until next day |
| Missing API key | Environment variable not set | Configure key in secrets manager |
| Audit log missing entries | Logger not wired into all operations | Audit the code paths for missing log calls |
Resources
Next Steps
For migration strategies, see vastai-migration-deep-dive.
Examples
Team onboarding: Create a new team config entry with conservative limits (2 instances, RTX 4090 only, $10/day). Increase limits after the team demonstrates responsible usage.
Monthly chargeback: Parse the audit log to generate per-team invoices for internal cost allocation.
More by jeremylongshore
View all skills by jeremylongshore →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversPowerful MCP server for Slack with advanced API, message fetching, webhooks, and enterprise features. Robust Slack data
Supercharge AI platforms with Azure MCP Server for seamless Azure API Management and resource automation. Public Preview
Effortlessly manage Netlify projects with AI using the Netlify MCP Server—automate deployment, sites, and more via natur
Official Okta MCP server for managing identity and access management through AI. Automate user provisioning, group manag
Docy (Documentation Access) delivers real-time search and navigation of technical documentation without leaving your con
Easily access and manage Windows Screenshots from WSL2. List and retrieve screenshots with metadata, paths, or base64 co
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.