Use this skill as planning or review guidance; verify generated commands, code, configuration, and infrastructure changes before running them., Apply least-privilege credentials and test in staging or a disposable branch before using it on production systems, CI, deployment, or account-write workflows.
Privacy notes
Inputs can include source files, prompts, logs, account metadata, repository details, and operational context that may be sent to the configured AI model., Redact secrets, customer data, private URLs, credentials, and proprietary implementation details before sharing prompts, reports, or generated artifacts.
Current risk score 0/100. Use staged verification before broader rollout.
Risk 0
Pre-adoption checks
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Done
Confirm metadata review state
Listing has review metadata.
Done
Verify install payload
Install/config payload exists and can be inspected.
Done
Security checks
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Done
Review privacy notesRequired
Privacy notes are present.
Done
Verify package integrity metadata
Package verification/checksum metadata is available.
Done
Rollout
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Pending
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Pending
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Pending
Evidence readiness
Evidence readiness matrix · balanced
Required evidence gates are covered (6/6 signals complete).
Risk 0
Source provenance
Present
Source repository/provenance is listed.
Required in this preset
Metadata review
Present
Review metadata is present.
Required in this preset
Safety notes
Present
Safety notes are present.
Required in this preset
Privacy notes
Present
Privacy notes are present.
Optional in this preset
Package integrity
Present
Package integrity metadata is present.
Optional in this preset
Install payload
Present
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
Decision timeline · balanced
6/6 steps complete with no blocking gaps for this preset.
Risk 0
triage
Confirm source provenanceRequired
Source/provenance metadata is available.
Done
triage
Check metadata review statusRequired
Review metadata is available.
Done
verify
Review safety notesRequired
Safety notes are available.
Done
verify
Review privacy notes
Privacy notes are available.
Done
verify
Validate package integrity metadata
Package integrity metadata is available.
Done
rollout
Verify install payload and commandsRequired
Install payload is available.
Done
No required blockers for this timeline preset.
Prerequisite readiness
Prerequisite readiness
3 prerequisites to line up before setup. Have accounts and credentials ready first.
0/3 ready
Account & credentials1General2
Safety & privacy surface
Safety & privacy surface
2 safety and 2 privacy notes across 3 risk areas. Review closely: credentials & tokens, third-party handling.
3 areas
SafetyExecution & processesUse this skill as planning or review guidance; verify generated commands, code, configuration, and infrastructure changes before running them.
SafetyCredentials & tokensApply least-privilege credentials and test in staging or a disposable branch before using it on production systems, CI, deployment, or account-write workflows.
PrivacyThird-party handlingInputs can include source files, prompts, logs, account metadata, repository details, and operational context that may be sent to the configured AI model.
PrivacyCredentials & tokensRedact secrets, customer data, private URLs, credentials, and proprietary implementation details before sharing prompts, reports, or generated artifacts.
Safety notes
Use this skill as planning or review guidance; verify generated commands, code, configuration, and infrastructure changes before running them.
Apply least-privilege credentials and test in staging or a disposable branch before using it on production systems, CI, deployment, or account-write workflows.
Privacy notes
Inputs can include source files, prompts, logs, account metadata, repository details, and operational context that may be sent to the configured AI model.
Redact secrets, customer data, private URLs, credentials, and proprietary implementation details before sharing prompts, reports, or generated artifacts.
.gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md
cursor
Adapter
.cursor/rules/<skill-name>.mdc
cli
Manual
AGENTS.md or tool-specific context file
Full copyable content
# Trigger
"Apply model routing cost/latency optimizer skill to this workflow."
# Required output
1) Current cost + latency baseline
2) Candidate routing policy (fast/default/high-quality tiers)
3) Quality regression checks and rollback triggers
4) Expected savings and SLO impact
About this resource
Overview
This skill helps teams ship model routing policies that cut spend and latency without quietly degrading quality. It enforces baseline measurement, explicit quality gates, and safe rollback criteria so optimization decisions remain production-safe.
Compatibility
Native
Claude Code / Claude: native skill usage via SKILL.md.
Codex/OpenAI workflows: compatible with Agent Skills-style SKILL.md content as reusable workflow instructions.
Manual Adaptation
Gemini CLI: native skill usage via .gemini/skills/<skill-name>/SKILL.md or .agents/skills/<skill-name>/SKILL.md where supported.
Cursor: use the generated .cursor/rules/*.mdc adapter for project rules.
OpenClaw and similar agents: use the same skill content as a reusable prompt/workflow file when native skill import is unavailable.
Prerequisites
Token and latency telemetry by endpoint/workflow
Quality benchmark set for your highest-value tasks
Runtime control over model selection policy
Routing Strategy
Tier 1 (fast): low-cost model for straightforward tasks
Tier 2 (default): balanced model for common workloads
Tier 3 (quality): higher-capability model for complex or failed cases
Segment traffic by task complexity and business value.
Benchmark candidate models on representative tasks.
Define routing and escalation policy with hard quality thresholds.
Deploy canary and monitor cost, latency, and quality deltas.
Promote or rollback based on explicit guardrails.
Troubleshooting
Issue: Savings improve but user quality drops Fix: tighten escalation thresholds and reserve stronger models for high-impact tasks.
Issue: Latency improves but cost rises unexpectedly Fix: inspect token bloat from prompts/context size and cap response/output tokens.
Issue: Routing policy is hard to explain Fix: keep deterministic rules for first rollout, then add adaptive logic incrementally.
Knowledge Freshness
Treat tooling details as time-sensitive. Re-validate APIs, limits, pricing, auth models, and deployment flags immediately before implementation. If docs conflict with prior memory, follow current official docs and release notes.
Show that Model Routing Cost and Latency Optimizer Skill is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/skills/model-routing-cost-latency-optimizer)
How it compares
Model Routing Cost and Latency Optimizer Skill side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
3 trust signals differ across this comparison (Package trust, Source provenance, Submitter).
Official OpenAI skill that tells agents to use the OpenAI developer documentation MCP server first for API, Codex, Apps SDK, model-selection, and migration questions.
✓Use this skill as planning or review guidance; verify generated commands, code, configuration, and infrastructure changes before running them.
Apply least-privilege credentials and test in staging or a disposable branch before using it on production systems, CI, deployment, or account-write workflows.
✓The skill is read-only guidance; it does not call OpenAI APIs, create API keys, modify accounts, or execute code by itself.
Do not use the skill as proof that a model, API parameter, entitlement, or product feature exists; it routes the agent to official docs so the answer can be verified.
Keep model upgrade work narrow unless the user explicitly asks for SDK, auth, environment, or provider migration changes.
✓Downloads and unzips a HeyClaude-maintainer-packaged skill archive into a local folder when using the install command.
Produces public skill package and submission drafts; review generated files before opening a PR or sharing them.
✓This skill produces automated release recommendations (merge, patch, or rollback) from eval scores; treat them as decision support and require human review before gating production releases or running suggested commands.
Privacy notes
✓Inputs can include source files, prompts, logs, account metadata, repository details, and operational context that may be sent to the configured AI model.
Redact secrets, customer data, private URLs, credentials, and proprietary implementation details before sharing prompts, reports, or generated artifacts.
✓Documentation queries can reveal what product, API, model, migration, or customer workflow the user is researching.
Avoid sending private prompts, customer data, secrets, internal repository names, or unreleased product plans through docs-search queries.
Skill text, fetched docs, citations, and agent transcripts can persist in local logs or conversation history depending on the client.
✓Does not require credentials and should only process public skill requirements, source URLs, and validation notes.
Do not include private repository names, customer data, tokens, or unpublished operating details in generated skill packages.
✓Inputs can include source files, prompts, logs, account metadata, repository details, and operational context that may be sent to the configured AI model.
Redact secrets, customer data, private URLs, credentials, and proprietary implementation details before sharing prompts, reports, or generated artifacts.
Prerequisites
Access to request volume and token usage data
At least two candidate model tiers available
Benchmark tasks for quality comparison
OpenAI developer documentation MCP server configured at `https://developers.openai.com/mcp`.
An agent environment that supports reusable skills, project instructions, or equivalent workflow rules.
Permission to install or reference the `openai/skills` repository in the target agent tooling.
A habit of requesting citations or source URLs when the answer depends on current OpenAI product behavior.
Skill topic and target user
Official docs or source URLs
Validation commands or acceptance criteria
Existing prompts, tools, or agent workflows to evaluate
A representative set of real user tasks or transcripts
CI or local runner where eval suites can be executed repeatedly