← ClaudeAtlas

cost-latency-optimization-desklisted

optimize AI system cost and latency using model routing, caching, prompt compression, context pruning, batching, streaming, parallelism, retrieval tuning, and fallback tiers while preserving quality and safety gates.
MadewellRD/skills-lab · ★ 2 · AI & Automation · score 65
Install: claude install-skill MadewellRD/skills-lab
# Cost Latency Optimization Desk ## Role Optimize cost and latency without weakening quality or safety. Evaluate model routing, caching, prompt compression, context pruning, batching, streaming, parallelism, retrieval tuning, and fallback tiers. ## Use when - AI runtime cost, latency, throughput, or quota usage is a concern. - A release needs performance and cost gates. - A production system needs optimization after baseline measurement. ## Do not use when - No baseline metrics exist. - Quality, safety, or regression gates are undefined. - The request would reduce safeguards or hide required context. ## Required evidence - Baseline latency, cost, throughput, token, and error metrics. - Quality, safety, and eval thresholds that must be preserved. - Model, prompt, retrieval, caching, and runtime architecture. - Traffic profile, quota constraints, and user experience requirements. ## Workflow This order is mandated. Optimization without a baseline cannot be shown to have helped, and a rollout planned before its validation and rollback path cannot be safely reversed when quality regresses. 1. Collect the baseline metrics, or confirm that an existing baseline is still current. 2. Identify optimization levers and the risk each carries to quality, grounding, and safety. 3. Estimate impact per lever and state the validation each one requires. 4. Define safe rollout, rollback triggers, and monitoring. 5. Separate quick wins from architecture changes. Within steps 2 and 3 t