context

Manage artifact storage and context window efficiency through cache-aware packing.

Updated May 6, 2026
One-click install
npx skills add https://github.com/dbowm91/codegg --skill context-dbowm91
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: context
Source: https://github.com/dbowm91/codegg/tree/main/.opencode/skills/context
Command: npx skills add https://github.com/dbowm91/codegg --skill context-dbowm91

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the challenge of managing large AI context windows by providing tools for artifact storage, output projection, and intelligent compaction of volatile data.

Core Features & Use Cases

  • Context Packing: Implements algorithms to sort and prioritize context blocks based on tier and budget, ensuring efficient use of provider prompt-cache prefixes.
  • Volatile-Tail Compaction: Automatically compacts old, low-value tool-result messages while preserving recovery handles for future reference.
  • Effective-Cost Analysis: Provides diagnostic insights into cache hit rates and token usage to help optimize model performance and costs.

Quick Start

Use the context skill to analyze the current session usage and apply compaction to the volatile message tail.

Frequently Asked Questions about context

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

FAQPage Schema
What is context window compaction for AI agents?

Volatile-tail compaction works by automatically compacting old, low-value tool-result messages while preserving recovery handles. This allows long-term memory management to maintain stable context without exceeding token budgets.

How do I optimize AI context windows to manage token costs?

You optimize AI context windows by applying cache-aware context packing, which sorts and prioritizes context blocks by tier and budget. This ensures efficient use of provider prompt-cache prefixes and reduces overall token costs.

Does context window packing work with provider-agnostic usage normalization?

Yes, context window packing supports provider-agnostic usage normalization by implementing deterministic tool-output projection. This ensures stable and cost-effective model interactions across different AI providers.

How do I analyze cache hit rates and token usage for AI model interactions?

You analyze cache hit rates and token usage through effective-cost analysis diagnostics. This provides insights into provider prompt-cache efficiency to help optimize model performance and reduce costs.

What are the limitations of volatile-tail compaction for long-term memory management?

A limitation of volatile-tail compaction is that it removes old tool-result messages from the active context window. While recovery handles are preserved for future reference, the full original message payloads are no longer directly accessible.