360 Secure SkillHub
360 安全技能中心

Workspace Org

该 Skill 定义 OpenClaw 多智能体工作区的标准化目录约定:核心配置留在根目录,所有生成文件归入 files/ 下的 tmp、notes、inbox、outbox、archive、experts 子目录,并给出各子目录的清理策略。配套脚本可扫描目录违规(支持 JSON 输出)并将现有文件迁移到正确位置,默认干跑。

zaixi
zaixi
热度 29.94
最近更新 2026-05-11 17:47:47
分类:效率依赖:代码执行 / 读写文件应用场景:工作流 / 任务管理 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add workspace-org
Metadata
name
workspace-org
description
Standardized workspace directory layout for multi-agent OpenClaw deployments. All agent-generated files go under files/ to keep root clean. Defines where agents store files, exchange deliverables, and cleanup policies. Trigger on workspace setup, file placement decisions, workspace cleanup, multi-agent convention setup, workspace compliance check.

Workspace Org

Standardized directory conventions for OpenClaw multi-agent workspaces.

Layout

workspace/                          ← or any agent workspace dir
├── AGENTS.md, SOUL.md ...         ← core config (never moved)
├── skills/                        ← ClawHub skills
├── memory/                        ← long-term memory
├── files/                         ← all agent-generated content
│   ├── tmp/       disposable temp files
│   ├── notes/     working docs worth keeping
│   ├── inbox/     deliverables from other agents
│   ├── outbox/    files for owner/other agents
│   ├── archive/   inactive projects
│   └── experts/   (workspace root only) expert engagements

Rules

  • Core config files stay at workspace root. Never moved.
  • All generated files go into files/{subdir}/. No exceptions.
  • Cross-agent handoff: sender writes to files/outbox/, receiver picks from files/inbox/.

Cleanup policy

Subdir Cleanup rule
files/tmp/ Eligible for auto-cleanup at any time
files/notes/ Keep; never auto-clean
files/archive/ Manual review before removal
files/experts/ Remove after expert engagement ends
files/inbox/ Clear after processing deliverable

Enforcement for future work

When creating files

All generated files go into files/ subdirectories:

  • Temp/one-off scripts, patches, downloads → files/tmp/
  • Keep-worthy docs, analysis, snapshots → files/notes/
  • Cross-agent handoff → files/inbox/ or files/outbox/
  • Old projects → files/archive/

Periodic compliance check

# Check if current workspace has layout violations
python3 {{SKILL_DIR}}/scripts/sweep.py

# JSON output for automation
python3 {{SKILL_DIR}}/scripts/sweep.py --json

Fix existing violations

python3 {{SKILL_DIR}}/scripts/apply.py --execute

HEARTBEAT.md can include a periodic sweep to catch drift.

Scripts

scripts/apply.py

Creates files/ and sub-directories, migrates existing files into correct locations. Auto-detects workspace root vs agent workspace. Dry-run by default. Agent directories (containing AGENTS.md) are never moved.

scripts/sweep.py

Audits workspace for layout violations. Returns exit code 0 (clean), 1 (warnings), or 2 (violations).

References

  • layout.md — Full specification with agent-type variations