Auto Optimizer

Security checks across static analysis, malware telemetry, and agentic risk

Overview

Auto Optimizer is purpose-aligned as a performance tool, but it can automatically rewrite local skill code and persist metrics/backups without clear path limits, review gates, or reliable advertised safety controls.

Before using this skill, treat it as a tool that may edit local skill source code. Use version control or separate backups, run only on a test copy first, restrict the target path to the specific skill you intend to optimize, and do not rely on dry-run or rollback unless you have verified those features work in the supplied code.

Static analysis

No static analysis findings were reported for this release.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Risk analysis

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 mistaken or overly broad path could cause the agent to modify local skill source files and change future agent behavior.

Why it was flagged

The applier backs up and rewrites files under a caller-supplied skillPath, but the supplied code does not show path validation, allowlisting to OpenClaw skill directories, user confirmation, or a dry-run default before changing source code.

Skill content
this.createBackup(skillPath); ... const indexPath = path.join(skillPath, 'src', 'index.js'); ... fs.writeFileSync(indexPath, content);
Recommendation

Require explicit user approval before writes, default to dry-run, validate that skillPath is inside an intended OpenClaw skills directory, show a diff before applying, and make rollback tested and reliable.

What this means

Incorrect performance analysis could lead to automatic edits that break or alter skills beyond the immediate run.

Why it was flagged

The full optimization flow automatically turns analysis results into an applied plan, so a bad metric, bad recommendation, or buggy optimizer can propagate into persistent code changes without a visible containment step.

Skill content
const plan = this.optimizer.generateOptimizationPlan(analysis); ... const application = await this.applyPlan(plan, context);
Recommendation

Separate analysis from application, require a human-reviewed diff for each change, limit each run to one explicitly selected skill, and provide an easy verified rollback path.

What this means

A user may believe they can safely preview or undo optimizations when the supplied implementation does not clearly support those protections.

Why it was flagged

The documentation presents dry-run and rollback as safety controls, but the supplied applier implementation shown primarily creates backups and writes files directly, with no visible dryRun handling or rollback method. Users may rely on safeguards that are not evidenced by the provided code.

Skill content
const applier = new OptimizationApplier({ dryRun: true }); ... applier.setDryRun(true); ... applier.rollback(optimizationId);
Recommendation

Make the documented safety controls real and tested, or remove the claims; clearly document where backups are stored and how rollback is performed.

What this means

Local metric files may keep operational details for up to 30 days and could influence later optimization choices.

Why it was flagged

The monitor persists performance metric entries locally for later analysis. This is purpose-aligned, but users should know that whatever is placed in metric objects may be retained and reused for optimization decisions.

Skill content
this.metricsPath = options.metricsPath || path.join(process.env.HOME || process.env.USERPROFILE, '.openclaw', 'metrics'); this.retentionDays = options.retentionDays || 30; ... fs.appendFileSync(filePath, JSON.stringify(entry) + '\n');
Recommendation

Avoid storing secrets or sensitive payloads in metrics, document the retention behavior, sanitize metric filenames/skill names, and provide a cleanup option.