CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

cost-latency-optimizer

The guide presents Python examples for tracking LLM costs and latency, caching responses, selecting models by query complexity, optimizing prompts, batching calls, and streaming results. It also offers optimization recommendations, best practices, and an output checklist for improving LLM application efficiency.

Quality

80%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/cost-latency-optimizer/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Scored by GLM 5.3

Content

61%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A concrete, code-forward skill that delivers actionable implementations for each optimization technique, held back by a lack of any sequenced workflow with validation checkpoints and by stale hardcoded model pricing. Structure and navigation are good for a single-file skill, though the pricing data and some redundancy could be trimmed or split out.

Suggestions

Replace the hardcoded model pricing table with a pointer to current pricing or move it to a references/ file, and remove the time-sensitive per-token cost calculations that will go stale.

Add a sequenced workflow (e.g., 1. track costs/latency, 2. analyze hotspots, 3. select and apply optimizations, 4. re-measure and verify savings) with explicit validation checkpoints, especially before/after batch operations.

Make code examples copy-paste ready by adding missing imports (`re`, `List`, `asyncio`) and either defining or clearly marking the `llm`/`llm_async`/`llm_stream`/`redis_client` placeholders, and drop the redundant Best Practices/Output Checklist restatements.

DimensionReasoningScore

Conciseness

The body is code-dense with minimal prose, but it embeds time-sensitive hardcoded pricing ("GPT-4 pricing" at $0.03/$0.06 per 1K tokens, claude-3 model rates) that is not placed in a deprecated/old-patterns section, and the "Best Practices" and "Output Checklist" sections restate what the code sections already demonstrate. Mostly efficient, but these could be tightened or removed.

3 / 5

Actionability

Every section contains concrete, real Python code (CostAnalyzer, LLMCache, LatencyTracker, batch_llm_calls). Minor gaps prevent copy-paste readiness: `optimize_prompt` uses `re` without importing it, `batch_llm_calls` lacks `List`/`asyncio` imports, and `llm`, `llm_async`, `llm_stream`, and `redis_client` are undefined placeholders. This sits at anchor 4 (mostly executable, concrete code with minor gaps) rather than 5.

4 / 5

Workflow Clarity

The content is organized as parallel technique sections rather than a sequenced optimization workflow (assess costs, identify hotspots, apply optimization, verify savings), and there are no validation or verification checkpoints; the "Output Checklist" is an unordered list with no feedback loops. Because batching operations are involved without validation, the rubric caps workflow clarity at 3.

3 / 5

Progressive Disclosure

A single-file skill with nine clear, well-signaled section headers and easy navigation; at ~265 lines the content is reasonably placed inline. The stale model-pricing table is the one block that would benefit from being split into a separate reference file, which keeps this at anchor 4 rather than 5.

4 / 5

Total

14

/

20

Passed

Description

88%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description that explicitly covers both what the skill does and when to use it, with multiple concrete capabilities and natural trigger phrases in third-person voice. Its only weaknesses are slightly broad trigger terms ("efficiency", "performance optimization") that create minor conflict risk with general optimization skills, and a few missing synonym triggers.

DimensionReasoningScore

Specificity

"Reduces LLM costs and improves response times through caching, model selection, batching, and prompt optimization. Provides cost breakdowns, latency hotspots, and configuration recommendations" lists multiple specific concrete actions with comprehensive coverage of the skill's domain. It is written in third person ("Reduces", "Provides"), so no voice penalty applies.

5 / 5

Completeness

It clearly answers 'what' with two sentences of concrete capabilities and explicitly answers 'when' with "Use for 'cost reduction', 'performance optimization', 'latency improvement', or 'efficiency'" — concrete trigger phrases, matching the top anchor exactly rather than the merely-adequate anchor 4.

5 / 5

Trigger Term Quality

The quoted triggers "cost reduction", "performance optimization", "latency improvement", and "efficiency" are natural phrases a user would say, giving good keyword coverage. A few common variations are missing (e.g., "reduce spending", "cheaper models", "speed up responses", "token costs"), keeping it below the comprehensive anchor 5.

4 / 5

Distinctiveness Conflict Risk

The LLM cost/latency optimization niche is mostly distinct with specific triggers, but "performance optimization" and "efficiency" are broad enough to overlap with general code-profiling or infrastructure-tuning skills. Minor overlap risk with closely related skills places this at anchor 4 rather than 5.

4 / 5

Total

18

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

sathishssj3/Stereix-Engine

Path

.agents/skills/cost-latency-optimizer/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.