← Back to Skills Marketplace
elmoorish

Cognitive Compaction State Manager

by The Mooorish · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ Security Clean
186
Downloads
1
Stars
1
Active Installs
1
Versions
Install in OpenClaw
/install cognitive-compaction
Description
Actively monitors token utilization and executes memory compaction routines before context bloat causes failures.
README (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!

Usage Guidance
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).
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cognitive-compaction
  3. After installation, invoke the skill by name or use /cognitive-compaction
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug cognitive-compaction
Version 0.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 1
Frequently Asked Questions

What is Cognitive Compaction State Manager?

Actively monitors token utilization and executes memory compaction routines before context bloat causes failures. It is an AI Agent Skill for Claude Code / OpenClaw, with 186 downloads so far.

How do I install Cognitive Compaction State Manager?

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

Is Cognitive Compaction State Manager free?

Yes, Cognitive Compaction State Manager is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Cognitive Compaction State Manager support?

Cognitive Compaction State Manager is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Cognitive Compaction State Manager?

It is built and maintained by The Mooorish (@elmoorish); the current version is v0.1.0.

💬 Comments