← Back to Skills Marketplace
lujun2508

Workspace Guardian

by lujun2508 · GitHub ↗ · v1.0.9 · MIT-0
win32linuxdarwin ✓ Security Clean
88
Downloads
1
Stars
0
Active Installs
9
Versions
Install in OpenClaw
/install file-rules
Description
Stop AI from scattering files everywhere. This skill enforces consistent naming and directory structure for all AI outputs — saves tokens, cuts management ti...
README (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}
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install file-rules
  3. After installation, invoke the skill by name or use /file-rules
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug file-rules
Version 1.0.9
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 9
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 88 downloads so far.

How do I install Workspace Guardian?

Run "/install file-rules" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Workspace Guardian free?

Yes, Workspace Guardian is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Workspace Guardian support?

Workspace Guardian is cross-platform and runs anywhere OpenClaw / Claude Code is available (win32, linux, darwin).

Who created Workspace Guardian?

It is built and maintained by lujun2508 (@lujun2508); the current version is v1.0.9.

💬 Comments