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...
clawhub install workspace-organizationπ About This Skill
name: workspace-organization version: 1.0.0 description: Automated 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. homepage: https://clawhub.com changelog: Initial release - Maintenance audit, setup script, organization standards metadata: openclaw: emoji: "π" requires: bins: ["bash", "find", "du"] os: - linux - darwin
Workspace Organization
Standards and automated maintenance for clean OpenClaw deployments.
Files Included
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
Problem Solved
Workspaces degrade over time:
This skill provides automated audits + cleanup guidance to prevent entropy.
When to Use
What It Provides
1. maintenance-audit.sh
Automated health check script that detects:2. setup.sh
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
3. Organization Standards (docs/)
Best practices for:Setup
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"
Usage
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/workspace1. 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.
Common Issues Caught
1. Broken Symlinks
Causes:Fix: Remove symlink or update target
2. Empty Directories
Causes:Fix: Remove unless intentionally placeholder
3. Large Files
Common culprits:debug.log, error.log).zip, .tar.gz)Fix: Compress, move to external storage, or delete
4. Malformed Names
Problems caused by:Fix: Rename using kebab-case or snake_case
Example:
# Bad
my project/file (copy).mdGood
my-project/file-copy.md
Workspace Health Score
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).
Automation Strategy
| 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 |
Companion Skills
Integration with Other Skills
Customization
Adjust Large File Threshold
Edit maintenance-audit.sh:
# Change from 10MB to 50MB
find "$WS" -type f -size +50M 2>/dev/null
Exclude Directories
Add to script:
find "$WS" -type d -empty 2>/dev/null \
| grep -v "node_modules" \
| grep -v ".git" \
| grep -v "your-custom-dir"
Add Custom Checks
Extend script with:
Philosophy
Troubleshooting
"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 keptAdvanced: Multi-Workspace Support
If 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)
β‘ When to Use
π‘ 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/workspace1. 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"
brew install findutilsgfind instead of find"Too many empty directories flagged"
.cache, .venv)"Large files are necessary"
notes/workspace-notes.md why they're kept