← 返回 Skills 市场
lujun2508

Workspace Guardian

作者 lujun2508 · GitHub ↗ · v1.0.9 · MIT-0
win32linuxdarwin ✓ 安全检测通过
88
总下载
1
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install file-rules
功能描述
Stop AI from scattering files everywhere. This skill enforces consistent naming and directory structure for all AI outputs — saves tokens, cuts management ti...
使用说明 (SKILL.md)

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 content
  • output/ — approved content
  • temp/ — 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}
安全使用建议
This skill is coherent with its stated goal and doesn't request secrets or installs, but it does instruct the agent to create, move, and delete files in the agent's workspaces (including ~/.openclaw/workspace-*/ and default drafts/output/temp locations). Before installing: 1) Decide whether you trust the agent to manage/delete files and ensure important data is backed up; 2) Prefer to explicitly specify project paths when you want files written somewhere specific; 3) Keep the agent configured to prompt before bulk cleanup or deletions if you want manual control; 4) Test the skill in a non-critical workspace first to confirm behavior. If you do not want any automatic cleanup, consider disabling autonomous invocation or requiring confirmations for maintenance actions.
功能分析
Type: OpenClaw Skill Name: file-rules Version: 1.0.9 The skill bundle consists solely of organizational instructions in SKILL.md designed to help an AI agent maintain a clean workspace and consistent file naming conventions. It includes safeguards such as prioritizing user-specified paths and requiring explicit user confirmation before performing any file cleanup or maintenance tasks, with no evidence of malicious code, data exfiltration, or unauthorized execution.
能力评估
Purpose & Capability
The name/description (enforce consistent naming and directory structure) matches the SKILL.md: rules for filenames, project directories, temp cleanup, and agent workspace management. There are no unrelated environment variables, binaries, or installs requested.
Instruction Scope
Instructions grant the agent authority to create, move, and delete files within agent-managed workspaces (defaulting to per-project directories and ~/.openclaw/workspace-*/). The skill instructs periodic checks and deletion of rejected/temporary files (with a prompt before bulk cleanup). It does not instruct reading or transmitting unrelated files or contacting external endpoints, but it does permit filesystem-modifying actions in agent workspaces, which is expected for this purpose and should be accepted consciously by the user.
Install Mechanism
No install spec and no code files — instruction-only skill. Nothing is written to disk by an installer.
Credentials
No environment variables, credentials, or external config paths are required. The lack of secrets or unrelated credentials is proportionate to the stated functionality.
Persistence & Privilege
always:false (default). The skill allows autonomous invocation (platform default). Because the instructions authorize deletion and cleanup within agent workspaces, granting autonomy means the agent could perform those filesystem operations during use — the user should be aware and require prompts/confirmations when desired.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install file-rules
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /file-rules 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.9
- Updated the description to emphasize benefits: prevents file scattering, enforces naming and directory structure, and highlights efficiency for AI users. - No changes made to rules, examples, or structure content.
v1.0.8
- Added a "Periodic Maintenance" section with scheduled review guidelines for temp files, script versions, and empty directories. - Introduced user confirmation prompt in Chinese before cleaning up issues found during review. - Clarified not to perform large cleanups automatically or during busy times. - No changes to core file organization or naming rules.
v1.0.7
- Updated description and summaries for clarity and brevity. - Condensed rules: consolidated sections on directory structure, naming standards, and maintenance. - Streamlined exceptions and special cases for user-specified paths and agent workspaces. - Reduced verbosity throughout for easier reference and implementation. - Added a simple self-check confirmation with output location after file creation.
v1.0.6
- Updated version to 1.0.6. - Removed Fenlin Paint Monitor project as a special root-level case; now handled like other projects. - Clarified that “output” and “temp” subdirectories for Excel/PDF and temp files should be in the relevant project, not a global location. - Adjusted §2 directory examples, removing Fenlin-specific exceptions. - Clarified that the rule does not intervene in `~/.openclaw/workspace-*/` agent workspaces, but all other output must follow the standard rule. - Improved layout and alignment of directory and agent workspace sections for consistency.
v1.0.5
Version 1.0.5 introduces default file organization rules for outputs without a specific project. - Added §10 "No-Project Default Rules" to guide file placement when there is no specific project. - Outlined a clear directory structure within Agent workspaces for drafts, outputs, and temp files. - Clarified rule priority: files with clear owner go to that Agent’s workspace; otherwise, use default workspace subdirectories. - No other sections were modified.
v1.0.4
- Translated SKILL.md from Chinese to English for broader accessibility. - No changes to the logic or rules; content is now clearer for non-Chinese users. - Project directories, naming conventions, and cleanup principles remain unchanged. - Ensured formatting and structure match the original, just in English.
v1.0.3
Workspace Guardian is now formally documented with comprehensive rules for file and directory organization. - Added clear conventions for project directory structure, naming, file locations, and exceptions for specific projects. - Defined step-by-step rules for naming files and organizing scripts, outputs, data, docs, and temp files. - Outlined forbidden actions with reasons and correct alternatives to prevent clutter and confusion. - Introduced automatic clean-up procedures for rejected outputs, failed scripts, unused temp files, and empty directories. - Emphasized user feedback and transparency after each file operation, including summary messages with precise file paths. - Included recommendations for cleaning up historically messy directories (no auto-action, requires user confirmation).
v1.0.1
- Added comprehensive rules for file creation and directory organization to enforce predictable, searchable, and traceable outputs. - Defined strict project-based directory structures, naming conventions, and prohibited practices for file management. - Outlined exceptions, such as honoring user-specified paths and legacy project directories. - Introduced automated cleanup mechanisms for unwanted or temporary files, including response templates for user feedback. - Included guidance for archiving, temp file handling, self-check after file creation, and suggested manual cleanup for existing clutter.
v1.0.0
- Initial release establishing comprehensive file and directory organization rules for all file operations. - Mandates project-based directory structures and standardized naming conventions for files/scripts. - Prohibits scattering files in user root, desktop, or non-project directories; enforces use of `output/`, `scripts/`, `data/` subfolders. - Outlines automatic cleanup for unaccepted outputs, failed scripts, and temporary files, with clear user notifications. - Specifies exceptions when users provide explicit file paths and for special project cases. - Provides a checklist to ensure all files are easy to locate and trace.
元数据
Slug file-rules
版本 1.0.9
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 9
常见问题

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。

💬 留言讨论