你的Prompt太长了!用这个Claude神技把API账单砍一半

你有没有这种感觉——同样一个需求,别人调教出来的 AI 输出就是比你的精准三倍?

不是模型的问题,是你 prompt 太啰嗦了。

一个 50 字的 prompt 和一个 150 字的 prompt,输出的质量可能一样——但前者让你的 API 账单少付 2/3。

今天挖到一个 Claude Code 神技:optimizing-prompts,专门帮你把冗长的 prompt 压缩成高密度指令,省钱又提效。

它能干啥?

这个 Skill 会自动分析你写的 prompt,找出三个问题:

  • 冗余——重复表达同一个意思
  • 啰嗦——能用三个字说清楚的偏要用十四个字
  • 模糊——指令不够明确,LLM 需要猜测你的意图

然后它会重写出一个精简版,保留原意但把 token 数砍到最低。

实际效果有多猛?

来看两个例子:

例1:电商文案
– 原文:"I would like you to create a detailed product description for a new ergonomic office chair, highlighting its features, benefits, and target audience, and also include information about its warranty and return policy."
– 优化后:"Create a product description for an ergonomic office chair. Include features, benefits, target audience, warranty, and return policy."

意思完全一样,token 直接砍半,API 费用省一半。

例2:文档总结
– 原文:"Please read the following document and provide a comprehensive summary of all the key points, main arguments, supporting evidence, and overall conclusion, ensuring that the summary is accurate, concise, and easy to understand."
– 优化后:"Summarize this document, including key points, arguments, evidence, and the conclusion."

指令反而更清晰了,输出质量不降反升。

什么时候用它?

三个高光场景:

  1. API 成本敏感的项目——Token 压缩直接等于账单打折
  2. 对速度有要求的实时应用——Prompt 越短,推理延迟越低
  3. Prompt 迭代优化——每次调教前先过一遍这个 Skill,相当于给 prompt 健身

安装方式

npx add-skill https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill optimizing-prompts

也可以在 Claude Code 插件市场直接搜 optimizing-prompts,来自 jeremylongshore 的 ai-ml-engineering-pack。


GitHub 仓库:jeremylongshore/claude-code-plugins-plus-skills

这个仓库有 1.8k Stars,整个包里有 739 个 Agent Skills,optimizing-prompts 只是其中一个。但这一个技能,单独拎出来就已经值回票价了。


GitHub: https://github.com/jeremylongshore/claude-code-plugins-plus-skills

评论区

0 条评论

登录后可评论。

白鹿 1563 阅读