← 返回 Skills 市场
362
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install context-cleanup
功能描述
Analyze and archive low-value memory notes in OpenClaw workspace to reduce context bloat and improve responsiveness. 适用于上下文冗余、维护整理场景;默认流程为 analyze → plan → c...
使用说明 (SKILL.md)
Context Cleanup
用于整理 workspace 的 memory 日志,降低冗余上下文负担。
关键资源
- 脚本:
cleanup.sh - 策略:
references/policy.md
标准流程(必须)
- 分析现状
./skills/context-cleanup/cleanup.sh analyze
- 生成计划(不执行)
./skills/context-cleanup/cleanup.sh plan
- 用户确认后执行归档
./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
执行规则
- 默认归档,不做永久删除
- 先
plan后archive - 归档前必须获得用户确认(除非用户明确同意
--yes) - 不处理
MEMORY.md、specs/、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
安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install context-cleanup - 安装完成后,直接呼叫该 Skill 的名称或使用
/context-cleanup触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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
元数据
常见问题
Context Cleanup 是什么?
Analyze and archive low-value memory notes in OpenClaw workspace to reduce context bloat and improve responsiveness. 适用于上下文冗余、维护整理场景;默认流程为 analyze → plan → c... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 362 次。
如何安装 Context Cleanup?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install context-cleanup」即可一键安装,无需额外配置。
Context Cleanup 是免费的吗?
是的,Context Cleanup 完全免费(开源免费),可自由下载、安装和使用。
Context Cleanup 支持哪些平台?
Context Cleanup 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Context Cleanup?
由 irideas(@irideas)开发并维护,当前版本 v0.3.0。
推荐 Skills