How to Use

Try in Chat

Quick

Paste into any AI chat for instant expertise. Works in one conversation -- no setup needed.

Preview prompt
You are an expert Llm Cost Optimizer (Engineering domain).

Tools for counting tokens, estimating costs across different LLM providers, and optimizing prompts to reduce token usage without sacrificing quality. Essential for teams managing LLM API budgets at scale.

> **Category:** Engineering > **Domain:** AI Cost Management The **LLM Cost Optimizer** skill provides tools for counting tokens, estimating costs across different LLM providers, and optimizing prompts to reduce token usage without sacrificing quality. Essential for teams managing LLM API budgets at

## Your Key Capabilities
- Cost Estimation for New Project
- Prompt Optimization Sprint
- Token Reduction Techniques
- Cost-Effective Model Selection

## How to Help
When the user asks for help in this domain:
1. Ask clarifying questions to understand their context
2. Apply the relevant framework or workflow from your expertise
3. Provide actionable, specific output (not generic advice)
4. Offer concrete templates, checklists, or analysis

For the full skill with Python tools and references, visit:
https://github.com/borghei/Claude-Skills/tree/main/llm-cost-optimizer

---
Start by asking the user what they need help with.
# Add to your project
cs install engineering/llm-cost-optimizer ./

# Or copy directly
git clone https://github.com/borghei/Claude-Skills.git
cp -r Claude-Skills/engineering/llm-cost-optimizer your-project/
# The skill is available in your Codex workspace at:
.codex/skills/llm-cost-optimizer/

# Reference the SKILL.md in your Codex instructions
# or copy it into your project:
cp -r .codex/skills/llm-cost-optimizer your-project/
# The skill is available in your Gemini CLI workspace at:
.gemini/skills/llm-cost-optimizer/

# Reference the SKILL.md in your Gemini instructions
# or copy it into your project:
cp -r .gemini/skills/llm-cost-optimizer your-project/
# Add to your .cursorrules or workspace settings:
# Reference: engineering/llm-cost-optimizer/SKILL.md

# Or copy the skill folder into your project:
git clone https://github.com/borghei/Claude-Skills.git
cp -r Claude-Skills/engineering/llm-cost-optimizer your-project/
# Clone and copy
git clone https://github.com/borghei/Claude-Skills.git
cp -r Claude-Skills/engineering/llm-cost-optimizer your-project/

# Or download just this skill
curl -sL https://github.com/borghei/Claude-Skills/archive/main.tar.gz | tar xz --strip=1 Claude-Skills-main/engineering/llm-cost-optimizer

Run Python Tools

python engineering/llm-cost-optimizer/scripts/tool_name.py --help

Quick Start

# Count tokens in a prompt file and estimate costs
python scripts/token_counter.py --file prompt.txt --models gpt-4o claude-sonnet

# Count tokens from stdin
echo "Hello world" | python scripts/token_counter.py --stdin --models all

# Analyze a prompt for optimization opportunities
python scripts/prompt_optimizer.py --file system_prompt.txt

# Optimize with target reduction
python scripts/prompt_optimizer.py --file prompt.txt --target-reduction 30

Related Skills in Engineering

View on GitHub