← Back to Skills Marketplace
irideas

Context Cleanup

by irideas · GitHub ↗ · v0.3.0
cross-platform ⚠ suspicious
362
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install context-cleanup
Description
Analyze and archive low-value memory notes in OpenClaw workspace to reduce context bloat and improve responsiveness. 适用于上下文冗余、维护整理场景;默认流程为 analyze → plan → c...
README (SKILL.md)

Context Cleanup

用于整理 workspace 的 memory 日志,降低冗余上下文负担。

关键资源

  • 脚本:cleanup.sh
  • 策略:references/policy.md

标准流程(必须)

  1. 分析现状
./skills/context-cleanup/cleanup.sh analyze
  1. 生成计划(不执行)
./skills/context-cleanup/cleanup.sh plan
  1. 用户确认后执行归档
./skills/context-cleanup/cleanup.sh archive

可选参数

# 指定截止日期(早于该日期的记录可归档)
./skills/context-cleanup/cleanup.sh archive 2026-03-01

# 仅预览,不执行
./skills/context-cleanup/cleanup.sh archive --dry-run

# 非交互执行(需谨慎)
./skills/context-cleanup/cleanup.sh archive --yes

# 机器可读输出
./skills/context-cleanup/cleanup.sh analyze --json
./skills/context-cleanup/cleanup.sh plan --json

执行规则

  • 默认归档,不做永久删除
  • planarchive
  • 归档前必须获得用户确认(除非用户明确同意 --yes
  • 不处理 MEMORY.mdspecs/AGENTS.md

输出模板

🧹 上下文清理计划

- Memory 文件:X
- 低价值候选:A
- 归档候选:B

是否按计划执行归档?

发布前自检

./skills/context-cleanup/cleanup.sh analyze
./skills/context-cleanup/cleanup.sh plan
./skills/context-cleanup/cleanup.sh archive --dry-run
Usage Guidance
This skill appears to do what it says: analyze and move low-value Markdown notes into a local archive. Before installing or running it: 1) Inspect cleanup.sh yourself (it moves files with mv when you confirm or use --yes). 2) Run plan and archive --dry-run first to verify candidates. 3) Ensure you have backups of important memory files. 4) Be aware of two inconsistencies: the script calls node for JSON output but node is not declared as a required binary (install node or expect JSON output to fail), and the script respects a WORKSPACE environment variable (undeclared) which can redirect where files are read/moved — avoid running it with an unexpected WORKSPACE value. If you want to proceed, run in dry-run mode and confirm outputs before allowing archive to move files.
Capability Analysis
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.
Capability Assessment
Purpose & Capability
Name/description match the implementation: the script analyzes and moves Markdown files from workspace/memory into an archive directory. The requested single binary (bash) is reasonable for the core logic, but the script also calls node for JSON output — node is not declared as a required binary, which is an inconsistency.
Instruction Scope
SKILL.md limits actions to analyze → plan → archive and documents dry-run and confirmation. The runtime script adheres to that flow and does not perform network I/O or access secrets. It reads memory files and counts lines, plans, and moves files to a local archive directory as documented.
Install Mechanism
Instruction-only skill with an included shell script; no download/install step. This is low-risk from an install mechanism perspective (nothing fetched from remote during install).
Credentials
The script honors an optional WORKSPACE environment variable (WORKSPACE=${WORKSPACE:-...}) but SKILL.md and registry metadata do not document this. That allows changing the directory the script operates on (potentially outside the agent's intended workspace). Also, JSON output uses node -e but node is not declared as required — the skill thus has an undeclared runtime dependency.
Persistence & Privilege
The skill does not request persistent/autonomous privileges (always:false) and does not modify other skills or global agent config. Its actions are limited to local filesystem moves within the targeted workspace.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install context-cleanup
  3. After installation, invoke the skill by name or use /context-cleanup
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.3.0
0.3: English title, bilingual description, metadata.version/updatedAt updated, and improved release-facing wording.
v0.1.0
Initial release: workspace context analysis, smart cleanup suggestions, and safe archiving for OpenClaw memory files
Metadata
Slug context-cleanup
Version 0.3.0
License
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Context Cleanup?

Analyze and archive low-value memory notes in OpenClaw workspace to reduce context bloat and improve responsiveness. 适用于上下文冗余、维护整理场景;默认流程为 analyze → plan → c... It is an AI Agent Skill for Claude Code / OpenClaw, with 362 downloads so far.

How do I install Context Cleanup?

Run "/install context-cleanup" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Context Cleanup free?

Yes, Context Cleanup is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Context Cleanup support?

Context Cleanup is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Context Cleanup?

It is built and maintained by irideas (@irideas); the current version is v0.3.0.

💬 Comments