T01 · Skill Instruction Hijacking
- Location
SKILL.md:438- Finding
Persistent Main-Agent Role and Workflow Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is related to OpenClaw team setup, but it makes broad persistent changes to agent behavior and local workspaces with unsafe installation and data-handling patterns.
Install only after reviewing the generated SOUL.md, AGENTS.md, and openclaw.json diffs, and only if you want your Main Agent to persistently delegate work through a Manager. Avoid live prompts.chat enrichment, pin or manually review added skills, back up ~/.openclaw first, and tighten workspace permissions before using this on any shared machine.
SKILL.md:438Persistent Main-Agent Role and Workflow Hijacking
SKILL.md:382Untrusted Remote Prompt Content Persisted as Agent Instructions
scripts/install_skills.sh:24Unpinned Third-Party Skill Installation
scripts/create_agent.sh:7Path Traversal Through Unvalidated Agent Identifiers
scripts/run_planning_interview.sh:24Predictable Shared Temporary File for Interview Data
scripts/create_agent.sh:52Agent Workspaces and Memory Are Made World-Readable
This duplicate scanner hit points to the same destructive workspace deletion command. It remains a true issue because the documentation normalizes direct recursive removal of persistent agent data without any protective framing.
openclaw gateway restart
# 3. 可选:删除 workspace(会同时删除 SOUL.md 和记忆)
rm -rf ~/.openclaw/workspace-manager
rm -rf ~/.openclaw/workspace-munger
# 4. 可选:删除 session 历史
This duplicate scanner hit points to the same destructive workspace deletion command. It remains a true issue because the documentation normalizes direct recursive removal of persistent agent data without any protective framing.
openclaw gateway restart
# 3. 可选:删除 workspace(会同时删除 SOUL.md 和记忆)
rm -rf ~/.openclaw/workspace-manager
rm -rf ~/.openclaw/workspace-munger
# 4. 可选:删除 session 历史
This duplicate finding covers the same worker-workspace deletion command and carries the same accidental-data-loss risk. The skill context makes it more sensitive because these directories are explicitly used to store durable memory and agent configuration.
# 3. 可选:删除 workspace(会同时删除 SOUL.md 和记忆)
rm -rf ~/.openclaw/workspace-manager
rm -rf ~/.openclaw/workspace-munger
# 4. 可选:删除 session 历史
rm -rf ~/.openclaw/agents/manager
This duplicate finding covers the same worker-workspace deletion command and carries the same accidental-data-loss risk. The skill context makes it more sensitive because these directories are explicitly used to store durable memory and agent configuration.
# 3. 可选:删除 workspace(会同时删除 SOUL.md 和记忆)
rm -rf ~/.openclaw/workspace-manager
rm -rf ~/.openclaw/workspace-munger
# 4. 可选:删除 session 历史
rm -rf ~/.openclaw/agents/manager
This duplicate hit refers to the same session-directory deletion command. Even though it is not an exploit primitive in itself, it is operationally dangerous because it permanently erases hidden state from the user's home directory.
rm -rf ~/.openclaw/workspace-munger
rm -rf ~/.openclaw/agents/manager rm -rf ~/.openclaw/agents/munger
This duplicate hit refers to the same session-directory deletion command. Even though it is not an exploit primitive in itself, it is operationally dangerous because it permanently erases hidden state from the user's home directory.
rm -rf ~/.openclaw/workspace-munger
rm -rf ~/.openclaw/agents/manager rm -rf ~/.openclaw/agents/munger
This duplicate hit refers to the same worker session-history deletion command. The risk is unchanged: irreversible loss of state and history from copy-pasted destructive shell commands.
rm -rf ~/.openclaw/agents/manager rm -rf ~/.openclaw/agents/munger
---
This duplicate hit refers to the same worker session-history deletion command. The risk is unchanged: irreversible loss of state and history from copy-pasted destructive shell commands.
rm -rf ~/.openclaw/agents/manager rm -rf ~/.openclaw/agents/munger
---
The declared description promises a sophisticated multi-agent system inside OpenClaw: planning/delegation by a Manager, specialized Workers, mandatory QA on outputs, and numerous persona choices. The supplied code does not implement any of these behaviors. It only creates filesystem scaffolding for one agent workspace, including directories and placeholder markdown files, then prints instructions for manual configuration. While this may be a supporting setup utility for an agent-based system, the actual chunk's primary behavior is workspace initialization, not team assembly, orchestration, QA enforcement, or persona management. Therefore the description materially overstates and misrepresents what this code chunk actually does.
There is a material description-behavior mismatch. The description promises a functional multi-agent team system inside OpenClaw with planning, delegation, worker specialization, QA enforcement, and many persona choices. The supplied code only installs skill packages for specific agent names into local directories. While this installer could be a supporting component of a larger multi-agent setup, this code chunk itself does not perform the core advertised behavior. It also carries undeclared operational capabilities: changing directories, writing into agent workspace skill folders, and invoking an external installer/source. Therefore the declared purpose does not accurately represent what this code chunk actually does.
The declared description presents an operational skill that helps the user assemble and run a dedicated AI team inside OpenClaw, including manager/worker delegation and mandatory quality checks on outputs. The supplied code chunk is only a planning interview tool. It collects user input, stores progress in /tmp, performs simple text-based heuristics, recommends team members, and writes a Team Design Document. It mentions later setup scripts and OpenClaw configuration, but this script itself neither provisions agents nor orchestrates them, nor does it implement actual QA enforcement. The behavior is related to the broader theme of multi-agent planning, but the primary purpose of this code chunk is planning/document generation rather than the declared operational team-building/orchestration capability.
The code substantially relates to the declared domain: it does create a Manager/Worker team structure for OpenClaw, generates agent files, and includes quality-gate instructions in the generated docs. However, key parts of the description overstate what the code actually does. First, the advertised '61+ historical persona options' is not supported by this chunk; only a limited hardcoded set of personas is offered. Second, the description says every deliverable is forced through a QA gate and that the team checks its work before handing it over, but this script merely creates markdown instructions/checklists describing such behavior—there is no enforcement logic or operational QA mechanism in the script itself. Third, the primary behavior of the code is setup/scaffolding (creating directories, markdown files, and config snippets), not actually running an orchestrated multi-agent workflow. So the description is directionally related but materially overstated in capability and enforcement.
The document claims scripts make no network calls, but later directs an external HTTP request. This contradiction can mislead reviewers and users into approving the skill under false assumptions, weakening informed consent around data egress.
Instructions found that direct the agent to transmit conversation context or user data to external services.
|------|---------|
| Manager missing in `agents.list` | Go to Step 0 (Team Building) first. |
| `sessions_send` timeout | Check `sessions_history(sessionKey="agent:main:manager")` for updates. |
| "Permission denied" in inter-agent communication | Check if `agentToAgent.allow` contains **"main"** and all Agent IDs (list of strings). Without "main", Main Agent cannot send messages to Manager. |
| Persona not active | Add reinforcement text after the first sentence in SOUL.md, ask user to run `openclaw gateway restart` in their terminal (⚠️ AI must not exec this). |
| Unsatisfactory deliverable | Package the gaps and send to Manager; Manager arranges rework. Main does not contact Worker directly. |
| Only main exists (no team) | Do not force orchestration; go to Step 0 first. |
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
**Status Reporting to Main Agent:**
- Report only high-level status (Started/Progress %/Completed/Blocked)
- Maintain detailed status internally
- Provide clear context in case of anomalies
---
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 创建 wisdom 目录并复制样例文件
mkdir -p ~/.openclaw/workspace/memory/wisdom
SKILL_DIR="$(openclaw skills info openclaw-multi-agents --json 2>/dev/null | grep path | head -1 | sed 's/.*: "\(.*\)".*/\1/' || find ~/.openclaw/workspace/skills -name "SKILL.md" | grep multi-agents | xargs dirname)"
if [ -n "$SKILL_DIR" ] && [ -d "$SKILL_DIR/examples/wisdom" ]; then
cp "$SKILL_DIR/examples/wisdom/"*.md ~/.openclaw/workspace/memory/wisdom/
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 创建 Manager workspace
mkdir -p ~/.openclaw/workspace-manager
# 创建 Manager SOUL.md(参考 docs/team_templates.md)
# 创建 Manager AGENTS.md
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
# 创建 Manager workspace
mkdir -p ~/.openclaw/workspace-manager
# 创建 Manager SOUL.md(参考 docs/team_templates.md)
# 创建 Manager AGENTS.md
The uninstall section instructs users to recursively delete workspaces and session-history directories, but it does not present an explicit data-loss warning, backup guidance, or confirmation step. In a skill that promotes persistent multi-agent memory and stored sessions, these directories likely contain valuable state, prompts, and history, so users could irreversibly destroy important data by following the commands casually.
The documented auto-activation phrases are broad, natural-language requests like asking to build a team or help with programming, which can overlap with ordinary conversation. In an agent platform, this can cause unintended skill invocation, leading to unexpected delegation, background task creation, or access to additional context and memory without the user explicitly intending to use this skill.
The README states that the skill reads existing context including USER.md, memory, and session history, but it does not present a prominent privacy notice, scope limitation, or consent mechanism near that behavior. This creates a data exposure risk because users may trigger the skill without realizing it will ingest prior conversations or stored memory, especially when combined with the broad activation language described earlier.
The README states the skill will 'Read your existing context (USER.md, memory, session history)' before proceeding, but it does not provide a visible privacy warning, scope limitation, or consent model. Because this skill is specifically designed for orchestration and background work inside OpenClaw, silent access to historical context increases the chance of over-collection and user surprise, especially if sensitive material exists in session history or memory stores.
The README advertises broad natural-language triggers such as 'I want to build a team' and 'Help me handle multiple things at once' and states the skill 'activates automatically.' In a chat-driven agent platform, this creates ambiguous invocation boundaries and raises the risk of unintended activation during ordinary conversation, which could cause the skill to read context or begin orchestration workflows without sufficiently explicit user intent.
The README describes persistent storage of 'Wisdom' derived from tasks in shared workspace memory without a user-facing warning about retention, reviewability, or sensitive-data handling. In a multi-agent system, accumulated notes can capture confidential project details, mistakes, conventions, or operational insights and then be automatically reinjected into future tasks, amplifying the privacy and data leakage risk across sessions and agents.
Without declared permissions the skill's intent is opaque and cannot be validated.