agent-context-isolation
仓库创建 2025年12月23日最近提交 6 个月前SkillHot 收录 20 天前
▸ 精选理由
实用的上下文管理规则,适合需要并行子代理的工作流。
这个 Skill 做什么
规范代理之间通过文件/背景任务隔离输出,避免污染主上下文窗口。
把子代理的输出和后台任务用文件或明确的边界隔离开,避免把子 agent 的大段日志或中间结果直接塞回主上下文导致信息混乱。常用在主任务分派子任务、并行处理或多代理协作时,保证主窗口干净且可复现。规则上推荐文件为交互接口并限制直接写入主上下文,防止污染和敏感数据泄露。
▸ 展开 SKILL.md 英文原文
Agent Context Isolation
3.9k
Stars
298
Forks
40
仓库内 Skill
+17
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/parcadei/Continuous-Claude-v3/main/.claude/skills/agent-context-isolation/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/parcadei/Continuous-Claude-v3/main/.claude/skills/agent-context-isolation/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Agent Context Isolation Prevent agent output from polluting the main context window. ## Rules ### 1. Use Background Agents with File-Based Coordination ``` # RIGHT - background agent writes to file, main reads file Task(subagent_type="...", run_in_background=true, prompt="... Output to: /path/to/file.md") # WRONG - foreground agent dumps full transcript into main context Task(subagent_type="...", run_in_background=false) ``` Background agents with `run_in_background=true` isolate their context. Have them write results to files in `.claude/cache/agents/<agent-type>/`. ### 2. Never Use TaskOutput to Retrieve Results ``` # WRONG - dumps entire transcript (70k+ tokens) into context TaskO
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有