跳到主要内容

credit-optimizer 精选

自动优化 Manus AI 额度消耗,降低使用成本。原文:Automatically optimize AI agent credit usage by routing tasks to the most cost-efficient execution path. Use when you want to reduce AI API costs by 30-75% without quality loss, classify task complexity before execution, route simple tasks to free or low-cost models, split complex tasks into optimized sub-tasks, or detect vague prompts before wasting credits.

仓库级简介:该 skill 尚无单独撰写的中文摘要
在 GitHub 打开

安装方式

https://raw.githubusercontent.com/rafsilva85/credit-optimizer-v5/37eb57a8fb2506e8e1c1c5458748bac439c2f521/SKILL.md

下载后另存为 ~/.claude/skills/credit-optimizer/SKILL.md。链接锁定采集时的 commit,内容与本站展示一致。

整仓一次性获取:git clone --depth 1 https://github.com/rafsilva85/credit-optimizer-v5.git

依赖与权限

  • 无需 API Key
  • 需要联网访问外部服务
  • 依赖外部命令:python
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 rafsilva85/credit-optimizer-v5@37eb57a · 许可 MIT · 内容未修改

Credit Optimizer v5

Automatically optimize AI agent credit/token usage by routing tasks to the most cost-efficient execution path — with zero quality loss.

Audited across 53 real-world scenarios. 30-75% cost savings. 0% quality degradation.

When to Use This Skill

  • Before executing any AI task that consumes credits or tokens
  • When you want to minimize API costs without sacrificing output quality
  • When processing batches of tasks with varying complexity
  • When you need to decide between different model tiers (free/standard/premium)

How It Works

Step 1: Task Classification

Analyze the incoming task and classify it into one of these categories:

CategoryExamplesTypical Savings
Simple Q&ADefinitions, facts, conversions90-100% (use free tier)
Code GenerationScripts, functions, refactoring40-60%
ResearchMulti-source analysis, synthesis20-40%
Creative WritingArticles, stories, marketing copy30-50%
Data AnalysisCSV processing, visualization40-70%
Complex ReasoningMulti-step logic, architecture10-20%

Step 2: Prompt Quality Check

Before executing, evaluate the prompt:

  1. Clarity Score (1-10): Is the request specific enough?
  • Score < 5: Ask for clarification BEFORE executing (saves wasted credits)
  • Score 5-7: Add reasonable assumptions and proceed
  • Score 8+: Execute directly
  1. Scope Detection: Can this be split into smaller, cheaper sub-tasks?
  • If YES: Break into atomic tasks, route each independently
  • If NO: Route as single task
  1. Data Requirement Check: Does this need real-time data?
  • If YES: Use tools/search first, then process with cheaper model
  • If NO: Use internal knowledge with appropriate model tier

Step 3: Model Routing

Route to the optimal execution path:

IF task is simple Q&A or formatting:
  → Use FREE tier / Chat mode (no credits)
  
IF task is medium complexity (code, writing, basic analysis):
  → Use STANDARD tier
  
IF task requires deep reasoning, multi-step logic, or creative excellence:
  → Use PREMIUM/MAX tier
  
IF task is mixed complexity:
  → SPLIT into sub-tasks and route each independently

Step 4: Execution Optimization

During execution, apply these optimizations:

  • Context Pruning: Only include relevant context, not entire conversation history
  • Output Scoping: Request specific output format to avoid verbose responses
  • Caching: Check if similar tasks were recently completed
  • Batch Processing: Group similar sub-tasks for efficient processing

Efficiency Directives

  1. Never use premium models for tasks that standard can handle equally well
  2. Always check if the task can be answered from cached/known information first
  3. Split compound requests into atomic tasks before routing
  4. Ask for clarification on vague prompts — it's cheaper than re-doing work
  5. Use structured output formats to reduce token waste

Audit Results Summary

MetricResult
Scenarios tested53
Average savings30-75%
Quality loss0%
Quality improvement cases2
False routing rate< 3%

Links

质量与来源

所属仓库
rafsilva85/credit-optimizer-v5
仓库星标
51
最近更新
5 个月前
采集时间
今天
commit
37eb57a8fb25
内容指纹
sha256:f905d4bd1c1ae5a
文件路径
SKILL.md