Skip to content
Back to skills

Workspace Organization

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
documentationgoshellbashnodeawsdebugginggitapidocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add johnalbertini14-glitch/openclaw-skills --skill workspace-organization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Workspace Organization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Workspace Organization
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/johnalbertini14-glitch-workspace-organization/badge)](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-workspace-organization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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 instructions
- `README.md` โ€” Setup guide
- `maintenance-audit.sh` โ€” Run to audit workspace health
- `setup.sh` โ€” Run once to initialize standard structure

**Note:** Scripts auto-detect your workspace. Pass a path as argument to override: `./maintenance-audit.sh /custom/path`

## Problem Solved

Workspaces degrade over time:
- Broken symlinks from moved files
- Empty directories from deleted projects
- Large files eating disk space
- Malformed names breaking scripts
- No visibility into workspace health

This skill provides automated audits + cleanup guidance to prevent entropy.

## When to Use

- **New workspace setup** โ€” Initialize standard directory structure
- **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

## What It Provides

### 1. maintenance-audit.sh
Automated health check script that detects:
- โœ… Broken symlinks
- โœ… Empty directories (excluding node_modules, .git)
- โœ… Large files (>10MB)
- โœ… Malformed file/directory names (spaces, special chars)
- โœ… Disk usage by top-level directory
- โœ… File/directory counts
- โœ… Recent changes (last 24 hours)

### 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:
- File naming conventions (kebab-case, no spaces)
- Directory structure guidelines
- Cleanup policies (what to keep/delete)
- Git integration patterns

## Setup

1. **Install skill:**
```bash
cd ~/.openclaw/workspace/skills
clawhub install workspace-organization
# Or: download from ClawHub and extract
```

2. **Initialize workspace (optional, if starting fresh):**
```bash
cd ~/.openclaw/workspace/skills/workspace-organization
./setup.sh
```

3. **Run first audit:**
```bash
cd ~/.openclaw/workspace/skills/workspace-organization
./maintenance-audit.sh
```

4. **Schedule automated audits (recommended):**
```bash
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

```bash
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.

## Common Issues Caught

### 1. Broken Symlinks
**Causes:**
- Moved/renamed files
- Deleted dependencies
- Incorrect relative paths

**Fix:** Remove symlink or update target

### 2. Empty Directories
**Causes:**
- Deleted projects
- Failed installations
- Incomplete migrations

**Fix:** Remove unless intentionally placeholder

### 3. Large Files
**Common culprits:**
- Uncompressed logs (`debug.log`, `error.log`)
- Binary artifacts (`.zip`, `.tar.gz`)
- Downloaded datasets
- Video/media files

**Fix:** Compress, move to external storage, or delete

### 4. Malformed Names
**Problems caused by:**
- Spaces in filenames โ†’ breaks scripts
- Special characters โ†’ shell escaping issues
- Braces/brackets โ†’ glob conflicts

**Fix:** Rename using `kebab-case` or `snake_case`

**Example:**
```bash
# Bad
my project/file (copy).md

# Good
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

- **system-resource-monitor** โ€” Disk usage alerts complement workspace health
- **cost-governor** โ€” Track subagent costs alongside workspace hygiene

## Integration with Other Skills

- **openclaw-backup:** Audit before backup to reduce size
- **cost-governor:** Track disk usage for storage costs
- **drift-guard:** Organizational entropy as drift indicator

## Customization

### Adjust Large File Threshold

Edit `maintenance-audit.sh`:
```bash
# Change from 10MB to 50MB
find "$WS" -type f -size +50M 2>/dev/null
```

### Exclude Directories

Add to script:
```bash
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:
- Git repo status checks
- Dependency vulnerability scans
- License compliance audits

## Philosophy

- **Prevent entropy** โ€” Structure degrades without maintenance
- **Automate detection** โ€” Scripts catch what humans miss
- **User-approved cleanup** โ€” Never auto-delete without permission
- **Standards over rigidity** โ€” Guidelines, not laws

## Troubleshooting

**"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)

## Advanced: Multi-Workspace Support

If managing multiple OpenClaw instances:

```bash
# 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)

Files in this skill

  • README.md5 KB
  • SKILL.md8.3 KB
  • _meta.json335 B
  • maintenance-audit.sh3.6 KB
  • setup.sh2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.