workspace-directory-manager
Workspace directory manager — maintain cleanliness of ~/.openclaw/ and ~/clawd/
Best use case
workspace-directory-manager is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Workspace directory manager — maintain cleanliness of ~/.openclaw/ and ~/clawd/
Teams using workspace-directory-manager should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/workspace-directory-manager/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How workspace-directory-manager Compares
| Feature / Agent | workspace-directory-manager | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Workspace directory manager — maintain cleanliness of ~/.openclaw/ and ~/clawd/
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Skill: OpenClaw & Workspace Directory Manager ## 触发条件 - "整理目录"、"清理文件夹"、"目录结构" - "清理 tmp"、"清理日志"、"清理临时文件" - "skills 整理"、"重复 skill 检查" - "磁盘空间"、"空间不足" - "workspace 维护"、"openclaw 维护" ## 职责 维护 `~/.openclaw/` 和 `~/clawd/` 两个目录的整洁和秩序。 **专属 agent: 小ops** — CEO 指定的小ops专用 skill。 ## 目录结构规范 ### ~/.openclaw/ (系统配置目录) ``` ~/.openclaw/ ├── openclaw.json # 主配置(唯一真相源) ├── .env # 运行时环境变量(由 rebuild-env.sh 生成,chmod 600) ├── agents/ │ └── <agent-id>/agent/ │ ├── agent.json # Agent 身份+模型+workspace │ ├── models.json # 模型缓存(自动生成) │ ├── SOUL.md # Agent 灵魂文件 │ └── AGENTS.md # Agent 行为规则 ├── skills/ # 全局安装的 Skill ├── logs/ # 运行日志 └── memory/ # 记忆文件 ``` ### ~/clawd/ (工作空间目录) ``` ~/clawd/ ├── MEMORY.md # 长期记忆(main session 维护,只读) ├── SOUL.md # CEO 灵魂文件 ├── AGENTS.md # 团队规则 ├── USER.md # 用户画像 ├── TOOLS.md # 工具手册 ├── IDENTITY.md # 身份文件 ├── HEARTBEAT.md # 心跳规则 ├── memory/ # 日记忆 YYYY-MM-DD.md ├── projects/ # 独立项目 ├── reports/ # 研究报告 ├── skills/ # 自研 Skill ├── scripts/ # 全局脚本 ├── docs/ # 文档 ├── tmp/ # 临时文件(可定期清理) └── repos/ # 代码仓库 ``` ## 执行命令 ### 完整目录健康检查 ```bash python3 ~/clawd/skills/workspace-directory-manager/scripts/health-check.py ``` ### 清理临时文件 ```bash python3 ~/clawd/skills/workspace-directory-manager/scripts/cleanup-tmp.py --dry-run # 预览 python3 ~/clawd/skills/workspace-directory-manager/scripts/cleanup-tmp.py # 执行 ``` ### 重复 Skill 检测 ```bash python3 ~/clawd/skills/workspace-directory-manager/scripts/detect-duplicates.py ``` ### 磁盘空间报告 ```bash python3 ~/clawd/skills/workspace-directory-manager/scripts/disk-usage.py ``` ### 目录结构可视化 ```bash python3 ~/clawd/skills/workspace-directory-manager/scripts/tree-view.py --path ~/clawd --depth 2 python3 ~/clawd/skills/workspace-directory-manager/scripts/tree-view.py --path ~/.openclaw --depth 2 ``` ## 清理规则 ### tmp/ 清理 - `~/clawd/tmp/` 中超过 7 天的文件自动标记删除 - 不删除正在被 cron/session 使用的文件 ### 日志清理 - `~/.openclaw/logs/` 中超过 30 天的日志自动清理 - 保留最近 7 天的详细日志 ### Agent Session 残留 - 检查 agents/*/agent/ 下异常大的文件 - models.json 如果超过 10MB → 标记清理 ### 重复 Skill 清理 - 对比 `~/.openclaw/skills/` 和 `~/clawd/skills/` - 同名 skill 以 `~/.openclaw/skills/` 为准 - 功能重复的 skill 报告给 CEO 决定 ## 安全铁律 1. **永不删除** `MEMORY.md`、`SOUL.md`、`AGENTS.md`、`USER.md`、`TOOLS.md` 2. **清理前 dry-run**,确认无误再执行 3. **用 `trash` 而非 `rm`**(可恢复) 4. **不修改** `openclaw.json`(除非 CEO 明确指示) 5. **memory/ 文件只追加不覆盖** ## 巡检频率 - 每 6 小时(通过 heartbeat 或 cron)运行 health-check - 每周日运行一次 cleanup + disk-usage ## 更新记录 - 2026-03-29: 初版创建
Related Skills
ssh-manager
专业 SSH 连接管理工具。处理 Tailscale SSH、主机密钥、代理绕过、远程命令执行等操作。
provider-key-manager
Provider key manager — rotate and sync API keys across multi-agent workspaces
product-manager-skills
> 产品经理技能集——PRD、用户故事、竞品分析、路线图等产品方法论工具
portfolio-manager
Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diversification, and generate rebalancing recommendations. Use when user requests portfolio review, position analysis, risk assessment, performance evaluation, or rebalancing suggestions for their brokerage account.
permission-manager
管理Claude Code的全局工具权限配置,自动将MCP命令或其他工具添加到allowedTools中,避免每次使用时都需要手动批准。工作流程:确认用户需要添加的命令 -> 确认添加级别(默认全局~/.claude.json) -> 执行添加 -> 验证并提醒重启。
model-provider-manager
Unified LLM provider and model configuration, health monitoring, and key management
mcp-manager
MCP 服务器智能管理助手。自动检测 MCP 可用性、智能开关、功能问答,提供人性化的 MCP 管理体验。
entropy-manager
Entropy scanner for codebases — detect disorder and suggest cleanup actions
email-manager
多邮箱统一管理与智能助手。支持 Gmail、QQ邮箱等 IMAP 邮箱,定时查看邮件,AI 生成摘要和回复草稿,发送前需用户确认。
customer-success-manager
Monitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success
cron-manager
创建、监控、诊断和修复 OpenClaw cron 任务,支持自然语言时间与常见故障排查。
context-manager
AI-powered context management for OpenClaw sessions