context-cache-management

Manage RARA context compression while preserving prompt prefixes and tool evidence.

15|1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/linkerdog/rara --skill context-cache-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context-cache-management
Source: https://github.com/linkerdog/rara/tree/main/.agents/skills/context-cache-management
Command: npx skills add https://github.com/linkerdog/rara --skill context-cache-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps prevent broken prompts and lost tool evidence when you change how RARA compresses context, projects tool results, budgets tokens, and handles provider-side prompt caching.

Core Features & Use Cases

  • Stable prompt prefix preservation: Keeps the ordering of system guidance, tool schemas, stable skills and memory, compacted history carry-over, and volatile suffix context consistent.
  • Correct tool pair handling: Ensures tool_use and tool_result blocks remain intact as a paired unit, avoiding partial or mismatched history edits.
  • Provider cache capability alignment: Applies compression strategies based on explicit cache capability profiles (automatic prefix cache, usage accounting, cache edit, and retention control), avoiding assumptions about OpenAI-compatible backends.
  • Memory placement discipline: Places retrieved memory in a volatile suffix near the latest user request unless explicitly promoted into stable workspace memory.

Quick Start

Ask RARA to apply this skill while you adjust context compression or provider cache behavior for a specific model backend, ensuring the saved transcript remains unchanged except for explicit user-requested lifecycle compaction.

Frequently Asked Questions about context-cache-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent broken prompts when compressing conversation context?

To prevent broken prompts during context compression, you must preserve stable prompt prefixes and enforce deterministic ordering of system guidance, tool schemas, and compacted history. This ensures the prompt source remains stable while managing token budgets.

How does context compression handle tool_use and tool_result pairing?

Context compression handles tool_use and tool_result pairing by enforcing them as intact paired units. This avoids partial or mismatched history edits, ensuring correct tool evidence is maintained throughout transcript projection and microcompaction processes.

Does context compression work with OpenAI-compatible backends for prompt caching?

Context compression aligns with provider cache handling by gating edits and retention parameters on declared cache capability profiles. It avoids assumptions about OpenAI-compatible backends, applying strategies based on explicit capability declarations for prefix caching and retention.

What is the best way to manage memory placement during transcript projection?

The best way to manage memory placement is to place retrieved memory in a volatile suffix near the latest user request. Memory is only moved into stable workspace memory if explicitly promoted, maintaining correct context boundaries during transcript projection.

When should I not use automatic prompt prefix caching for model provider integration?

You should not use automatic prompt prefix caching when your model provider integration lacks declared cache capability profiles. Without explicit support for cache edits and retention control, assumptions about provider-side caching can break deterministic ordering and tool evidence.