ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 5/5

context-clean-up

Use when: you suspect OpenClaw prompt context is bloating (slow replies, high cost, repeated transcript noise) and you want a ranked offender list + a reversible clean-up plan. Don’t use when: you want the assistant to apply fixes automatically, or you’re asking for unrelated troubleshooting. Output: an audit summary + 3–8 concrete fix steps + rollback notes (no automatic changes).

Why use this skill?

Audit your OpenClaw context window to reduce bloat, lower token costs, and fix agent sluggishness with a safe, reversible cleanup plan.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/phenomenoner/context-clean-up
Or

What This Skill Does

The context-clean-up skill is a specialized diagnostic runbook designed to optimize your OpenClaw agent’s performance. When an agent’s context window becomes bloated, you may notice increased latency, higher token costs, or irrelevant responses caused by noise in the transcript. This skill performs a deep-dive audit of your workspace and state directory to identify the primary drivers of bloat—such as excessive tool result dumps, repetitive automation heartbeats, overgrown system files, or un-pruned historical summaries. Crucially, the tool is strictly audit-only. It provides an actionable, ranked offender list and a detailed, reversible plan of action. It will never modify your files or configurations automatically; instead, it provides the precise patches required, ensuring you maintain full control over your environment.

Installation

You can install the skill directly from the OpenClaw repository using the command-line interface. Simply execute the following command in your terminal:

clawhub install openclaw/skills/skills/phenomenoner/context-clean-up

Ensure you have Python 3 installed, as the internal audit script relies on a local execution check of your workspace and OpenClaw state directories to generate the JSON report.

Use Cases

Use this skill when you observe the following:

  • Your agent has become noticeably sluggish or is 'forgetting' earlier parts of the conversation.
  • You suspect logs or large data files (like lockfiles or long JSON outputs) are constantly being re-ingested into the prompt.
  • The agent is recycling redundant information from long-running automation or cron-job reports.
  • You want to lower your monthly token usage without manually sifting through thousands of lines of context.

Example Prompts

  1. "I've noticed OpenClaw is getting slower during our long sessions; can you run the context cleanup audit to identify what's eating up my prompt space?"
  2. "My agent is repeating old info from my memory files. Please run the context-clean-up skill and give me a plan to trim the bloat."
  3. "Run a context audit on my current project workspace and show me which tool outputs are the biggest offenders so I can clear them out."

Tips & Limitations

The most common mistake is attempting to use this for automated cleanup. Remember: it is an audit tool. It will produce a JSON file containing the report and a set of patch files. You must apply these patches yourself. If the agent is unresponsive, verify your state directory path (default is ~/.openclaw), as incorrect pathing will prevent the script from reading session logs. This skill is not for debugging specific application logic bugs; it is strictly for performance and context management.

Metadata

Stars1217
Views2
Updated2026-02-20
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-phenomenoner-context-clean-up": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#optimization#token-management#audit#performance#maintenance
Safety Score: 5/5

Flags: file-read, code-execution