Prompt Caching
davila7/claude-code-templates
Caching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation) Use when: prompt caching, cache prompt, response cache, cag, cache…
分析 kiro2cc-proxy 访问日志,计算 Prompt Caching 节省的 credits。只要用户粘贴了含有"输入token 输出token 费用$ credits✓"格式的日志行,并询问节省了多少credits、缓存效率、cost分析等,立即使用此 skill。触发关键词:节省了多少credits、cache节省、分析日志、caching…
$ npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install TsinHzl/kiro2cc-proxy cache-credits-analyzer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/TsinHzl/kiro2cc-proxy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cache-credits-analyzer .claude/skills/cache-credits-analyzer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cache-credits-analyzer" agent skill from https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzer into .claude/skills/cache-credits-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-credits-analyzer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install TsinHzl/kiro2cc-proxy cache-credits-analyzer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TsinHzl/kiro2cc-proxy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/cache-credits-analyzer .agents/skills/cache-credits-analyzer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cache-credits-analyzer" agent skill from https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzer into .agents/skills/cache-credits-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-credits-analyzer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install TsinHzl/kiro2cc-proxy cache-credits-analyzer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TsinHzl/kiro2cc-proxy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/cache-credits-analyzer .cursor/skills/cache-credits-analyzer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cache-credits-analyzer" agent skill from https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzer into .cursor/skills/cache-credits-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-credits-analyzer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/TsinHzl/kiro2cc-proxy.git --path .claude/skills/cache-credits-analyzer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install TsinHzl/kiro2cc-proxy cache-credits-analyzer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TsinHzl/kiro2cc-proxy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/cache-credits-analyzer .gemini/skills/cache-credits-analyzer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cache-credits-analyzer" agent skill from https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzer into .gemini/skills/cache-credits-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-credits-analyzer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install TsinHzl/kiro2cc-proxy cache-credits-analyzerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/TsinHzl/kiro2cc-proxy.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/cache-credits-analyzer .github/skills/cache-credits-analyzer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cache-credits-analyzer" agent skill from https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzer into .github/skills/cache-credits-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-credits-analyzer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install TsinHzl/kiro2cc-proxy cache-credits-analyzer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TsinHzl/kiro2cc-proxy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/cache-credits-analyzer .opencode/skills/cache-credits-analyzer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cache-credits-analyzer" agent skill from https://github.com/TsinHzl/kiro2cc-proxy/tree/master/.claude/skills/cache-credits-analyzer into .opencode/skills/cache-credits-analyzer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cache-credits-analyzer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cache-credits-analyzer分析 kiro2cc-proxy 访问日志,计算 Prompt Caching 节省的 credits。只要用户粘贴了含有"输入token 输出token 费用$ credits✓"格式的日志行,并询问节省了多少credits、缓存效率、cost分析等,立即使用此 skill。触发关键词:节省了多少credits、cache节省、分析日志、caching…
Cache Credits Analyzer is an agent skill from TsinHzl/kiro2cc-proxy. 分析 kiro2cc-proxy 访问日志,计算 Prompt Caching 节省的 credits。只要用户粘贴了含有"输入token 输出token 费用$ credits✓"格式的日志行,并询问节省了多少credits、缓存效率、cost分析等,立即使用此 skill。触发关键词:节省了多少credits、cache节省、分析日志、caching savings、credits分析、计算节省、这些数据节省了多少。
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Backend & APIs, covering LLM cost and token optimization and Caching. The repository describes itself as: Kiro 反代到 Claude Code 与 Codex,支持 Claude Opus 5.5/5/4.8/4.7/4.6、Sonnet 5、GPT-5.6,兼容 Kiro Cache,并支持 SSE 流式输出。Kiro proxy for Claude Code and Codex. Supports Claude Opus… The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 34afa33. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cache Credits Analyzer loads about 1.1k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 225 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from TsinHzl/kiro2cc-proxy at commit 34afa33, republished under its MIT licence (© TsinHzl). 225 words, ~1,059 tokens.
.claude/skills/cache-credits-analyzer/SKILL.md (or your agent's skills folder).支持两种日志来源:
时间戳 IP 邮箱 模型 输入tokens 输出tokens 费用($) credits✓示例:
2026/05/25 16:19:38 127.0.0.1 user@example.com claude-sonnet-4-6 11.3K 10 $0.0339 0.1382✓11.3K、920 等格式(K = × 1000)estimated_cost,按 Anthropic 全价计算(无缓存折扣)credits_used,来自 Kiro meteringEvent 的真实 credits 消耗[usage] 入库 行)... [usage] 入库: model=<m> input=<n> output=<n> metering_credits=Some(<f>) credits_per_ktok=Some(<f>) effective_rate=Some(<f>) cache_read=<None|Some(n)> cache_creation=<None|Some(n)> ...解析时:
model → 模型名input / output → token 数(已是整数,无需 K 换算)metering_credits → credits_used(Some 内取值)cost_usd 需用 Anthropic 官方定价本地折算:cost_usd = (input * input_price + output * output_price) / 1e6| 模型 | input | output |
|---|---|---|
| claude-opus-4-6 / 4-7 | 15.0 | 75.0 |
| claude-sonnet-4-6 / 4-7 | 3.0 | 15.0 |
| claude-haiku-* | 0.80 | 4.0 |
从用户提供的日志文本中逐行提取:
modelcost_usd(格式 A 直接取;格式 B 由 input/output 折算)credits_used格式 A 忽略无 ✓ 标记的行;格式 B 忽略无 metering_credits=Some(...) 的行。
核心原则:每个模型独立推 k_ref,绝不全局共用一个值。
不同模型的 credit/$ 倍率显著不同(Sonnet ≈ 7.06,Opus ≈ 2.5)。 混用单一 k_ref 会让 Opus 的"基准"虚抬 ~2.7 倍,节省被严重高估。
k = credits_used / cost_usd| 模型 | k_ref (credits/$) | 来源 |
|---|---|---|
| claude-sonnet-4-6 | 7.06 | 项目历史实测 |
| claude-sonnet-4-7 | 7.06 | 同上(同价位) |
| claude-opus-4-6 | 2.40 | 实测 |
| claude-opus-4-7 | 2.60 | 实测 |
| claude-haiku-* | 未知 | 首次出现时实测,回退前先告警 |
对每行:
该模型的 k_ref = 上一步推算结果
无缓存应消耗 credits = cost_usd × k_ref(model)
实际消耗 credits = credits_used
节省 credits = 无缓存credits − 实际credits汇总时分别累加各模型的 baseline 与 actual,最后再求总和。 禁止用单一全局 k_ref 折算所有模型。
输出以下结构的分析结果:
## Prompt Caching Credits 节省分析
### k_ref 推算结果(按模型)
| 模型 | 样本数 | 实测 k_max | 采用 k_ref | 来源 |
|------|------:|----------:|----------:|------|
| claude-sonnet-4-6 | 90 | 7.18 | 7.18 | 实测 |
| claude-opus-4-7 | 7 | 2.60 | 2.60 | 实测 |
| claude-opus-4-6 | 7 | 2.38 | 2.38 | 实测 |
> 样本 < 3 条的模型必须标 ⚠️ "回退经验值,结果不可靠"
### 总览
| 指标 | 数值 |
|------|------|
| 请求总数 | N 条 |
| 总 estimated_cost(Anthropic 全价) | $X.XXXX |
| 假设无缓存总 credits(按模型 k_ref 折算后求和) | X.XXXX |
| 实际消耗总 credits | X.XXXX |
| **净节省 credits** | **X.XXXX** |
| 节省比例 | XX.X% |
| 折算 API 成本节省 | ~$X.XXXX |
### 按模型分组
| 模型 | 请求数 | k_ref | baseline | actual | 节省 | 节省率 |
|------|------:|-----:|--------:|------:|----:|------:|
| ... | | | | | | |
### Cache 构成
- 缓存命中节省(gross):+X.XXXX credits
- Cache creation 额外开销:-X.XXXX credits(如有大输出行,通常为写缓存成本)
### 按用户分组(仅格式 A 有 email 字段时)
| 用户 | 实际 credits | 无缓存 credits | 节省 credits | 节省率 |
|------|-------------|---------------|-------------|--------|
| ... |
### 典型行分析(按模型分别列出)
- 该模型缓存最深(k最小):... → k=X.XX,节省率XX%
- 该模型 cache creation 行(k > k_ref):...
- 该模型无缓存基准行(k≈k_ref):...cache_read=None cache_creation=None 时
(上游代理未透传),节省量是 baseline − actual 反推,无法用真实 cache token
交叉验证;报告里必须注明"间接估计"。estimated_cost 是按 Anthropic 全价的本地估算(不含缓存折扣);
credits_used 是 Kiro 实际扣除值(含缓存折扣);两者之差乘以该模型的
k_ref 即为该模型节省量。© TsinHzl, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/cache-credits-analyzer of TsinHzl/kiro2cc-proxy.
Open the folder on GitHubat commit 34afa33
Cache Credits Analyzer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cache Credits Analyzer this skillTsinHzl/kiro2cc-proxy | 174 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Prompt Cachingdavila7/claude-code-templates | 33k | 5 repos | ~452 | Automated safety check: Pass | MIT | |
| LLM Cachingsickn33/agentic-awesome-skills | 47k | 2 repos | ~2.8k | Automated safety check: Pass | MIT | |
| LLM Gatewaysickn33/agentic-awesome-skills | 47k | 1 repos | ~2.1k | Automated safety check: Pass | MIT | |
| Continue Enable DefaultsOnlyTerp/prompt-cache-skills | 114 | — | ~977 | Automated safety check: Pass | Custom licence | |
| Aider Prompt Caching DefaultOnlyTerp/prompt-cache-skills | 114 | — | ~638 | Automated safety check: Pass | Custom licence |
davila7/claude-code-templates
Caching strategies for LLM prompts including Anthropic prompt caching, response caching, and CAG (Cache Augmented Generation) Use when: prompt caching, cache prompt, response cache, cag, cache…
sickn33/agentic-awesome-skills
Implement multi-layer LLM caching with exact match, semantic similarity, and provider-side prompt caching.
sickn33/agentic-awesome-skills
Deploy an API gateway for LLM traffic with load balancing, rate limiting, key management, semantic caching, fallback routing, and cost tracking.
OnlyTerp/prompt-cache-skills
Continue's prompt caching is opt-in via config and off by default.
OnlyTerp/prompt-cache-skills
Patch recipe that turns on Aider's --cache-prompts by default for models that support caching, with a verification procedure against the wire request.
OnlyTerp/prompt-cache-skills
Verifies how Cline marks Anthropic prompt-cache breakpoints on the wire, then adds a tools breakpoint and tunes the cache TTL in its AI SDK code.
Categories
分析 kiro2cc-proxy 访问日志,计算 Prompt Caching 节省的 credits。只要用户粘贴了含有"输入token 输出token 费用$ credits✓"格式的日志行,并询问节省了多少credits、缓存效率、cost分析等,立即使用此 skill。触发关键词:节省了多少credits、cache节省、分析日志、caching…. Cache Credits Analyzer is an agent skill from TsinHzl/kiro2cc-proxy.
Cache Credits Analyzer fits situations like: tasks that involve LLM cost and token optimization; tasks that involve Caching.
Run `npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a claude-code`. Or copy the skill folder (.claude/skills/cache-credits-analyzer in TsinHzl/kiro2cc-proxy) into .claude/skills/cache-credits-analyzer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a codex`. Or copy the skill folder (.claude/skills/cache-credits-analyzer in TsinHzl/kiro2cc-proxy) into .agents/skills/cache-credits-analyzer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TsinHzl/kiro2cc-proxy --skill cache-credits-analyzer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cache-credits-analyzer, .gemini/skills/cache-credits-analyzer, .github/skills/cache-credits-analyzer and .opencode/skills/cache-credits-analyzer in your project.
SKILL.md names no scripts, command-line tools or credentials: Cache Credits Analyzer is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cache Credits Analyzer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cache Credits Analyzer: Prompt Caching (davila7/claude-code-templates, 33k stars), LLM Caching (sickn33/agentic-awesome-skills, 47k stars), LLM Gateway (sickn33/agentic-awesome-skills, 47k stars) and Continue Enable Defaults (OnlyTerp/prompt-cache-skills, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
TsinHzl (a GitHub user) maintains it in TsinHzl/kiro2cc-proxy, which has 174 GitHub stars. The repository was last updated on October 10, 2026.
Source: TsinHzl/kiro2cc-proxy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.