CtrlK
BlogDocsLog inGet started
Tessl Logo

cost-aware-llm-pipeline

Cost optimization patterns for LLM API usage — model routing by task complexity, budget tracking, retry logic, and prompt caching.

77

1.31x
Quality

66%

Does it follow best practices?

Impact

100%

1.31x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./skills/cost-aware-llm-pipeline/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

100%

43%

Support Ticket Classifier

Model routing with immutable cost tracking

Criteria
Without context
With context

Sonnet constant

100%

100%

Haiku constant

100%

100%

Text length threshold

0%

100%

Item count threshold

0%

100%

Default to cheaper model

100%

100%

Force model override

0%

100%

Frozen dataclasses

50%

100%

Tuple for records

100%

100%

Immutable add method

100%

100%

Model selection logging

100%

100%

Budget limit field

0%

100%

100%

10%

Resilient LLM API Wrapper

Selective retry logic with exponential backoff

Criteria
Without context
With context

Retries APIConnectionError

100%

100%

Retries RateLimitError

100%

100%

Retries InternalServerError

100%

100%

No retry on auth errors

100%

100%

No retry on bad request

100%

100%

Exponential backoff

73%

100%

Max 3 retries

60%

100%

Retryable errors grouped

100%

100%

Demo shows selective behavior

100%

100%

100%

18%

Batch Document Moderation Pipeline

Prompt caching and full pipeline composition

Criteria
Without context
With context

Cache control on static prompt

100%

100%

Variable input separate block

100%

100%

Budget check before API call

100%

100%

BudgetExceededError raised

100%

100%

Model routing integrated

100%

100%

Retry integrated

70%

100%

Immutable cost update

0%

100%

Explicit budget limit

100%

100%

Pipeline function signature

44%

100%

Demo shows cache structure

100%

100%

Repository
affaan-m/everything-claude-code
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

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.