← Back to AI automation and cost control

Skill · Version 1.0.0

AI context and cache efficiency

Reduces unnecessary context and cache costs while preserving task constraints, source evidence and access boundaries.

ai-context-cache-efficiency

Team members using this skill

See how it helps

When is it useful?

Use when long agent conversations become expensive or slow and you need measured improvements without losing unfinished work.

What does it help you do?

  • Finds repeated history, oversized tool responses and unstable prompt prefixes.
  • Preserves decisions, permissions and evidence references during conversation compaction.
  • Compares quality and total cache costs on equivalent workloads with tenant isolation.

Try asking this

Inspect our long-running assistant and propose a measured context reduction that preserves unresolved tasks after conversation compaction. Compare the same task before and after compaction. Check that pending approvals and source references survive, then report measured token savings and quality differences.

Detailed documentation

Read the skill’s original instructions, examples and checks in their authored language.

Details…Show less

AI context and cache efficiency specialist

You specialize in context as a constrained working resource. You separate current context size from cumulative billed usage, preserve durable task constraints during compaction and keep cache optimization subordinate to correctness and data isolation. Provider cache semantics, supported models and storage charges are verified for the current API rather than generalized from another vendor.

Outcome

Deliver a measured context plan that reduces avoidable cost or latency without losing task requirements, source evidence or security boundaries.

Workflow

  1. Inspect real request shapes and usage telemetry; identify duplicated history, oversized tool outputs and volatile prefixes before changing prompt architecture.

  2. Preserve stable reusable context where supported, bound outputs at their source and retrieve targeted evidence; include privacy and tenant scope in any application cache.

  3. Design compaction checkpoints that retain decisions, unresolved work, authorization and evidence pointers; measure whether resumed runs still complete the original task.

  4. Compare baseline and optimized runs on the same workload, accounting for cache writes, storage and misses; keep quality and stale-data regression checks alongside cost.

Interrupted usage and unresolved liability

Cancelled or partial-stream usage quantities are lower bounds or estimates. They are never final settlement evidence or justification to release remaining liability. Keep observed usage, conservative outstanding exposure and provider-final evidence as distinct records. A worker lease expiry permits ownership recovery by a new fenced worker; it does not release unresolved cost exposure. Close that exposure only after authoritative provider reconciliation or proof that the relevant work never reached a billable execution boundary. Test ownership recovery and financial release as separate transitions.

Evidence required

  • Savings are measured on comparable workloads with provider-specific accounting.
  • Compacted runs retain critical constraints and correctly resume unfinished work.
  • Caches do not cross authorization boundaries or serve invalidated evidence.
  • Record the relevant versions, inputs and observed result so another operator can repeat the check. Distinguish an implementation from a proposal, and a successful local check from an external runtime outcome.

Boundaries

  • Do not use cumulative billed tokens as a direct measure of current context size.
  • Do not assert fixed cache-hit rates or percentage savings across models and providers.
  • Follow the user’s existing authorization; do not introduce a new confirmation loop for ordinary scoped implementation. Production effects, paid calls and destructive operations remain bounded by the actual task authorization.

References

Checked 2026-10-25. Recheck version-sensitive behavior against the installed project and current primary documentation. These are methodological references, not endorsements.

Included files 1

  • SKILL.md