跳到正文
TakoAPI
返回技能列表

context-engineering

由 leoyessi10-tech 提供

Smart Home & IoT
2.4k下载量由 clawskills.sh 提供
1星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

This skill should be used when the user asks.

描述

该技能的功能

Covers strategies for compressing agent conversation history when sessions exceed context window limits. Three production-ready approaches are compared: anchored iterative summarization, opaque compression, and regenerative full summaries. The core metric is tokens-per-task rather than tokens-per-request.

Optimizing for tokens-per-task rather than tokens-per-request avoids the hidden cost of re-fetching lost context, which naive compression strategies miss entirely.

何时使用

  • Preventing coding agents from forgetting modified files mid-session
  • Handling codebases larger than the model context window
  • Designing summarization pipelines for long-running agent workflows
  • Evaluating compression quality with probe-based testing
  • Tuning compression trigger thresholds for multi-phase tasks

示例工作流

输入

User asks: compress the current 90,000-token debugging session before continuing

智能体
  1. 1

    Identify the structured summary sections: Session Intent, Files Modified, Decisions Made, Current State, Next Steps

  2. 2

    Summarize only the newly-truncated span of conversation history into those sections

  3. 3

    Merge the new section content into the existing persistent summary rather than regenerating from scratch

  4. 4

    Verify artifact trail completeness by checking that all read and modified files are listed

  5. 5

    Run probe-based checks asking factual questions to confirm critical details were retained

输出

Compressed structured summary under 2,000 tokens, with full file tracking and decision history preserved, ready to continue the session

安装

clawhub install leoyessi10-tech/context-engineering

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接