subagent-isolation-guard
固化子代理物理隔离与语义路由旁路。防止跨代理上下文污染及由于语义路由导致的子代理切模/重置问题。
Why use this skill?
Learn how to use the Subagent Isolation Guard to prevent context pollution and routing errors in OpenClaw. Secure your multi-agent workflows today.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/halfmoon82/subagent-isolation-guardWhat This Skill Does
The subagent-isolation-guard is a critical architectural utility for OpenClaw users running complex, multi-layered agentic workflows. Its primary purpose is to enforce strict boundaries between different sub-agents, preventing the common pitfalls of context leakage and unintended semantic routing. By mandating isolated workspace directories and providing a robust bypass mechanism for the routing logic, this skill ensures that a secondary or specialized agent—such as a project manager or system architect—does not inherit or corrupt the context of the parent agent.
Installation
To integrate this guardrail into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/halfmoon82/subagent-isolation-guard
Ensure that you update your AGENTS.md file to reflect the specific agentDir paths for any new or existing subagents created thereafter.
Use Cases
This skill is essential when managing hierarchical agent teams. For instance, when a 'Developer' agent is invoked by an 'Architect' agent, the isolation guard prevents the Developer from accidentally accessing the Architect's temporary scratchpad or writing files to the global root. It is also vital for preventing the semantic router from misinterpreting a subagent's status messages as instructions to switch the primary model or reset the conversation thread.
Example Prompts
- "Initialize a new subagent named 'CodeReviewer' with isolation protocols enabled and map its workspace to agents/review/workspace."
- "Configure the current session identifier to include the :subagent: flag to bypass global routing middleware."
- "Verify the workspace boundaries for the active subagent to ensure no file path collisions with the main workspace."
Tips & Limitations
Always ensure that the :subagent: identifier is appended to your session keys consistently; failing to do so will result in the subagent being treated as part of the main agent thread, potentially causing the very model-switching issues you are trying to avoid. While this skill provides robust logical isolation, it assumes the user correctly configures the agentDir in their local configuration files. It does not automate the migration of existing legacy files, so move them to dedicated directories manually after installation.
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
Flags: file-write, file-read
Related Skills
astrai-inference-router
Route all LLM calls through Astrai for 40%+ cost savings with intelligent routing and privacy controls
astrai-code-review
AI-powered code review with intelligent model routing — saves 40%+ vs always using the most expensive model
video-producer
短视频一键生成技能 v2.2。调用video-director进行画面规划,然后生成AI素材、TTS配音、视频渲染,输出完整MP4。
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.
arch-optimization
OpenClaw通信协议架构优化技能包 - 提供高性能、可靠的agent间通信框架。实现大消息59%性能提升,MessagePack 35%体积减少,统一传输层架构,智能路由算法,完整错误恢复和监控体系。