Agents & Protocols

Prompt Caching Review

Reviews ONE Claude API request (tools, system, messages, the cache marks, the model, the sizes and how often it is sent) for the five reasons its prompt cache does not pay off, and lists only those, one line each with a fixed code, the place, why the cache misses and the fix - or exactly No findings. It catches text that changes on every call (a clock, a request id, a user name) at or before the cache mark, a large stable prefix with no mark, a marked prefix shorter than the model's minimum, tools or system edited between calls, and calls spaced further apart than the cache lifetime. It leaves out the safe look-alikes, such as a timestamp placed after the last mark or a mark on the latest user turn. Use to review a request before an agent ships, to find out why prompt caching shows zero cache read tokens, or to gate a change to a system prompt or a tool list.

Prompt Caching Review is a tested SKILL.md that reviews ONE Claude API request (tools, system, messages, the cache marks, the model, the sizes and how often it is sent) for the five reasons its prompt cache does not pay off, and lists only those, one line each with a fixed code, the place, why the cache misses and the fix - or exactly No findings; an agent buys it once for $0.01 over x402.

Tested 2026-10-19No code, no hidden instructionsv1.0.0 · 8.8 KB · perpetual license

Not for

Estimating cache savings or prices, reading real usage numbers from past calls, other model providers, retry and fallback logic, and the code that builds the request. It judges only the request text, the marks and the timing that you paste.

Tested, honestly

Tested 2026-10-19 with a strong and a weak model.

SonnetStrong model, claude-sonnet-5-5
Right on all 3 cases, read by hand. It named the clock in the system block as one line and left out the request id that sits after the mark. It named the tool removed between two calls as one line and did not flag the mark on the latest user turn. On the clean chat, with a timestamp after the only mark, it answered exactly No findings.
HaikuWeak model, claude-haiku-5-5
Right on all 3 cases, read by hand. It gave the same single line for the clock in the system block and the same single line for the dropped tool, each with a fix, and answered exactly No findings on the clean chat. It spent far more output tokens than Sonnet on the planted cases but stayed inside the format.

Full test summary

Example

Our own test text, before and after the skill ran. Excerpts only.

English · claude-sonnet-5-5

Before

Two consecutive requests of one chat session with a research assistant, model claude-sonnet-4-5, sent about 25 seconds apart. In each request the last block of the newest user message carries cache_control {"type": "ephemeral"}; nothing else is marked. Request 1 tools (3): web_search, summarize_page, export_report. About 900 tokens in all. system: one text block of about 2,800 tokens, no mark.…

After

PREFIX-EDITED — tools list, `export_report` removed in request 2 once the export quota is used up — a tool change invalidates the cache for the tools, system and messages, so request 2 cannot read the entry request 1 wrote — keep all three tool definitions in every request and have the app refuse export calls once the quota is used up

What is in the file

  • The answer
  • How the cache works (as published on 19 October 2026)
  • The codes
  • How to read the request
  • Rules
  • Work in this order
  • Short example

Languages

English. Tried in: English.

License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Full terms.

Versions

Current version 1.0.0, updated 2026-10-19. Whoever bought an earlier version gets new ones free through the same re-download token.

  1. v1.0.0 · 2026-10-19

    First release, written in the light-test batch of 19 October 2026 (three cases, price $0.01). The idea is ours; no foreign skill was opened, facts come from public pages (see notes/ideas.md). Output: one line per finding with a fixed code, or exactly `No findings.`

    Test: three cases written by hand (a request with a clock in the system block, a session that drops a tool between two calls, and a clean chat), one run on Claude Sonnet and one on Claude Haiku, no run without the skill, no iteration on the skill text after the runs. `test/control.mjs` shows that the checks pass on the ideal answers and fail on realistic wrong ones. See `test-summary.json` for the verdicts read by hand.

FAQ

Might a timestamp placed after the last cache mark still hurt the cache?

It does not, so the skill stays silent about it. The next call compares only what lies up to the mark; whatever follows is billed as ordinary input. The same timestamp before the mark, or in the final block when the top-level automatic mark is used, is reported as a value that changes on every call.

Which minimum lengths does it use?

The table that Anthropic published on 19 October 2026, copied into the skill with that date. A model that is not in the table gets no line about length, because the skill does not guess a number.

What did the trial look like?

Two requests were planted with a defect and one was left clean: a clock written into the system block, a tool dropped between two calls of a session, and a stable chat whose only changing value comes after the mark. Claude Sonnet and Claude Haiku each took every request once, and by hand both read right on all of them.

What does a request without problems get?

The single sentence No findings. and no commentary, which lets a script gate a change on the reply. A problem is a line made of a code, the part of the request, why the cache misses and the fix.

Share

Read this page as Markdown: /skills/prompt-caching-review.md.

More in Agents & Protocols

  • Agent Loop Review: Repeats, Caps, Self-Grading

    Agents & Protocols

    SKILL.md · v1.0.0 · 11.8 KB

    Reviews the description, configuration or code of an agent loop, anything that repeats on its own: a scheduled job that calls a model, an agent that retries until it is done, a batch of actions, a self-improving prompt loop. It finds where the loop runs away or repeats a side effect (no ceiling on iterations, the same scheduled tick delivered twice, a progress marker written after the effect, nothing kept between iterations, a batch that goes on after a refusal that will repeat for every item), where it judges its own work (the model says it is finished), where it acts beyond its brief (a token or tool set wider than the job, a delete, publish or mass send with no approval step) and where a dead source looks healthy (an empty reply counted as success, parallel workers writing one shared file). Each finding has a fixed code, the place, the reason and a fix, then one verdict. Use for an agent loop review, to find out why a cron job runs twice, to check a retry until done loop, or to catch a runaway agent loop before it runs unattended.

    $0.01once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 18 Oct 2026

  • Recommended

    x402 Listing Review: Catalogs, Scanners, Buyers

    Agents & Protocols

    SKILL.md · v1.0.2 · 13.8 KB

    Reviews how a paid HTTP resource sold over x402 is advertised to catalogs, scanners and buyer agents, and how the seller's own scripts read those catalogs back, from pasted 402 bodies, OpenAPI documents, discovery files, liveness guard code, catalog presence check scripts and buyer alerts. Flags a tiered tariff advertised as one row (a comparison bot reads the structured amount, not the description), one liveness clock for several catalog rows that are dropped one by one, a price above the standard buyer client's default cap with no note where agents read before buying, a discovery file the scanner no longer parses, a bearer scheme the scanner's indexer does not recognise by name, a scanner record that was never re-crawled after a fix, a presence check that reads only one of the two response field names or has no control that must return zero, a first buyer that is a crawler paying hundreds of sellers, and discovery endpoints that read the database on every crawl. Each finding has a fixed code, the place, the reason and a fix, then one verdict. Use for an x402 listing review, to check x402 discovery or Bazaar catalog presence code before trusting it, or to audit how a paid API is listed and read.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 9 Oct 2026

  • Claude Session Saver: When to Clear or Compact

    Agents & Protocols

    SKILL.md · v1.0.0 · 12.6 KB

    Reviews a snapshot of a Claude Code session (the context size, measured or guessed; the task and where it stands; git status; what still runs in the background; the plan or notes file; what the person asked) and decides whether the person should type /clear, type /compact with a focus text, finish one step first, or keep going. Before a fresh session it lists what would be lost or left behind: results that exist only in the chat, a plan file with no next step, uncommitted or unpushed work, changes made by another session, background servers and temporary deployments, a secret about to be written into notes. It also flags the timing and command mistakes: a deploy or migration in progress, waiting for auto-compact, a size judged by feel, a cold cache after a long break, the same correction made three times, /compact on finished work, /compact with no focus, an agent that claims it will clear the session itself, and huge files or logs read whole. Each finding has a fixed code, the reason and a step, then one decision line. Use it to decide when to clear a Claude Code session, to save work before /clear, or to write a claude code /compact focus before the context gets costly.

    $0.03once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 16 Oct 2026

  • Claude Code Memory Review: CLAUDE.md, Rules, Imports

    Agents & Protocols

    SKILL.md · v1.0.0 · 12.5 KB

    Reviews a pasted Claude Code memory setup (a folder tree plus CLAUDE.md, CLAUDE.local.md, files under .claude/rules/, imported files, AGENTS.md and an auto-memory MEMORY.md) for instructions that silently never reach the model, that load earlier or later than the author thinks, or that contradict each other. It flags an @import whose target is not in the tree (Claude Code gives no warning for it), a relative import resolved from the wrong folder, imports in quotes, in code or with an unescaped space, import chains that are too deep, an AGENTS.md next to a CLAUDE.md that does not import it, a file over 4 MiB, a path-scoped rule whose globs match nothing, an @import inside a path-scoped rule (it loads at session start, so the rule saves nothing), broken rule frontmatter, imports from outside the project, a project-wide rule hidden in a subfolder CLAUDE.md, files far over 200 lines, an auto-memory index cut at 200 lines or 25 KB, stale file paths and opposite instructions in two loaded files. Each finding has a fixed code, the place, the reason and a fix, then one verdict. Use to review Claude Code memory, check CLAUDE.md imports, or find path-scoped rules not loading before the team relies on the setup.

    $0.05once

    • x402
    • USDC
    • Base
    Get skill

    Tested with Sonnet and Haiku, 15 Oct 2026