Principle Guard The Context Window

作者 cursorccb5507cec15无许可证10K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库今天更新

Apply when context is filling up: large outputs, long files, repeated reads, fan-out planning. Route bulk to subagents; keep summaries in the main thread, not raw payloads.

仅含说明AI & Agents
AI 生成的概览

指导智能体通过把大量输出交给子代理、只保留摘要来保护上下文窗口。

功能
该技能提供一组简短原则,用于在智能体工作中管理有限的上下文窗口。它建议把冗长输出、截图和长文档等大型负载隔离到子代理中,让主线程只接收摘要而非原始数据。它还建议把频繁使用的模板和参考资料保留在行内,并通过文件数量和回合预算来控制各阶段规模。它只产出指导内容,不产出文件或代码。
适用场景
适用于上下文逐渐占满的情况,例如出现大量输出、读取长文件、重复读取或进行扇出规划时。其目的是避免会话变长时推理质量下降。
运行要求
无需工具、软件包或凭据;仅为说明性指令,不附带脚本。

Guard the Context Window

The context window is finite and non-renewable within a session. Every token should be worth its cost.

Why: Context overflow degrades reasoning quality, creates compression artifacts, and halts progress.

Pattern:

  • Isolate large payloads. Route verbose outputs, screenshots, and large documents to subagents. The main context gets summaries, not raw data.
  • Keep frequently used content inline. Templates and references used on every invocation belong in the skill file, not in separate files that cost a read each time.
  • Size phases and cap scope. Limit files per phase, set turn budgets, account for mechanism costs.

来源与署名

来源:cursor/plugins位于pstack/skills/principle-guard-the-context-window提交ccb5507

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架