Defragmenter for Openclaw

A specialized tool for reorganizing fragmented knowledge, rules, and operational facts into their proper architectural locations within an AI workspace.

balukov
v1.0.1
Apr 9, 2026
1
817
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install defragmenter

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install defragmenter using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Defragmenter?

Defragmenter is a powerful structural reorganization skill designed specifically for Openclaw Skills environments. Unlike standard cleanup tools that delete data, this skill focuses on architectural integrity by identifying knowledge—such as logic, operational facts, and user preferences—that has become scattered across suboptimal locations like chat histories or cron messages.

By reassembling this information into dedicated source-of-truth files like MEMORY.md or flow definitions, Defragmenter ensures your workspace remains coherent and efficient. It operates on the principle of reorganization without destruction, meaning it preserves your history while elevating essential context to the correct structural layer, making it an essential utility for maintaining high-performance Openclaw Skills.

Defragmenter Use Cases

  • The workspace feels architecturally messy or disorganized.
  • Operational facts are stranded in chat history instead of CONTAINER_STATE.md.
  • Workflow logic is embedded directly in cron triggers rather than flow files.
  • User preferences are mentioned across various conversations but lack a central file.
  • Multiple files describe the same process without a clear source of truth.

How Defragmenter Works

  1. The skill performs a read-only scan of the workspace to identify fragmented information and knowledge gaps.
  2. It generates a detailed dry-run structural report proposing specific moves and copies to the user.
  3. The user reviews the proposed changes to ensure architectural alignment with their Openclaw Skills workspace requirements.
  4. Upon explicit approval, the skill rewrites the knowledge into the designated Allowed Targets.
  5. A final confirmation report is issued, verifying that information was reorganized without deleting the original source material.

Defragmenter Setup

To enable this skill within your local environment, ensure the directory is recognized by your agent and the files are placed in the correct skill path.

# Navigate to your workspace skills directory
cd path/to/your/workspace/skills/

# Create the defragmenter directory and sync the SKILL.md
mkdir -p defragmenter
cp /path/to/source/SKILL.md ./defragmenter/

Defragmenter Data Schema & Taxonomy

File Pattern Purpose within Openclaw Skills
MEMORY.md Primary long-term knowledge and architectural storage.
memory/*.md Specialized context and historical records for specific domains.
CONTAINER_STATE.md Current operational facts and container repair instructions.
flows/*.md Structured workflow logic and step-by-step procedural rules.
*.md (preferences) User-specific settings and workspace behavior rules.

Defragmenter Advanced Features

  • Non-destructive reorganization: Ensures no data is lost during the defragmentation process by copying instead of moving.
  • Dry-run validation: Mandatory reporting phase before any file modifications occur to ensure human-in-the-loop safety.
  • Targeted rewriting: Specifically constrained to modify only designated source-of-truth files while protecting system configurations.
  • Multi-layer analysis: Identifies knowledge gaps between conversational state and persistent workspace documentation.
  • Structural coherence: Prioritizes the creation of clear sources of truth over simple text brevity for better Openclaw Skills performance.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*