🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Workspace Organization - Automated Health Checks

by @donovanpankratz-del

Automated workspace health checks and entropy prevention for OpenClaw. Detects broken symlinks, empty dirs, large files, malformed names. Maintenance audit s...

⚑ When to Use
TriggerAction
- **Periodic maintenance** β€” Weekly/monthly health checks (cron recommended)
- **Pre-deployment cleanup** β€” Remove cruft before backups
- **Debugging workspace issues** β€” Find broken symlinks, malformed names
- **Disk space review** β€” Identify large files and bloat
πŸ’‘ Examples

Manual Audit

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 ===

Agent-Driven Audit

Ask your agent:

"Run workspace maintenance audit"
"Check workspace health"
"Audit my workspace"

Agent will execute script and present findings with cleanup recommendations.

βš™οΈ Configuration

1. Install skill:

cd ~/.openclaw/workspace/skills
clawhub install workspace-organization

Or: download from ClawHub and extract

2. Initialize workspace (optional, if starting fresh):

cd ~/.openclaw/workspace/skills/workspace-organization
./setup.sh

3. Run first audit:

cd ~/.openclaw/workspace/skills/workspace-organization
./maintenance-audit.sh

4. Schedule automated audits (recommended):

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"

πŸ“‹ Tips & Best Practices

"Script fails on macOS"

  • Install GNU findutils: brew install findutils
  • Use gfind instead of find
  • "Too many empty directories flagged"

  • Exclude more dirs in script (e.g., .cache, .venv)
  • "Large files are necessary"

  • Document in notes/workspace-notes.md why they're kept
  • Consider moving to external storage (S3, NAS)
  • View on ClawHub
    TERMINAL
    clawhub install workspace-organization

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’