Back to skill

Security audit

Skill to Agent Converter: Convert a Skill into an OpenClaw Agent

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent, but its documentation includes persistent agent/config changes plus risky examples that could expose session keys or delete agent data.

Install only if you are comfortable with a skill that helps create persistent agents, modify OpenClaw agent configuration, and spawn sessions. Before following examples, use a test workspace, avoid raw config patches unless you have reviewed the full agents.list impact, do not store session keys in plaintext, keep agent and memory files private with restrictive permissions, and replace rm -rf cleanup examples with preview-and-quarantine or backup-based procedures.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
references/war-room-example.md:623
Finding

Predictable Temporary JavaScript File Enables Symlink and Race Attacks

Content
View full analysis
"$TEMP_FILE" echo "💻 Executing spawn script..." node "$TEMP_FILE" # Cleanup rm "$TEMP_FILE" ``` ### Technical Analysis The deployment example creates executable JavaScript under `/tmp` using a predictable filename derived from the shell process ID. It neither creates the file atomically nor verifies that the destination is a regular file owned by the current user. Shared temporary directories are normally writable by all local users. An attacker who predicts or observes the process ID can pre-create the path as a symbolic link. The subsequent shell redirection follows that link and overwrites its target with the generated JavaScript. There is also a time-of-check/time-of-use window between writing the file and executing it with Node, allowing another local process to attempt substitution or modification. The temporary file is not created with explicit restrictive permissions. Cleanup is also not protected by a trap, so interruption can leave generated configuration and task instructions in `/tmp`. ### Attack Path 1. A local attacker monitors processes or predicts the victim shell's process ID. 2. The attacker creates `/tmp/spawn-war-room-PID.js` as a symbolic link to a file writable by the victim, or prepares to race replacement of the path. 3. The victim runs the documented deployment script. 4. `echo "$SPAWN_SCRIPT" > "$TEMP_FILE"` follows the attacker-controlled link and overwrites the target. 5. Alternatively, the attacker replaces or modifies the temporary JavaScript before `node "$TEMP_FILE"` executes. 6. If replacement succeeds, attacker-controlled JavaSc ...[truncated 599 chars]
Remediation
View remediation
"$TEMP_FILE" chmod 600 "$TEMP_FILE" node "$TEMP_FILE" ``` - Use exclusive file creation and reject symbolic links where supported. - Do not interpolate configuration directly into executable JavaScript. Parse configuration as JSON and validate its schema. - Ensure cleanup runs on normal exit, errors, and signals. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/war-room-example.md:588
Finding

Session Credentials Are Persisted in Plaintext Without Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/troubleshooting.md:344
Finding

Troubleshooting Instructions Make Confidential Agent Memory World-Readable

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/usage-guide.md:323
Finding

Age-Based Recursive Cleanup Can Delete Active Agent Workspaces and Memory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (46)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This duplicate finding flags the same recursive deletion command under a broader pattern match. The command is still dangerous because it normalizes irreversible deletion in support documentation and can be misapplied to the wrong path.

Content

Scanner excerpt · references/troubleshooting.md (reported line 623)May include surrounding context.

Procedure A: Clean Up Partial Creation

bash
# Remove partially created agent
rm -rf ~/.openclaw/agents/failed-agent

# Restore from backup if exists
if [ -d ~/.openclaw/agents/failed-agent.backup ]; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This duplicate finding flags the same recursive deletion command under a broader pattern match. The command is still dangerous because it normalizes irreversible deletion in support documentation and can be misapplied to the wrong path.

Content

Scanner excerpt · references/troubleshooting.md (reported line 623)May include surrounding context.

Procedure A: Clean Up Partial Creation

bash
# Remove partially created agent
rm -rf ~/.openclaw/agents/failed-agent

# Restore from backup if exists
if [ -d ~/.openclaw/agents/failed-agent.backup ]; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This duplicate finding points to the same rm -rf command in the restart procedure. The underlying issue remains: unsafe destructive command guidance in a high copy-paste context.

Content

Scanner excerpt · references/troubleshooting.md (reported line 644)May include surrounding context.

Procedure C: Start Fresh

bash
# Complete cleanup and restart
rm -rf ~/.openclaw/agents/problem-agent
node skill_to_agent.js --skill original-skill --agent problem-agent --force

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This duplicate finding points to the same rm -rf command in the restart procedure. The underlying issue remains: unsafe destructive command guidance in a high copy-paste context.

Content

Scanner excerpt · references/troubleshooting.md (reported line 644)May include surrounding context.

Procedure C: Start Fresh

bash
# Complete cleanup and restart
rm -rf ~/.openclaw/agents/problem-agent
node skill_to_agent.js --skill original-skill --agent problem-agent --force

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/usage-guide.md (reported line 192)May include surrounding context.

md
# Set workspace location
export OPENCLAW_AGENTS_DIR=/custom/path/agents

# Enable debug mode
export SKILL_TO_AGENT_DEBUG=true

# Set default runtime

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The instruction to create an agent directory in ~/.openclaw/agents/ establishes persistent local state in a hidden home-directory location. Even though persistence is part of the feature, doing so without an explicit warning or lifecycle guidance can enable lingering agents, stored memory, and configuration artifacts that survive beyond the immediate task and expand the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 13)May include surrounding context.

md
## Quick Start

1. **Analyze skill** - Read SKILL.md to understand requirements
2. **Prepare workspace** - Create agent directory in `~/.openclaw/agents/`
3. **Configure agent** - Set up identity, tools, and memory strategy
4. **Spawn with correct binding** - Choose appropriate mode based on channel

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill directs users to create agent workspaces under ~/.openclaw/agents/ and to configure identity, tools, and memory, but it does not clearly warn that these actions persist files and may alter local agent behavior. In a security-sensitive automation context, undocumented filesystem and configuration changes can lead to unintended persistence, privilege misuse, or difficult-to-audit modifications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs use of gateway config.patch to modify agents.list and states that the gateway will restart automatically, but it does not warn that this changes system configuration and may interrupt running services. That omission increases operational risk because users may apply changes without understanding service impact, rollback requirements, or the trust implications of registering a new agent.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 104)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 107)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 171)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 216)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 217)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 335)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 345)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 455)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 458)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 528)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/troubleshooting.md (reported line 549)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/usage-guide.md (reported line 211)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/usage-guide.md (reported line 229)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/usage-guide.md (reported line 307)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · references/war-room-example.md (reported line 655)May include surrounding context.

Solution B: Check Skill Installation

bash
# List installed skills
ls -la ~/.openclaw/skills/

# Check if skill has SKILL.md
ls -la ~/.openclaw/skills/war-room-1.1.0/

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · references/troubleshooting.md (reported line 119)May include surrounding context.

git clone https://github.com/openclaw/skills/war-room.git ~/.openclaw/skills/war-room

text

**Solution D: Create Minimal SKILL.md**
```bash
# If skill exists but lacks SKILL.md, create one
cat > ~/.openclaw/skills/your-skill/SKILL.md << 'EOF'

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/troubleshooting.md (reported line 122)May include surrounding context.

Solution D: Create Minimal SKILL.md

bash
# If skill exists but lacks SKILL.md, create one
cat > ~/.openclaw/skills/your-skill/SKILL.md << 'EOF'
---
name: "your-skill"
description: "Description of your skill"