Context Cleanup
PassAudited by VirusTotal on May 11, 2026.
Overview
Type: OpenClaw Skill Name: context-cleanup Version: 0.3.0 The skill bundle is a utility designed to manage workspace context by archiving old or low-value markdown files. The core logic in `cleanup.sh` performs local file operations (moving files to a subdirectory), includes safeguards like dry-run modes and user confirmation, and specifically excludes sensitive files like `AGENTS.md`. No evidence of malicious intent, data exfiltration, or unauthorized execution was found.
Findings (0)
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.
Archiving memory notes can change what future sessions remember or retrieve.
The skill enumerates Markdown files under the workspace memory directory, so it handles persistent agent memory that may influence future context.
collect_files() {
find "$MEMORY_DIR" -type f -name '*.md' -not -path '*/archive/*' | sort
}Run analyze and plan first, inspect the listed candidates, and use --dry-run if unsure.
If --yes is used too quickly, memory files may be archived without a final manual prompt.
The script can move selected memory files into an archive directory, and the documented --yes option skips the confirmation prompt.
if [[ "$AUTO_YES" -ne 1 ]]; then
read -r -p "确认归档上述文件? (y/N) " confirm
...
mv "$file" "$ARCHIVE_DIR/"Use --yes only after reviewing the plan output, and avoid it for important or unfamiliar workspaces.
JSON mode may fail or behave unexpectedly in unusual workspace paths; normal non-JSON cleanup does not require this path.
Optional JSON output is produced by constructing JavaScript code with shell-interpolated values. This is purpose-aligned but brittle, especially for unusual paths containing quotes, and node is not declared as a dependency.
node -e "console.log(JSON.stringify({mode:'analyze',workspace:'$WORKSPACE',memory:{files:$file_count,lines:$total_lines,archived:$archive_count}Prefer the normal analyze/plan output unless JSON is needed; maintainers should use safer JSON escaping and declare node if JSON mode remains supported.
