hive.context-preservation
它能做什么
这个技能让 AI 在工作过程中,把大型结果中的重要事实复制成简短笔记。适合可能丢失早期细节的长任务。
适用场景
- ✓当一项长任务产生了大量搜索或工具结果的时候。
- ✓当 AI 提示其工作记忆即将占满的时候。
- ✓当后续步骤依赖于早期结果中的数值、链接或 ID 时。
技能链接
https://github.com/aden-hive/hive/blob/main/core/framework/skills/_default_skills/context-preservation/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我希望你保留每次搜索中的关键链接和数字,这样之后就不会丢失。”
每周 5 个新技能,1 分钟读完。
工作原理
每次工具调用之后,AI 会提取它之后需要的数值,例如链接、ID 和简短片段,并保存到笔记区。即使较早的工具结果被清除,这些重要事实也会保留下来。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Operational Protocol: Context Preservation
You operate under a finite context window. Older tool results WILL be pruned. Extract what you need while it's still in context.
Save-as-you-go. After any tool call producing information you'll need later, immediately extract the key data into _working_notes or _preserved_data. Do not rely on referring back to old tool results — once they're pruned they're gone.
What to extract:
- URLs and key snippets (not full pages)
- Relevant API fields (not raw JSON blobs)
- Specific lines, values, or IDs (not entire files)
- Analysis conclusions (not raw data)
Handoffs between tasks happen through progress.db, not through shared-buffer handoff blobs. When you finish a task, any state the next worker needs goes into the task row itself (steps.evidence, tasks.last_error, sop_checklist.note) — see hive.colony-progress-tracker. Use _working_notes for things the DB schema doesn't cover.
You will receive an alert when context reaches {{warn_at_usage_ratio_pct}}% — preserve immediately.
常见问题
AI 应该保存什么?
它保存链接、关键片段、具体数值、ID 和结论,而不是整页内容或原始数据。
笔记保存在哪里?
保存在一个工作笔记区中,AI 之后可以读取。
对于短任务有用吗?
它在长任务中最重要,因为早期结果可能在被使用之前就被清除。
详情
作者的原始描述
Proactively extract critical values from tool results into working notes before automatic context pruning destroys them.
repo: aden-hive/hive
热度
- GitHub 星标
- 11k
- 排名
- #11800
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
browser-edge-cases
11k帮你的智能体修复在 LinkedIn、X 或脚本繁重的页面等复杂网站上失败的浏览器自动化任务。
hive.browser-automation
11k教你的智能体使用 hive-browser 工具控制你自己的 Chrome 浏览器,通过截图和点击完成操作。
hive.colony-progress-tracker
11k帮你的智能体认领任务,并把它的步骤和检查记录在共享数据库中,让工作在进行中就被跟踪。
hive.error-recovery
11k帮你的智能体按清晰的方案处理失败的工具步骤:重试一次、修正输入、跳过该项,或上报处理。