Common context optimization

From HoangNguyen0403/agent-skills-standard · View interactive version

Common context optimization is an AI agent skill from the GitHub repository HoangNguyen0403/agent-skills-standard. Manage context and prompt-cache costs without losing task state. Use for context management, orchestration cost, token budgets, large tool outputs, cache misses, or long-running conversations.

How to use this skill

Skill file

**Priority: P1 (HIGH)**

Workflow

  1. Inspect host capabilities; do not assume agents can rewrite history, prompts, or memory.
  2. Project outputs after consuming them: retain decisions, evidence, errors, and required values; point to complete logs/artifacts by stable reference.
  3. Bound context at host-supported boundaries. Carry goal, active slice, authority, decisions, blockers, evidence links, and next action; preserve a stable append-only prefix where supported.
  4. Compact only when useful and supported. Keep required details retrievable; never discard source evidence or rely on a fixed turn/token threshold.
  5. Measure cache reads, replayed input, and total actor cost across the whole task. Separate observed usage from estimates; no invoice, savings, or efficacy claims without evidence.

Anti-Patterns

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.