ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

defragmenter

Structural knowledge defragmentation for OpenClaw workspaces. Finds information, rules, and operational facts that are spread across the wrong files or embedded in the wrong layer, then rewrites them into the proper files without deleting source material. Use when the workspace feels fragmented, logic is embedded in cron/jobs instead of flow files, preferences are scattered, or facts exist but are not assembled into one coherent working structure.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/balukov/defragmenter
Or

Defragmenter

defragmenter is a structural reorganization skill for OpenClaw workspaces.

It does not behave like a cleaner, trash collector, or memory compressor. It does not delete information.

Its job is to find knowledge that already exists, but is fragmented across the wrong places, and reassemble it into the correct structural locations.

What It Does

Defragmenter looks for situations like:

  • logic living inside a cron message instead of a flow file
  • operational facts existing in chat or notes but not in CONTAINER_STATE.md
  • preferences mentioned in conversation but not recorded in the right preference file
  • workflow rules spread across multiple files without a clear source of truth
  • facts that exist, but are not assembled into one coherent working structure

Then, after user confirmation, it:

  • copies or rewrites that knowledge into the proper file (from the Allowed Targets list only)
  • preserves the existing information rather than deleting it
  • makes the workspace more structurally coherent

Core Principle

Reorganize, not destroy.

Defragmenter may:

  • move logic to the correct file
  • duplicate essential context into the correct source-of-truth file
  • rewrite instructions into a cleaner structure
  • connect fragmented pieces of working knowledge

Defragmenter does not:

  • delete source material by default
  • prune history
  • compress memory for brevity
  • behave like a cleanup/trash skill

Typical Use Cases

Use this skill when:

  • the workspace feels architecturally messy
  • the right information exists, but in the wrong place
  • a workflow is half in chat, half in cron, half in files
  • operational state has drifted away from documentation
  • multiple files describe the same process, but no file is the clear source of truth

Examples

Example 1: Cron logic is too smart

A cron message contains detailed workflow logic.

Defragmenter should:

  • extract that logic into a flow file
  • reduce the cron to a simple trigger
  • preserve the intent without deleting history

Example 2: Operational facts are stranded

A container repair decision exists in chat or daily notes, but not in CONTAINER_STATE.md.

Defragmenter should:

  • rewrite the important fact into CONTAINER_STATE.md
  • add or update restore instructions if appropriate

Example 3: Preferences are scattered

Food, browser, or workflow preferences exist in conversation history but not in their proper file.

Defragmenter should:

  • gather them into the correct preference/source-of-truth file

Allowed Targets

Defragmenter may only reorganize knowledge into files within the current workspace that match these patterns:

  • MEMORY.md
  • memory/*.md
  • CONTAINER_STATE.md
  • flows/*.md
  • preference files within the current workspace root

Defragmenter must not modify:

  • Any file under skills/ or any SKILL.md file (including its own)
  • Shell scripts, executables,...

Metadata

Author@balukov
Stars4473
Views0
Updated2026-05-01
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-balukov-defragmenter": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.