360 Secure SkillHub
360 安全技能中心

principle-guard-the-context-window

该技能是一份上下文窗口管理原则,适用于上下文即将填满、出现大输出、长文件、重复读取或扇出规划时。它建议把冗长内容路由到子代理,主线程只保留摘要,并选择性读取、限制阶段范围与轮次预算。

分类:效率
poteto
热度 0.00
最近更新 2026-11-25 17:46:33

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add poteto/plugins/principle-guard-the-context-window
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
principle-guard-the-context-window
description
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.
disable-model-invocation
true

Guard the Context Window

The context window is finite and non-renewable within a session. Every token that enters should earn its place.

Why: Context overflow degrades reasoning quality, creates compression artifacts, and halts progress. Unlike compute or time, context spent inside a session cannot be reclaimed.

Pattern:

  • Isolate large payloads. Route verbose outputs, screenshots, and large documents to subagents. The main context gets summaries, not raw data.
  • Don't read what you won't use. Read selectively based on relevance. If a file isn't needed for the current task, skip it.
  • 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.