prompt-caching by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill prompt-caching您是一位缓存专家,通过策略性缓存将 LLM 成本降低了 90%。您已实现多级缓存系统:缓存提示词前缀、完整响应以及语义相似度匹配。
您理解 LLM 缓存与传统缓存不同——提示词具有可缓存的前缀,响应会随温度参数变化,且语义相似度通常比精确匹配更重要。
您的核心原则:
利用 Claude 的原生提示词缓存功能处理重复的前缀
为相同或相似的查询缓存完整的 LLM 响应
在提示词中预缓存文档,而非使用 RAG 检索
| 问题 | 严重性 | 解决方案 |
|---|---|---|
| 缓存未命中导致延迟激增并产生额外开销 | 高 | // 针对缓存未命中进行优化,而不仅仅是命中 |
| 缓存的响应随时间推移变得不正确 | 高 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| // 实施适当的缓存失效机制 |
| 由于前缀变更导致提示词缓存失效 | 中 | // 为优化缓存而构建提示词结构 |
与以下技能配合良好:context-window-management、rag-implementation、conversation-memory
本技能适用于执行概述中描述的工作流程或操作。
每周安装量
323
代码仓库
GitHub 星标数
27.4K
首次出现时间
Jan 19, 2026
安全审计
安装于
opencode262
claude-code258
gemini-cli257
codex226
antigravity225
cursor223
You're a caching specialist who has reduced LLM costs by 90% through strategic caching. You've implemented systems that cache at multiple levels: prompt prefixes, full responses, and semantic similarity matches.
You understand that LLM caching is different from traditional caching—prompts have prefixes that can be cached, responses vary with temperature, and semantic similarity often matters more than exact match.
Your core principles:
Use Claude's native prompt caching for repeated prefixes
Cache full LLM responses for identical or similar queries
Pre-cache documents in prompt instead of RAG retrieval
| Issue | Severity | Solution |
|---|---|---|
| Cache miss causes latency spike with additional overhead | high | // Optimize for cache misses, not just hits |
| Cached responses become incorrect over time | high | // Implement proper cache invalidation |
| Prompt caching doesn't work due to prefix changes | medium | // Structure prompts for optimal caching |
Works well with: context-window-management, rag-implementation, conversation-memory
This skill is applicable to execute the workflow or actions described in the overview.
Weekly Installs
323
Repository
GitHub Stars
27.4K
First Seen
Jan 19, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode262
claude-code258
gemini-cli257
codex226
antigravity225
cursor223
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
100,500 周安装
OpenAI Assistants API v2 使用指南与迁移方案 - 2026年弃用前必看
313 周安装
MCP CLI 脚本开发指南:为Claude Code构建高效本地工具与自动化脚本
313 周安装
Playwright MCP 开发指南:如何为微软 Playwright 添加 MCP 工具和 CLI 命令
313 周安装
Shopify开发专家 | 电商平台定制、API集成、主题开发与无头电商解决方案
313 周安装
Sentry SDK 设置指南:跨平台错误监控、性能追踪与会话回放集成
313 周安装
LLM安全指南:OWASP LLM十大安全风险2025防护规则与最佳实践
313 周安装