CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

llm-cost-optimizer

Use proactively whenever LLM API costs come up -- or should. Triggers include: 'my AI costs are too high', 'optimize token usage', 'which model should I use', 'LLM spend is out of control', 'implement prompt caching', 'we're about to launch an AI feature', 'build me an AI endpoint'. Don't wait for an explicit cost complaint -- if someone is building an AI feature, designing an LLM endpoint, or choosing between models, cost architecture belongs in the conversation. Apply immediately when any of these are true: a system prompt appears that exceeds a few hundred tokens, all requests are hitting the same model, max_tokens is not set, or no per-feature cost logging exists. NOT for RAG pipeline design (use rag-architect). NOT for improving prompt quality or effectiveness (use senior-prompt-engineer).

69

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

The canonical home for this skill is llm-cost-optimizer in alirezarezvani/claude-skills

SKILL.md
Quality
Evals
Security

Quality

Content

88%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 high-quality, information-dense skill body: three clearly gated modes, explicit measurement-before-optimization validation gates, quantified technique guidance, and a failure-recovery table. The main improvement opportunities are consolidating points repeated across the Mode sections, Proactive Flags, and Anti-Patterns tables, and externalizing the Anti-Patterns detail into a reference file.

DimensionReasoningScore

Conciseness

The body is dense and table-driven with almost no explanation of concepts Claude already knows, but several points are repeated verbatim across sections: the max_tokens leak appears in Mode 2 ('every uncapped endpoint is a cost leak'), Proactive Flags, and Anti-Patterns; the >2,000-token system-prompt caching target appears in Mode 2 and Proactive Flags; 'instrument logging first' appears in Mode 1, Proactive Flags, Failure Modes, and Anti-Patterns. That is efficient-with-trimmable-redundancy (anchor 4), not the lean every-token-earns-its-place profile of anchor 5.

4 / 5

Actionability

For an instruction-only skill, the guidance is maximally concrete: exact ROI-ordered techniques with expected reduction ranges ('Model Routing (60-80%)', 'cosine similarity >0.95 = safe to serve cached response', 'Target hit rates: >60% for document Q&A'), a concrete per-request logging schema (model, input tokens, output tokens, latency, endpoint/feature, user segment, cost), named tools (cache_control, GPTCache, Redis + embedding lookup), and a before/after prompt-compression table. Specific directives cover the common cases (audit, optimization, new architecture), matching the top anchor under the instruction-only adjustment.

5 / 5

Workflow Clarity

The flow is explicitly sequenced with validation checkpoints and error-recovery loops: classification before asking, 'measure impact at each step before moving to the next', 'move to optimization only once baseline data exists', and a dedicated Failure Modes and Recovery table with feedback loops (routing latency exceeds constraint -> fall back to rule-based routing; cache hit rate below 20% -> diagnose; compression degrades quality -> restore the compressed section). This matches the anchor 'Clear sequence with explicit validation steps; feedback loops for error recovery; checklists'.

5 / 5

Progressive Disclosure

The single file is well-organized with clear section headers and no buried references, and no bundle files exist to score against. However, at ~220 lines with mode-specific detail plus three cross-cutting tables (Proactive Flags, Failure Modes, Anti-Patterns), a couple of sections — notably the Anti-Patterns table — could live in a one-level-deep reference file, which is the 'good structure with minor organization gaps' of anchor 4 rather than the ideal split of anchor 5.

4 / 5

Total

18

/

20

Passed

Description

81%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 trigger-rich, well-bounded description with excellent natural trigger phrases and explicit de-confliction against sibling skills. Its main weakness is that the skill's capabilities (cost audit, model routing, caching, compression, observability) are never stated directly — the 'what' must be inferred from trigger phrases.

Suggestions

Open with an explicit capability statement, e.g. 'Audits LLM API spend and cuts it 40-80% via model routing, prompt caching, output-length control, and cost observability' — the current 'what' is only inferable from trigger phrases like 'implement prompt caching'.

Fold the core capability keywords (cost audit, model routing, semantic caching, per-request token logging) into the trigger list so users searching on those terms also match, complementing the already-strong quoted phrases.

DimensionReasoningScore

Specificity

The description names the domain ('LLM API costs') and only implies 1-2 concrete actions through trigger phrases like 'implement prompt caching' and 'optimize token usage'; it never explicitly lists what the skill does (audit, routing, compression, observability), which the body covers. This matches the anchor 'Names domain and 1-2 concrete actions, but not comprehensive' — above 2 (domain plus real action vocabulary, not merely generic) but below 4 (no explicit, comprehensive action list).

3 / 5

Completeness

The 'when' is exemplary — explicit trigger phrases plus 'apply immediately when' conditions — but the 'what' is only implicit ('cost architecture belongs in the conversation'), never a direct capability statement like 'audits LLM spend and cuts it via routing, caching, compression'. This sits between anchor 4 (both present, one could be more explicit) and anchor 5 (both explicit); the missing explicit 'what' keeps it at 4, and it is clearly above 3 since the 'when' is not merely weakly implied.

4 / 5

Trigger Term Quality

It quotes seven natural user phrases ('my AI costs are too high', 'optimize token usage', 'which model should I use', 'LLM spend is out of control', 'implement prompt caching', "we're about to launch an AI feature", 'build me an AI endpoint') plus concrete code-level signals (system prompt exceeding a few hundred tokens, 'max_tokens is not set', no per-feature cost logging). Coverage of natural terms including synonyms is comprehensive, matching the top anchor.

5 / 5

Distinctiveness Conflict Risk

It carves a clear cost-engineering niche and explicitly fences neighboring territories: 'NOT for RAG pipeline design (use rag-architect)' and 'NOT for improving prompt quality or effectiveness (use senior-prompt-engineer)'. Clear niche with distinct triggers and minimal conflict risk, matching the top anchor.

5 / 5

Total

17

/

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

alirezarezvani/claude-skills

Path

.gemini/skills/llm-cost-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.