Install
openclaw skills install workspace-organizationAutomated workspace health checks and entropy prevention for OpenClaw. Detects broken symlinks, empty dirs, large files, malformed names. Maintenance audit script with cron support. Keeps deployments clean and structured.
openclaw skills install workspace-organizationStandards and automated maintenance for clean OpenClaw deployments.
SKILL.md — Agent instructionsREADME.md — Setup guidemaintenance-audit.sh — Run to audit workspace healthsetup.sh — Run once to initialize standard structureNote: Scripts auto-detect your workspace. Pass a path as argument to override: ./maintenance-audit.sh /custom/path
Workspaces degrade over time:
This skill provides automated audits + cleanup guidance to prevent entropy.
Automated health check script that detects:
Initializes standard workspace structure:
~/.openclaw/workspace/
├── projects/ # Active work
│ ├── writing/ # Writing projects
│ └── code/ # Code projects
├── notes/ # Organized notes
│ ├── daily-reviews/
│ ├── decisions/
│ └── cost-tracking.md
├── memory/ # Long-term memory
│ ├── owner/ # Cross-channel user memory
│ └── sessions/ # Per-session isolated memory
├── skills/ # Custom skills
├── subagents/ # Permanent specialists
│ └── _archived/ # Old/deprecated subagents
├── docs/ # Documentation
└── scripts/ # Utility scripts
Best practices for:
cd ~/.openclaw/workspace/skills
clawhub install workspace-organization
# Or: download from ClawHub and extract
cd ~/.openclaw/workspace/skills/workspace-organization
./setup.sh
cd ~/.openclaw/workspace/skills/workspace-organization
./maintenance-audit.sh
openclaw cron add \
--name "Weekly Workspace Audit" \
--schedule "0 4 * * 0" \
--task "Run workspace maintenance audit: bash skills/workspace-organization/maintenance-audit.sh. Log results to notes/maintenance-log.md"
cd ~/.openclaw/workspace/skills/workspace-organization
./maintenance-audit.sh
Example output:
=== Workspace Maintenance Audit ===
Date: 2026-02-21 16:00
Path: /home/user/.openclaw/workspace
1. Checking for broken symlinks...
⚠️ Found broken symlinks:
/home/user/.openclaw/workspace/old-project/link-to-deleted
2. Checking for empty directories...
ℹ️ Found empty directories:
/home/user/.openclaw/workspace/projects/abandoned
3. Checking for large files (>10MB)...
ℹ️ Found large files:
24M /home/user/.openclaw/workspace/logs/debug.log
4. Checking for malformed file/directory names...
⚠️ Found malformed names:
/home/user/.openclaw/workspace/projects/my project/file.md
5. Disk usage by top-level directory:
150M skills
80M notes
50M projects
30M memory
6. File counts:
Total files: 1,234
Total directories: 156
Skills: 18
Subagents: 3
7. Recently modified files (last 24 hours):
/home/user/.openclaw/workspace/notes/cost-tracking.md
/home/user/.openclaw/workspace/memory/owner/decisions.md
=== Audit Complete ===
Ask your agent:
"Run workspace maintenance audit"
"Check workspace health"
"Audit my workspace"
Agent will execute script and present findings with cleanup recommendations.
Causes:
Fix: Remove symlink or update target
Causes:
Fix: Remove unless intentionally placeholder
Common culprits:
debug.log, error.log).zip, .tar.gz)Fix: Compress, move to external storage, or delete
Problems caused by:
Fix: Rename using kebab-case or snake_case
Example:
# Bad
my project/file (copy).md
# Good
my-project/file-copy.md
After running maintenance-audit.sh, your workspace gets a score:
| Score | Status | Meaning |
|---|---|---|
| 90-100 | 🟢 Healthy | Minor issues or none |
| 70-89 | 🟡 Fair | Some cleanup needed |
| 50-69 | 🟠 Degraded | Multiple issues accumulating |
| <50 | 🔴 Critical | Immediate cleanup required |
Score is calculated based on: broken symlinks (-10 each), empty dirs (-2 each), files >100MB (-5 each), malformed names (-3 each).
| Frequency | Action | Reason |
|---|---|---|
| Daily | None | Too aggressive, creates noise |
| Weekly | Audit only, log results | Catch issues early |
| Monthly | Audit + present to user | Review & approve cleanup |
| On-demand | Before backups/deployments | Reduce backup size |
Edit maintenance-audit.sh:
# Change from 10MB to 50MB
find "$WS" -type f -size +50M 2>/dev/null
Add to script:
find "$WS" -type d -empty 2>/dev/null \
| grep -v "node_modules" \
| grep -v ".git" \
| grep -v "your-custom-dir"
Extend script with:
"Script fails on macOS"
brew install findutilsgfind instead of find"Too many empty directories flagged"
.cache, .venv)"Large files are necessary"
notes/workspace-notes.md why they're keptIf managing multiple OpenClaw instances:
# Audit all workspaces
for ws in ~/.openclaw-*; do
WS="$ws/workspace" ./maintenance-audit.sh
done
Author: OpenClaw Community
License: MIT
Requires: Bash, GNU coreutils (find, du, sort)