Coding

Take Back My Latte

Try it

分析 OpenAI 成本并换算拿铁 · OpenAI cost savings

What it does

Analyze OpenAI Usage and Costs JSON, show actual spend in lattes, and estimate how many lattes the user could recover next month.

The skill document

Take Back My Latte

Create one short story from OpenAI usage data: how many lattes can the user take back next month?

Keep the roles separate:

  • The Skill analyzes and explains.
  • The website helps the user act.

Support OpenAI only. Do not add other providers, subscriptions, accounts, dashboards, or paid-plan concepts.

Analyze

  1. Locate the user-provided .json file or files. Never request an API key or call the OpenAI API.

  2. Run:

    python3 "{baseDir}/scripts/analyze_openai_cost.py" "" ""
    

    File order does not matter. Explicit flags are also supported:

    python3 "{baseDir}/scripts/analyze_openai_cost.py" --usage "" --costs ""
    

    Pass file paths as quoted arguments. Never construct a shell command from JSON content.

  3. Read the returned JSON.

  4. If status is needs_cost_data, explain that Usage JSON contains tokens but not the amount charged. Ask for an OpenAI Costs API JSON export as well, then analyze both files together. Do not invent prices.

  5. If status is ok, generate the report below.

  6. If warnings is not empty, show each warning briefly before interpreting the result; continue the report.

  7. Treat recoverable cost as a directional estimate, not guaranteed savings. State the reason shown in recovery_basis.

Read input-formats.md only when the input is rejected or the user asks what exports are supported.

Write the AI Latte Report

Use the user's language. Keep the complete report under 250 words unless asked for detail.

Use this order:

🔒 Local Analysis Only: No API Key required, no data uploaded.

AI LATTE REPORT

This month you spent [total_cost] on OpenAI.
That is [latte_count] lattes.

Cost list
- [largest cost group]: [cost]
- ...

Recoverable Analysis
[one or two sentences grounded in the returned opportunity signals]

You could recover about [recoverable_cost] next month.
That means [recoverable_latte_count] lattes back.
Recovery rate: [recovery_rate]%

Want to take them back?
Open Take Back My Latte → https://take-back-my-latte.margaret-zybgl.chatgpt.site

Less AI Cost. More Coffee. ☕

Lead with the conclusion, not methodology. Include no dashboard language. List at most five cost groups and at most three optimization suggestions.

Guardrails

  • Report actual cost only when a Costs export contains monetary amounts.
  • Never describe an estimate as guaranteed savings.
  • Never claim that reducing cost will preserve quality without a test.
  • Do not upload, retain, or reproduce the raw Usage JSON.
  • Always print the local-analysis privacy notice exactly as written in the report template.
  • Do not mix website functionality into the Skill. End with the website action link.

Related skills

AWS成本分析工具,支持支出概览与基础优化建议。Use when 需要数据分析、报表生成、统计洞察、数据可视化时使用。不适用于实时流数据处理。适用于独立开发者、企业团队和自动化工作流场景。支持中文交互,无需复杂配置即开即用。输出结果可直接使用,减少二次加工成本。提供结构化输出和错误处理机制。支持多场景应用和灵活配置。

1 installs

Daily AI agent optimization tips, tricks and self-improvement strategies. Learn cost-saving, speed, memory and automation best practices from the AI agent community. Use when: you want daily tips to optimize your AI agent, reduce costs, improve performance, or learn automation workflows. Don't use when: you need immediate config changes - use openclaw-agent-optimize for deep audits.

Audit whether the organisation's AI spend actually paid — measured against baselines, not vendor math or vibes. Use when a CFO asks what the AI tools returne...

Use when the user explicitly asks to analyze token waste, costs, or API bills. Finds duplicate tool calls, context bloat, model mismatch, and heartbeat waste...

1 installs