/install file-rules
Workspace Guardian
Unless the user explicitly specifies a path, this skill governs where and how files are created.
Core Rules
One Project = One Directory
All files belong to a project. Never scatter files in ~/, desktop, downloads, or timestamped folders.
Naming Standard
{date}_{description}.{ext}
Example: 2026-04-14_report.xlsx
Scripts: {verb}_{object}.py (e.g., generate_report.py)
Directory Structure
{project-root}/
├── output/ ← final deliverables
├── scripts/ ← scripts and tools
├── data/ ← data files
├── docs/ ← documentation
├── temp/ ← temporary files
└── README.md
Special Cases
User Specifies a Path
Follow the user's instruction.
No Clear Project
Output goes to the Agent's own workspace:
drafts/— pending contentoutput/— approved contenttemp/— temporary, clean after use
Agent Workspaces
Files in ~/.openclaw/workspace-*/ are managed by each Agent independently.
Periodic Maintenance
Scheduled Review
Periodically (every few days during normal usage), check for:
- Old temp files that were never cleaned up
- Multiple script versions that could be consolidated
- Empty directories left behind
When found, ask the user: "发现 {issue},是否清理?" — wait for confirmation before taking action.
Do not主动清理大量文件 or run cleanup during busy times.
Maintenance
Rejected Outputs
When the user declines an output: remove the file promptly.
Temporary Files
Clean up temp/ after task completion. Old temp files should not accumulate.
Versioned Scripts
When updating a script, archive the old version with a date suffix (e.g., generate_report_v4_2026-04-09.py).
Empty Directories
Do not leave empty directories behind.
Self-Check
After creating a file, briefly confirm the location:
📁 Saved: {project-dir}/{filename}
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install file-rules - 安装完成后,直接呼叫该 Skill 的名称或使用
/file-rules触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Workspace Guardian 是什么?
Stop AI from scattering files everywhere. This skill enforces consistent naming and directory structure for all AI outputs — saves tokens, cuts management ti... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 88 次。
如何安装 Workspace Guardian?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install file-rules」即可一键安装,无需额外配置。
Workspace Guardian 是免费的吗?
是的,Workspace Guardian 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Workspace Guardian 支持哪些平台?
Workspace Guardian 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(win32, linux, darwin)。
谁开发了 Workspace Guardian?
由 lujun2508(@lujun2508)开发并维护,当前版本 v1.0.9。