Context Cleanup

AdvisoryAudited by Static analysis on Apr 30, 2026.

Overview

No suspicious patterns detected.

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.

What this means

Archiving memory notes can change what future sessions remember or retrieve.

Why it was flagged

The skill enumerates Markdown files under the workspace memory directory, so it handles persistent agent memory that may influence future context.

Skill content
collect_files() {
  find "$MEMORY_DIR" -type f -name '*.md' -not -path '*/archive/*' | sort
}
Recommendation

Run analyze and plan first, inspect the listed candidates, and use --dry-run if unsure.

What this means

If --yes is used too quickly, memory files may be archived without a final manual prompt.

Why it was flagged

The script can move selected memory files into an archive directory, and the documented --yes option skips the confirmation prompt.

Skill content
if [[ "$AUTO_YES" -ne 1 ]]; then
    read -r -p "确认归档上述文件? (y/N) " confirm
...
    mv "$file" "$ARCHIVE_DIR/"
Recommendation

Use --yes only after reviewing the plan output, and avoid it for important or unfamiliar workspaces.

What this means

JSON mode may fail or behave unexpectedly in unusual workspace paths; normal non-JSON cleanup does not require this path.

Why it was flagged

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.

Skill content
node -e "console.log(JSON.stringify({mode:'analyze',workspace:'$WORKSPACE',memory:{files:$file_count,lines:$total_lines,archived:$archive_count}
Recommendation

Prefer the normal analyze/plan output unless JSON is needed; maintainers should use safer JSON escaping and declare node if JSON mode remains supported.