subagent-isolation-guard
固化子代理物理隔离与语义路由旁路。防止跨代理上下文污染及由于语义路由导致的子代理切模/重置问题。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/halfmoon82/subagent-isolation-guard🛡️ Subagent Isolation Guard
固化子代理物理隔离与语义路由旁路。
🎯 解决的问题
- 上下文污染:防止不同子代理共享同一个 workspace 导致文件读写冲突和上下文干扰。
- 路由递归/切模:防止主代理的语义路由逻辑应用到子代理会话,导致子代理被强制切换模型或清空上下文。
🛠️ 核心机制
1. 物理隔离 (Workspace Isolation)
所有子代理必须配置独立的 agentDir:
agents/pm/workspace/agents/architect/workspace/- ...
2. 语义路由旁路 (Routing Bypass)
在 semantic-webhook-server.py 中通过 session_key 特征码检测实现自动旁路:
- 识别特征:
:subagent: - 处理动作:直接返回
continue,不注入声明,不执行模型建议。
📝 固化规则 (AGENTS.md)
在创建或修改子代理时,必须确保:
allowAgents列表完整。- 每个子代理都有明确的、不重叠的
agentDir。 - 子代理会话 ID 必须包含
:subagent:标识。
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-halfmoon82-subagent-isolation-guard": {
"enabled": true,
"auto_update": true
}
}
}Tags
Related Skills
astrai-inference-router
Route all LLM calls through Astrai for 40%+ cost savings with intelligent routing and privacy controls
semantic-router
让 AI 代理根据对话内容自动选择最合适的模型。四层识别(系统过滤→关键词→指示词→语义相似度),四池架构(高速/智能/人文/代理),五分支路由,全自动 Fallback 回路。支持 trigger_groups_all 非连续词组命中。
spatix
Create beautiful maps in seconds. Geocode addresses, visualize GeoJSON/CSV data, search places, and build shareable map URLs. No GIS skills needed. Agents earn points for contributions.
astrai-code-review
AI-powered code review with intelligent model routing — saves 40%+ vs always using the most expensive model
subagent-architecture
Advanced patterns for specialized subagent orchestration with production-ready reference implementations. Security isolation, phased implementation, peer collaboration, and cost-aware spawning.