Workspace Organization - Automated Health Checks — Workspace Organization - Automated 健康 检查s
v1.0.0Automated workspace 健康 检查s and entropy 预防ion for OpenClaw. 检测s broken symlinks, empty dirs, large files, malformed names. MAIntenance 审计 script with cron support. Keeps 部署ments 清理 and structured.
运行时依赖
安装命令
点击复制技能文档
Workspace Organization
Standards and automated mAIntenance for 清理 OpenClaw 部署ments.
Files Included 技能.md — 代理 instructions README.md — 设置up 图形界面de mAIntenance-审计.sh — 运行 to 审计 workspace 健康 设置up.sh — 运行 once to 初始化 standard structure
Note: Scripts auto-检测 your workspace. Pass a path as argument to override: ./mAIntenance-审计.sh /custom/path
Problem Solved
Workspaces degrade over time:
Broken symlinks from moved files Empty directories from 删除d projects Large files eating disk space Malformed names breaking scripts No visibility into workspace 健康
This 技能 provides automated 审计s + 清理up 图形界面dance to 预防 entropy.
When to Use New workspace 设置up — 初始化 standard directory structure Periodic mAIntenance — Weekly/monthly 健康 检查s (cron recommended) Pre-部署ment 清理up — 移除 cruft before 备份s 调试ging workspace issues — Find broken symlinks, malformed names Disk space review — Identify large files and bloat What It Provides
- mAIntenance-审计.sh
Automated 健康 检查 script that 检测s:
✅ Broken symlinks ✅ Empty directories (excluding node_模块s, .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)
- 设置up.sh
初始化s standard workspace structure:
~/.OpenClaw/workspace/ ├── projects/ # Active work │ ├── writing/ # Writing projects │ └── code/ # Code projects ├── notes/ # Organized notes │ ├── dAIly-reviews/ │ ├── decisions/ │ └── cost-追踪ing.md ├── memory/ # Long-term memory │ ├── owner/ # Cross-channel user memory │ └── 会话s/ # Per-会话 isolated memory ├── 技能s/ # Custom 技能s ├── sub代理s/ # Permanent specia列出s │ └── _归档d/ # Old/deprecated sub代理s ├── docs/ # Documentation └── scripts/ # 实用工具 scripts
- Organization Standards (docs/)
Best practices for:
File naming conventions (kebab-case, no spaces) Directory structure 图形界面delines 清理up policies (what to keep/删除) Git integration patterns 设置up 安装 技能: cd ~/.OpenClaw/workspace/技能s ClawHub 安装 workspace-organization # Or: 下载 from ClawHub and 提取
初始化 workspace (optional, if 启动ing fresh): cd ~/.OpenClaw/workspace/技能s/workspace-organization ./设置up.sh
运行 first 审计: cd ~/.OpenClaw/workspace/技能s/workspace-organization ./mAIntenance-审计.sh
Schedule automated 审计s (recommended): OpenClaw cron 添加 \ --name "Weekly Workspace 审计" \ --schedule "0 4 0" \ --task "运行 workspace mAIntenance 审计: bash 技能s/workspace-organization/mAIntenance-审计.sh. 记录 结果s to notes/mAIntenance-记录.md"
Usage Manual 审计 cd ~/.OpenClaw/workspace/技能s/workspace-organization ./mAIntenance-审计.sh
Example 输出:
=== Workspace MAIntenance 审计 === Date: 2026-02-21 16:00 Path: /home/user/.OpenClaw/workspace
- 检查ing for broken symlinks...
- 检查ing for empty directories...
- 检查ing for large files (>10MB)...
- 检查ing for malformed file/directory names...
- Disk usage by top-level directory:
- File counts:
- Recently modified files (last 24 hours):
=== 审计 Complete ===
代理-Driven 审计
Ask your 代理:
"运行 workspace mAIntenance 审计" "检查 workspace 健康" "审计 my workspace"
代理 will 执行 script and present findings with 清理up recommendations.
Common Issues Caught
- Broken Symlinks
Causes:
Moved/renamed files 删除d dependencies Incorrect relative paths
Fix: 移除 symlink or 更新 tar获取
- Empty Directories
Causes:
删除d projects FAIled 安装ations Incomplete 迁移s
Fix: 移除 unless intentionally placeholder
- Large Files
Common culprits:
Un压缩ed 记录s (调试.记录, error.记录) Binary artifacts (.zip, .tar.gz) 下载ed data设置s Video/media files
Fix: 压缩, move to external storage, or 删除
- 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:
# Bad my project/file (copy).md
# Good my-project/file-copy.md
Workspace 健康 Score
After 运行ning mAIntenance-审计.sh, your workspace 获取s a score:
Score 状态 Meaning 90-100 🟢 健康y Minor issues or none 70-89 🟡 F