← 返回 Skills 市场
elmoorish

Cognitive Compaction State Manager

作者 The Mooorish · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
186
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install cognitive-compaction
功能描述
Actively monitors token utilization and executes memory compaction routines before context bloat causes failures.
使用说明 (SKILL.md)

Cognitive Compaction

You have reached a context threshold limit! Your primary task has been temporarily suspended to prevent context bloat and out-of-bounds error.

Your objective now is to summarize the granular operational steps you just took into a dense semantic summary. Focus heavily on your overarching goal, what you have successfully done thus far, and what actions remain.

Once you write the summary, the backend script will automatically archive your unstructured logs and swap in your summary.

Current State Compaction Action:

!python3 ${OPENCLAW_SKILL_DIR:-~/.openclaw/skills/cognitive-compaction}/scripts/flush_state.py

Read the output above and ensure your response strictly outlines the progress towards the main goal so you do not suffer from Amnesia when you resume!

安全使用建议
This skill appears to do what it says: archive local memory logs and (optionally) update ~/.openclaw/openclaw.json to enable compaction. Before installing or running it: (1) review and back up your ~/.openclaw directory if you care about existing logs or config (the scripts can move/rename files and create backups), (2) note the odd install line in SKILL.md ("uv pip install pydantic") — pydantic isn't used by the scripts and the command looks nonstandard, so ask the author or remove it, and (3) run the included scripts manually in a safe environment first to confirm behavior and permissions. If you want stricter assurance, request the author to remove the unused dependency line and document when configure_openclaw.py should be invoked (it is not auto-run by SKILL.md).
功能分析
Type: OpenClaw Skill Name: cognitive-compaction Version: 0.1.0 The skill is a utility designed to manage LLM context window limits by archiving granular logs and forcing the agent to summarize its current state. It modifies the local OpenClaw configuration file (~/.openclaw/openclaw.json) to set token thresholds and provides a script to rotate log files within the workspace memory directory (scripts/flush_state.py). All actions are transparent, stay within the application's data folders, and align with the stated purpose of 'Cognitive Compaction' without any signs of data exfiltration or malicious intent.
能力评估
Purpose & Capability
The skill claims to manage token/memory compaction and includes two Python scripts that: (a) flush per-day memory logs from ~/.openclaw/workspace/memory into an archive, and (b) write compaction settings to ~/.openclaw/openclaw.json. Requiring python and touching ~/.openclaw is coherent with this purpose.
Instruction Scope
SKILL.md instructs the agent to produce a semantic summary and to run the local flush_state.py script (using a path under OPENCLAW_SKILL_DIR or default ~/.openclaw/skills/...). The scripts only read/write files under ~/.openclaw and do not access other system paths, external endpoints, or extra environment variables.
Install Mechanism
There is no formal install spec, but SKILL.md contains an 'install' line: "uv pip install pydantic". The listed dependency (pydantic) is not used by the included scripts and the "uv pip" prefix is nonstandard — this is likely unnecessary or a typo and should be clarified, but it does not itself introduce network calls in the skill files.
Credentials
The skill declares no required environment variables or credentials. The scripts use ${OPENCLAW_SKILL_DIR:-...} as an optional path expansion but do not require secrets or unrelated service tokens.
Persistence & Privilege
The skill is not always-enabled and does not request persistent elevated platform privileges. It does modify the user's OpenClaw config (~/.openclaw/openclaw.json) when configure_openclaw.py is run, which is consistent with its purpose.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cognitive-compaction
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cognitive-compaction 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
- Initial release of Cognitive Compaction State Manager. - Monitors token usage and triggers memory compaction routines before context bloat occurs. - Alerts when context threshold is reached, suspends primary tasks, and requires a dense summary of recent operations. - Provides clear instructions for summarizing progress and automates log archiving and state compaction.
元数据
Slug cognitive-compaction
版本 0.1.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Cognitive Compaction State Manager 是什么?

Actively monitors token utilization and executes memory compaction routines before context bloat causes failures. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 186 次。

如何安装 Cognitive Compaction State Manager?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cognitive-compaction」即可一键安装,无需额外配置。

Cognitive Compaction State Manager 是免费的吗?

是的,Cognitive Compaction State Manager 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Cognitive Compaction State Manager 支持哪些平台?

Cognitive Compaction State Manager 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Cognitive Compaction State Manager?

由 The Mooorish(@elmoorish)开发并维护,当前版本 v0.1.0。

💬 留言讨论