Workspace Guardian for Openclaw

A sophisticated organization framework that prevents AI agents from scattering files by enforcing strict naming conventions and a standardized directory hierarchy.

lujun2508
v1.0.9
Apr 14, 2026
1
889
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install file-rules

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install file-rules using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Workspace Guardian?

Workspace Guardian is a specialized management layer designed to bring order to the often chaotic output of AI coding agents. By implementing a 'One Project = One Directory' philosophy, it ensures that every file generated—whether it is a script, a data set, or a final report—is placed within a logical, predictable structure. This skill is a vital addition to the Openclaw Skills library for developers who want to reduce token waste and eliminate the time-consuming 'file hunt' that occurs when agents save outputs to random directories.

Beyond simple placement, the skill governs the entire lifecycle of a file. It mandates specific naming formats that include dates and descriptive slugs, ensuring that even months later, a user can identify the purpose of a file without opening it. By maintaining a clean workspace across Windows, macOS, and Linux, Workspace Guardian transforms a cluttered AI environment into a professional, production-ready development workspace.

Workspace Guardian Use Cases

  • Preventing AI agents from saving files to the root, desktop, or downloads folders.
  • Automatically organizing multi-file AI projects into dedicated data, script, and documentation folders.
  • Standardizing script naming across a team to ensure consistency (e.g., verb_object.py).
  • Automating the cleanup of temporary files and rejected AI outputs to maintain a lean storage footprint.
  • Archiving older versions of AI-generated scripts with timestamped suffixes for easy version tracking.

How Workspace Guardian Works

  1. The skill intercepts file creation requests from the AI agent and checks if a specific path was provided by the user.
  2. If no path exists, it identifies the current project context and assigns a standardized directory root.
  3. It applies naming logic, transforming generic filenames into structured strings like {date}_{description}.{ext}.
  4. The file is placed into the appropriate sub-directory (e.g., /output for deliverables or /scripts for logic).
  5. Upon completion of the task, the skill triggers a cleanup of the /temp folder.
  6. Periodic maintenance cycles scan for empty directories or redundant script versions to prompt the user for optimization.

Workspace Guardian Setup

To integrate this skill into your environment, ensure you are running a supported version of the Openclaw platform. Use the following commands to get started:

# Install the Workspace Guardian skill
openclaw install workspace-guardian

# Verify the installation and version (requires 1.0.7+)
openclaw list skills

Once installed, the skill will automatically govern all file-related operations performed by your AI agent unless overridden by explicit path commands.

Workspace Guardian Data Schema & Taxonomy

Workspace Guardian utilizes a rigid taxonomy to categorize files. The following table describes the standard directory mapping used by Openclaw Skills of this type:

Directory Purpose Retention Policy
output/ Final deliverables and approved content Permanent
scripts/ Executable code and automation tools Permanent (Versioned)
data/ Raw and processed data files Permanent
docs/ Project documentation and READMEs Permanent
temp/ Temporary processing files Deleted after task
drafts/ Pending content awaiting approval Deleted upon rejection

All scripts follow the specific schema: {verb}_{object}.py, while general files utilize {date}_{description}.{ext}.

Workspace Guardian Advanced Features

  • Multi-OS support across Windows (win32), Linux, and macOS (darwin).
  • Automatic versioning hooks that archive old scripts with date suffixes instead of overwriting them.
  • Intelligent cleanup protocols that remove rejected outputs immediately to prevent workspace pollution.
  • Agent-specific workspace isolation located in ~/.openclaw/workspace-*/ for independent task management.
  • Scheduled maintenance prompts that identify empty directories and version bloat for user-confirmed optimization.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*