skill_install

WarnAudited by ClawScan on May 10, 2026.

Overview

This is a coherent skill installer, but its ZIP handling and validation are too weak for a tool that persistently changes OpenClaw’s installed skills and restarts the Gateway.

Only use this installer with ZIP files you already trust and have reviewed. Before installing, inspect the package’s SKILL.md, _meta.json, and any scripts, and expect the Gateway to restart so the new skill becomes active immediately. The installer should be fixed to sanitize paths, verify package metadata/provenance, and add clearer confirmation before persistent changes.

Findings (4)

Artifact-based informational review of SKILL.md, metadata, install specs, static scan signals, and capability signals. ClawScan does not execute the skill or run runtime probes.

What this means

A crafted skill package could cause the installer to write files, or after confirmation delete files, outside the intended skills folder if the user runs it with sufficient permissions.

Why it was flagged

The target install path is built from a skill name read from the ZIP’s SKILL.md without shown sanitization or a check that the resolved path stays under the OpenClaw skills directory; the code then removes or copies directories at that path.

Skill content
skill_name = line.split(':', 1)[1].strip()
...
target_dir = os.path.join(self.skills_dir, skill_name)
...
shutil.rmtree(target_dir)
...
shutil.copytree(skill_source, target_dir)
Recommendation

Reject absolute paths and path traversal in skill names, resolve the final path with realpath, require it to remain inside the skills directory, and only delete/copy after showing a safe normalized destination.

What this means

A local ZIP that merely looks structurally valid could add persistent agent instructions or executable helper files to OpenClaw.

Why it was flagged

The shown validation only requires SKILL.md to exist and start with frontmatter; it does not verify provenance, signatures, checksums, _meta.json, or the safety of included scripts before installing the skill.

Skill content
def validate_skill_structure(self, skill_path: str) -> Tuple[bool, str]:
    ...
    skill_md = os.path.join(skill_path, "SKILL.md")
    if not os.path.exists(skill_md):
        return False, "缺少 SKILL.md 文件"
    ...
    if not content.startswith('---'):
        return False, "SKILL.md 格式错误: 必须以 --- 开头"
Recommendation

Install only reviewed and trusted ZIPs. The installer should verify _meta.json, constrain accepted package structure, check provenance or signatures when available, and present a permission/content summary before installation.

What this means

Any mistake or unsafe content in an installed ZIP can affect the running OpenClaw environment right away.

Why it was flagged

After copying the skill into the OpenClaw skills directory, the script restarts the Gateway, making the new skill available immediately.

Skill content
shutil.copytree(skill_source, target_dir)
...
subprocess.run(
    ["openclaw", "daemon", "restart"],
Recommendation

Review the ZIP contents before installing, consider adding an explicit final confirmation before Gateway restart, and keep a rollback path for removing the installed skill.

What this means

Users may trust the installer to reject incomplete or suspicious skill packages when the shown checks are much narrower.

Why it was flagged

The documentation claims _meta.json validation, but the provided validator code only shows a SKILL.md existence/frontmatter check, which can mislead users about the strength of safety validation.

Skill content
- **Validation**: Validates skill structure (SKILL.md, _meta.json)
...
- Verify SKILL.md and _meta.json exist
Recommendation

Align the documentation with the actual checks, or implement the promised _meta.json and package validation before advertising it as safety validation.