Anthropic-standard Skill — decide API-vs-self-host LLM costs and fine-tune ROI from any agent context (Claude Code, Cursor, Codex). Live GPU+API prices, deterministic local math.
SaferSkills independently audited api-vs-selfhost-skill (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Decide API-vs-self-host LLM economics from whatever context the user gives you. Fetch live prices, run scripts/calc.py for math, write a short report.
Out of scope: pretraining from scratch, image/audio models, non-LLM workloads.
references/INPUTS.md.echo '<json>' | python3 scripts/calc.py inference (or finetune). Run more scenarios (different traffic patterns, quants, GPU tiers) when they would change the answer.scripts/calc.py. Never compute it in-prompt.references/GPU_SPECS.md. Prices come from live fetches.references/ASSUMPTIONS.md (stub points to the canonical source).UNVERIFIED in the report.error, field, and hint keys, fix that field, and retry — don't surface raw engine errors to the user.echo '{"params_b":70,"quant":"int4","queries_per_week":1000000,"api_cost_per_query_usd":0.002,"traffic_pattern":"business","replicas":1,"gpu":{"name":"H100 80GB","vram_gb":80,"usd_per_hr":2.90}}' | python3 scripts/calc.py inferenceOptional inference inputs: total_params_b (MoE; drives VRAM), replicas (GPUs needed to serve volume; default 1), hot_hours_per_week (required for cold_per_query).
Output keys: fits, infeasible, vram_needed_gb, replicas, selfhost_weekly_usd, api_weekly_usd, weekly_savings_usd, savings_pct, verdict (selfhost_wins / api_wins / infeasible), warnings, derivation.
echo '{"active_params_b":65,"total_params_b":65,"method":"qlora","num_examples":10000,"tokens_per_example":500,"epochs":3,"experiments_multiplier":1.0,"prep_cost_usd":0,"gpu":{"name":"H100 80GB","vram_gb":80,"usd_per_hr":2.90,"bf16_tflops":989,"gpus_per_node":8}}' | python3 scripts/calc.py finetuneOutput keys: single_gpu_hours, ft_vram_gb, cluster_topology, hours_with_cluster, gpu_cost_total_usd, total_capex_usd, warnings, derivation.
Engine errors exit 2 with {"error": "...", "field": "..."} — fix the input and retry.
params_b (and/or total_params_b) — active_params_b does not lower inference VRAM or cost. For fine-tune, active_params_b drives FLOPs and total_params_b drives VRAM.replicas: 1). One GPU does not serve unlimited QPS. At meaningful volume, estimate how many replicas you need to hit the latency target (from the GPU's throughput vs. your tokens/sec) and pass replicas. The engine warns when volume is high and replicas was left at 1. State the replica assumption in the report.vram_needed_gb covers model weights + a small overhead. It does not include the KV cache, which grows with context length × batch size and can dominate for long-context or high-concurrency serving. Note this in the report; real serving needs headroom above vram_needed_gb.savings_pct can be a large negative number — report it as "API wins" rather than showing the raw percentage.selfhost_weekly_usd is GPU rental only. Remind the user it excludes serving infra, monitoring, on-call, and engineering time — the operational costs that often decide the real answer for small teams.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.