Back to skill

Security audit

Claude Code ↔ OpenClaw Skill Sync

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real skill-sync tool, but it can persist unreviewed skill instructions into active agent skill folders.

Install only if you intentionally want this agent to read both skill folders and copy skills between them. Review source skills yourself before syncing, avoid using bulk 'all' for unknown skills, and be cautious because copied SKILL.md files can affect future agent sessions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:78
Finding

Unvalidated Propagation of Persistent Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 78-91, 99-103, and 122-133
Vulnerability Type: Persistent propagation of untrusted agent instructions
Risk Level: Medium

Vulnerable Code

SKILL.md, lines 78-91:

markdown
**To copy a Claude Code skill to OpenClaw:**

1. Read the `version` field from the `SKILL.md` frontmatter. If absent, use `1.0.0`.
2. Create directory `~/.openclaw/workspace/skills/{name}/`
3. Write the full `SKILL.md` content to `~/.openclaw/workspace/skills/{name}/SKILL.md` as-is.
4. Write `~/.openclaw/workspace/skills/{name}/_meta.json`:

```json
{
  "slug": "{name}",
  "version": "{version}"
}
text

`SKILL.md`, lines 99-103:

```markdown
**To copy an OpenClaw skill to Claude Code:**

1. Create directory `~/.claude/skills/{name}/`
2. Write the full `SKILL.md` content to `~/.claude/skills/{name}/SKILL.md` as-is.
   Do not copy `_meta.json` — it is OpenClaw-specific.

SKILL.md, lines 122-133:

markdown
Apply the user's choice:

- **Choice 1** → overwrite `~/.openclaw/workspace/skills/{name}/SKILL.md` with the Claude Code content.
  Update `~/.openclaw/workspace/skills/{name}/_meta.json` version to match the frontmatter of the winning file. If `_meta.json` does not exist, create it.
- **Choice 2** → overwrite `~/.claude/skills/{name}/SKILL.md` with the OpenClaw content.
  No changes to `_meta.json` — it is OpenClaw-specific and remains as-is.
- **Choice 3** → do nothing for this skill.

Technical Analysis

The skill instructs the agent to copy complete SKILL.md files verbatim between two persistent agent skill stores. It does not require validation of the source file for prompt injection, instruction overrides, encoded payloads, sensitive-file access directives, command execution instructions, or other unsafe behavior before activating the copied skill.

User confirmation provides only partial mitigation. For a skill that ...[truncated 2425 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat every source SKILL.md as untrusted until it has passed a security review.
  2. Scan the complete file before copying it. Detect and flag instruction overrides, safety-bypass requests, credential access, sensitive-file collection, encoded or obfuscated content, persistence directives, external payload retrieval, and shell or tool execution.
  3. Display a sanitized full diff for conflicts rather than only the first five body lines. If full display is impractical, provide an explicit security summary covering the entire file and identify every flagged line.
  4. For one-sided skills, show the complete sanitized content or a full diff against an empty destination before requesting approval; a skill name alone is insufficient for informed consent.
  5. Copy newly discovered skills into a quarantine or staging directory first. Require a separate trust decision before moving them into an active skill directory.
  6. Require explicit confirmation for each security-sensitive finding even when the user selected all; bulk approval should not bypass warnings.
  7. Validate skill names and resolved destination paths to ensure writes remain within the intended skill directories.
  8. Maintain a synchronization audit log containing source, destination, content hash, timestamp, user decision, and scanner result, while excluding credentials and other sensitive content.
  9. Consider an allowlist of trusted skill hashes or signed skill packages so unexpected modifications require reapproval.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% 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 · SKILL.md (reported line 28)May include surrounding context.

md
## Steps

### 1. Scan Claude Code Skills

List all immediate subdirectories (one level deep, not recursive) under `~/.claude/skills/` that contain a `SKILL.md` file.
Record the name (directory name) and read the full content of each `SKILL.md`.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
- `y` → copy this skill
- `n` → skip this skill
- `all` → copy all remaining category A skills without asking again
- `skip-all` → skip all remaining category A skills (applies to this category only — you will still be prompted for categories B and D)

**To copy a Claude Code skill to OpenClaw:**

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
- `y` → copy this skill
- `n` → skip this skill
- `all` → copy all remaining category A skills without asking again
- `skip-all` → skip all remaining category A skills (applies to this category only — you will still be prompted for categories B and D)

**To copy a Claude Code skill to OpenClaw:**

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The skill instructs the agent to create and overwrite persistent files under the user's skill directories based on scanned content, including writing SKILL.md content 'as-is'. Because skill content is treated as data but later becomes executable instruction material for future agent runs, this creates a persistence and propagation risk: a malicious or unsafe skill present on one side can be copied into the other environment and remain active across sessions.

Content

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

md
**To copy a Claude Code skill to OpenClaw:**

1. Read the `version` field from the `SKILL.md` frontmatter. If absent, use `1.0.0`.
2. Create directory `~/.openclaw/workspace/skills/{name}/`
3. Write the full `SKILL.md` content to `~/.openclaw/workspace/skills/{name}/SKILL.md` as-is.
4. Write `~/.openclaw/workspace/skills/{name}/_meta.json`:

Static analysis

No suspicious patterns detected.