跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

Context Compression

技能 已验证 活跃

This skill should be used when the user asks to "compress context", "summarize conversation history", "implement compaction", "reduce token usage", or mentions context compression, structured summarization, tokens-per-task optimization, or long-running agent sessions exceeding context limits.

目的

To provide agents with effective methods for managing and reducing token usage in long-running sessions by intelligently compressing conversation history and evaluating the quality of compression.

功能

  • Strategies for context compression (Anchored Iterative, Opaque, Regenerative)
  • Guidance on optimizing tokens-per-task vs. tokens-per-request
  • Detailed explanation of artifact trail preservation
  • Methodologies for probe-based evaluation of compression quality
  • Implementation steps for structured summaries and compression triggers

使用场景

  • When agent sessions exceed context window limits
  • Designing conversation summarization strategies
  • Debugging agents that 'forget' previous information
  • Optimizing token usage in long-running agent sessions

非目标

  • Replacing prompt engineering entirely
  • Handling context compression for raw code blocks without summarization
  • Providing a generic text summarization tool outside of agent context engineering

工作流

  1. Identify need for context compression due to session length or token limits.
  2. Select an appropriate compression strategy (Anchored Iterative, Opaque, Regenerative).
  3. Implement the chosen strategy, focusing on structured summaries and appropriate triggers.
  4. Evaluate compression quality using the provided probe-based framework.
  5. Monitor re-fetching frequency as a key quality signal.

实践

  • Context Engineering
  • LLM Evaluation
  • Agent Design Patterns

安装

请先添加 Marketplace

/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering
/plugin install Agent-Skills-for-Context-Engineering@context-engineering-marketplace

质量评分

已验证
100 /100
1 day ago 分析

信任信号

最近提交about 1 month ago
星标15.6k
许可证MIT
状态
查看源代码