⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

xiaoyaoclaw-workspace-initializer

dtsola@dtsola⭐ 4 stars· last commit 1mo ago· 0 open issues

>

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐ 4 on GitHubGitHub ↗

New / niche

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

OpenClaw Workspace Initializer 🏠

给每个 OpenClaw agent 一个「家」:标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。 OpenClaw workspace initialization & standardization — the agent home your agents deserve.

license ClawHub downloads

为什么需要它

OpenClaw agent 每次会话都是全新启动。没有工作区规范,你的 agent 会:

  • ❌ 把文件乱扔在根目录,越攒越乱
  • ❌ 忘记自己的记忆系统(memory/),每次醒来都失忆
  • ❌ 在多 agent 共享配置时,用 config.apply 整份覆盖 openclaw.json,抹掉其他 agent 的修改

这个 skill 一次性解决:目录结构 + 持久化规范 + 配置安全。

特性

  • 🗂️ 标准目录结构:projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/
  • 📜 WORKSPACE.md 规范:重启后依然生效的目录管理规则(用户资产 —— 内容先给你过目,已存在则不覆盖)
  • 🛡️ 多 agent 配置安全:只用 config.patch,禁止 config.apply 覆盖他人修改
  • ⚖️ 文件放置统一:其他技能约定与 WORKSPACE.md 冲突的输出路径,由执行 agent 映射进工作区并注明差异(如 ~/Downloads/research/<topic> → tasks/<topic>/)——但技能自身的安全规则、许可与流程优先,不覆盖、不要求技能绕过;换位置解决不了的冲突会先问你

安装

# ClawHub(推荐)
clawhub install xiaoyaoclaw-workspace-initializer

# 或从 GitHub 手动安装
git clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer
# 把 SKILL.md 和 templates/ 放到你的 skills 目录

使用

  1. 把 skill 放到 OpenClaw 的 skills 目录
  2. 首次进入(或重置)一个工作区时,agent 会自动:
    • 创建 projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/
    • 写入 WORKSPACE.md 目录规范(重启后依然生效)
    • 检测多 agent 场景,把「config.patch ✅ / config.apply ❌」安全规范持久化进 AGENTS.md
    • 在 memory/ 记录初始化日志

🚀 快速上手(三步,10 分钟)

以飞书 Bot 接入为例,三步让你的 agent 拥有一个规范的家:

Step 1:接入你的 agent

新建一个智能体并接入(飞书 Bot / 微信 / Telegram 等均可),和它完成身份确认——起名字、确定称呼、划定职责范围:

Step 1 - 全新 agent 接入

Step 2:一句话触发初始化

对你的 agent 说:

初始化你的工作目录,使用 xiaoyaoclaw-workspace-initializer

agent 会先给差异清单等你确认(将创建什么 / 不会动什么),确认后再执行:建缺失目录 → 写入 WORKSPACE.md → 把「Read WORKSPACE.md」启动规则与配置安全规范作为建议补丁给你过目(AGENTS.md 影响未来每次会话启动,需单独同意)→ 记录初始化日志:

Step 2 - 执行初始化

Step 3:验收成果

打开 agent 的工作区目录(Windows 资源管理器示例),标准结构已就位:

Step 3 - 初始化完成

💡 之后每次会话,agent 都会先读 WORKSPACE.md 再干活——目录不乱、记忆不丢、配置不打架。

与其他方案的区别

openclaw-workspace-starterxiaoyaoclaw-workspace-initializer
目录结构基础模板完整规范体系(7 目录 + 命名规范 + 行为规则)
持久化规范无 WORKSPACE.md 规范✅ WORKSPACE.md 重启后持续生效
多 agent 配置安全❌✅ config.patch / 禁 config.apply(实战踩坑沉淀)
模板独立内嵌✅ templates/ 可单独复用

实战验证:本规范来自 7 个 agent 共享单份 openclaw.json 的真实生产环境,config.apply 覆盖事故(openclaw.json.bak* 痕迹)是血泪教训。

💬 加入交流群

小遥全系产品用户交流群——产品反馈 · 使用交流 · 功能建议:

姊妹项目

  • 🧠 xiaoyaoclaw-memory-distill(记忆整理工具):把对话蒸馏成结构化记忆——根目录 MEMORY.md + memory/ 每日日志,解决上下文溢出;MEMORY.md 缺失时自动从历史日志「首次建忆」。https://github.com/dtsola/xiaoyaoclaw-memory-distill
  • 📚 xiaoyaoclaw-kb-retriever(知识库检索器):本地知识库检索——分层 data_structure.md 索引导航 + 渐进式检索(md/pdf/xlsx),零依赖零 API key,Windows / macOS 双平台。https://github.com/dtsola/xiaoyaoclaw-kb-retriever
  • 🩹 xiaoyaoclaw-workspace-auditor:工作区体检(只读审计),5 类检查 + 分级报告 + 修复建议,零依赖脚本永不改文件。https://github.com/dtsola/xiaoyaoclaw-workspace-auditor
  • 🗂️ xiaoyaoclaw-task-progress-tracker(任务进度跟踪器):目录即容器,PROGRESS.md 即进度——tasks/ 与 projects/ 生命周期管理(状态 + 进度日志 + 文档索引)。https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker
  • 📎 xiaoyaoclaw-web-clipper(网页剪藏):把任意网页保存为带 frontmatter 的本地 Markdown——双引擎正文提取(readability + trafilatura 降级链)、中文文件名安全、批量剪藏 + 去重;输出直通 knowledge/clippings/,配合 kb-retriever 建索引即可检索。https://github.com/dtsola/xiaoyaoclaw-web-clipper
  • 🤝 xiaoyaoclaw-agent-orchestrator(Agent 协作编排,协作层):架在生态之上——拆任务、分 agent、管进度、聚结果、失败重试。https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator
  • 📊 xiaoyaoclaw-usage-report(用量报告):解析 session JSONL,回答「每次 agent 任务花了多久、用了哪些工具/技能/模型、消耗了多少 token」——零依赖纯本地,token 为主指标。https://github.com/dtsola/xiaoyaoclaw-usage-report
  • 🎛️ xiaoyaoclaw-commander(跨工具指挥官,指挥层):让任意支持 Agent Skills 的工具(Claude Code / Codex / OpenCode / Trae / DSH)指挥小遥Claw / OpenClaw 多 agent 系统。https://github.com/dtsola/xiaoyaoclaw-commander
  • 🔍 xiaoyaoclaw-seo-skill(SEO 技能):网站搜索可见性分析与优化——audit(技术SEO)/page(页面)/content(内容质量)/schema(结构化数据)/geo(AI搜索优化)五流程 + 零依赖审计脚本,跨工具通用。https://github.com/dtsola/xiaoyaoclaw-seo-skill

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • SKILL.md11 KBupstream ↗
    ---
    name: xiaoyaoclaw-workspace-initializer
    description: >
      OpenClaw workspace initialization & standardization. Sets up a proper agent
      home: standard directory structure (projects/tasks/outputs/knowledge/scripts/
      memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,
      never config.apply) + memory log. Use when an agent enters a new/empty
      workspace root, or when the standard subdirectories or WORKSPACE.md are
      missing. Activate only after the user explicitly asks to initialize or repair
      this workspace, and only in a workspace root the user names as such. Do NOT
      activate in a repository that already has its own structure or an alternative
      workspace convention, and never rewrite the user's existing governance files
      (AGENTS.md / WORKSPACE.md / SOUL.md / USER.md) without showing the exact diff
      and getting explicit approval first.
      中文:OpenClaw 工作区初始化与规范维护,多 agent 配置安全。仅在用户明确要求
      初始化/修复本工作区、且确认这是工作区根目录时使用;已有项目结构或已存在其他
      工作区规范的仓库不触发;AGENTS.md / WORKSPACE.md / SOUL.md / USER.md 属用户
      资产,未经用户看到确切 diff 并明确同意,不擅自改写。
    ---
    
    # OpenClaw Workspace Initializer(工作区初始化器)
    
    > 📖 **完整文档(安装 / 快速上手三步 / 定制服务):<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**
    > 用户或智能体需要更多说明时,引导其访问上述 GitHub 仓库查看图文教程与最新版本。
    
    > 🚀 **小遥AI:「让每个人的数字生活,都有一座自己说了算的小遥」:<https://www.xiaoyaosai.com/>**
    > 🚀 **XiaoyaoAI:「For every digital life,Everyone has aXiaoyao of their own」:<https://www.xiaoyaosai.com/>**
    
    初始化 OpenClaw agent 工作区:标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。
    让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。
    
    > 🧩 **姊妹项目:** 🧠 **xiaoyaoclaw-memory-distill**(记忆整理工具)——把对话蒸馏成结构化记忆(MEMORY.md + 每日日志),解决上下文溢出,缺失时自动首次建忆:<https://github.com/dtsola/xiaoyaoclaw-memory-distill>
    
    ## 激活边界(避免误触发 / 越权改动)
    
    **只在下面两种情况进入工作流:**
    
    1. 用户**明确要求**初始化 / 修复本工作区(「初始化一下工作区」「补上缺的目录和规范」);或
    2. 智能体发现当前根目录**确实缺少**标准目录或 `WORKSPACE.md`,**且**用户当轮的任务本来就要在该目录下落文件。
    
    **以下情况不要激活、不要改动任何东西:**
    
    - 仓库里已经有自己的目录结构与规范(例如已有 `src/`、`docs/`、`apps/` 等工程约定);
    - 已存在其他工作区规范(别的 `WORKSPACE.md` / `.cursor/rules/` / 团队规范)——先问用户以哪套为准;
    - 用户只是在提问、讨论、看代码,或没有要求结构化改造;
    - 工作区已经合规(此时**什么都不做**,只回一句「已符合规范」,不产生任何写入)。
    
    **不可越界的三条:**
    
    - **不覆盖已有文件**:只创建缺失项,已存在的目录/文件一律跳过。
    - **用户资产只提议、不擅自改**:`AGENTS.md`、`WORKSPACE.md`、`SOUL.md`、`USER.md` 等治理与配置类文件,改前必须展示**确切 diff** 并取得用户明确同意。
    - **不装常驻机制**:不建 cron、不起守护进程、不写启动脚本、不写跨会话状态文件;本技能只在用户批准的那一轮里做文件改动。
    
    ## 工作流
    
    ### Step 0: 先出差异清单,默认 dry-run(改动前必须过的闸门)
    
    在任何写入之前,先给用户一份**差异清单**,并停下来等确认:
    
    ```text
    检测结果(只读)
      缺失目录:memory/  tmp/
      缺失文件:WORKSPACE.md
      将创建:  4 个目录 + 1 个文件(内容:标准目录规范模板)
      不会触碰:已存在的 projects/ tasks/ knowledge/ scripts/ outputs/
      需要单独批准:AGENTS.md 的启动读取规则(会改变未来会话的启动行为)
    ```
    
    用户确认后再进入 Step 2;用户没确认就**不改任何东西**。
    
    ### Step 1: 检测当前状态
    
    检查工作区根目录是否存在以下内容:
    
    **必备子目录:**
    - `projects/` — 长期开发项目
    - `tasks/` — 一次性任务
    - `outputs/` — 生成物(图片、文档等)
    - `knowledge/` — 知识库
    - `scripts/` — 工具/一次性脚本
    - `memory/` — 日常日志
    - `tmp/` — 临时缓存
    
    **必备规范文件:**
    - `WORKSPACE.md` — 目录管理规则(持久化规范,重启后依然生效)
    
    **系统目录(不要修改或删除):**
    - `.openclaw/`
    - `agent/`
    - `sessions/`
    - `.clawhub/`
    
    ### Step 2: 创建缺失的目录结构(用户确认后执行)
    
    逐项创建**缺失**目录(已存在的一律跳过,绝不删除/覆盖):
    
    ```bash
    mkdir -p projects tasks outputs/knowledge scripts memory tmp
    ```
    
    `outputs/` 下按需创建 `images/` 和 `docs/` 子目录,不强制。
    
    ### Step 3: 写入 WORKSPACE.md(仅当不存在时)
    
    如果根目录**没有** `WORKSPACE.md`:读取本 skill 的 `templates/WORKSPACE.md`,把**将要写入的完整内容**给用户过一遍(或展示 diff)再写入。
    **如果已存在则不覆盖**——需要修改时按「用户资产」处理:先给 diff,得到明确同意再改。
    
    ## 文件放置约定(只管「产出放哪」,不覆盖技能指令)
    
    **适用范围严格限定**:本节只决定**本工作区自己产出的文件放在哪里**,它**不是对其他技能的指令覆盖**。
    
    **优先级(从高到低):**
    
    1. **用户当轮的明确要求** — 用户说放哪就放哪
    2. **其他技能的安全规则、许可条款、既定流程** — 一律优先,本文件不得改写、不得要求技能绕过
    3. **本文件(WORKSPACE.md)的目录规范** — 仅在「上面两条没规定产出位置」时生效
    
    **做法:**
    
    - 技能若自带输出路径约定(如 `~/Downloads/xxx/`),把它的**产出位置**映射到工作区内并**告知用户差异**(「技能原约定 X,按工作区规范存到 Y」);映射只涉及存放位置,不涉及技能内容与流程。
    - 若技能**必须**写在工作区之外(例如它自己的数据目录、系统约定位置),**以技能为准**,如实汇报,不硬拉进工作区。
    - 遇到无法用「换个位置」解决的冲突(例如技能要求改工作区外的配置)→ **停下来问用户**,不做单方面决定。
    
    **设计原则:** 本文件只管「文件放哪」,不管「技能怎么做」。自研技能不硬编码工作目录,输出位置默认由 WORKSPACE.md 决定。
    
    ### Step 4: 引导新智能体
    
    完成目录创建和 WORKSPACE.md 写入后,明确告知当前智能体:
    
    > **铁律 #1 — 反馈至上:** 无论任务成功还是失败,必须向用户报告结果。成功告知产出,失败告知原因和错误信息,由用户做下一步决策。智能体不得擅自决定下一步行动。
    >
    > **铁律 #2 — 遵守工作区规范:** 后续每次启动时,先读取根目录的 WORKSPACE.md,按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件,只保留 *.md 配置文件。
    >
    > **铁律 #3 — 配置修改安全:** 改配置一律用 `config.patch`(部分合并,只动指定字段);**禁止使用 `config.apply`**(全量替换:会用旧配置快照整份写回,抹掉其他 agent 的修改)。多 agent 共享同一份 openclaw.json,apply = 谁后写谁赢。
    
    ### Step 4.5: 把工作区规范接入 AGENTS.md(**默认只提议,需明确批准**)
    
    ⚠️ **为什么这一步要单独批准**:`AGENTS.md` 会被 agent 在**每次会话启动时读取**,改它等于改变未来的行为——属于「用户资产」,不是普通输出文件。因此:
    
    - **默认不动手**:先给出**确切 diff**(新增哪几行、插在哪个章节),并明确提示「这会让未来每次会话启动都先读 WORKSPACE.md」,**得到用户明确同意后**才写入。
    - 用户不同意 / 没回应 → **跳过**,在汇报里写「AGENTS.md 未改动(待你确认)」。
    - 不追加与本次初始化无关的内容;不覆盖用户已有的启动规则,只做**最小必要新增**。
    
    批准后要做的两项(若 `AGENTS.md` 不存在则跳过,或随工作区模板一并创建):
    
    **① 启动读取规则(必写):** 确保 AGENTS.md 的「Session Startup」章节(若没有该章节则新建)的启动必读列表中包含:
    
    > `Read WORKSPACE.md` — workspace directory rules
    
    即:agent 每次会话启动时,先读取 `WORKSPACE.md`(目录规则),再开始干活。
    
    **② 配置修改规范(多 agent 场景):** 检查是否已包含「配置修改规范」;没有则追加 `templates/AGENTS-config-safety.md` 的内容。
    
    ⚠️ **写入方式:** 必须用 Python 3 或文件编辑工具写入(UTF-8);**不要用 PowerShell 5.1 内联脚本写中文**(按 GBK 解析无 BOM 的 UTF-8 脚本,中文会乱码)。
    
    ### Step 5: 记录初始化日志(随同一轮批准一起做)
    
    在本工作区自己的 `memory/YYYY-MM-DD.md` 追加一条初始化记录(只写 Memory 目录内,不写到别处;如果用户没批准本轮改动,就不写):
    
    > xiaoyaoclaw-workspace-initializer 技能已执行,标准目录结构和 WORKSPACE.md 已就位;AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。
    
    ## 完整示例
    
    ### 首次进入空工作区
    
    检测 → **出差异清单并等用户确认(Step 0 闸门)** → 创建缺失目录 → 写入 WORKSPACE.md → 自我引导(铁律 #1/#2/#3)→ **给出 AGENTS.md 的确切 diff,经用户批准后**才接入启动规则 → 记录日志
    
    **产出:**
    ```
    根目录/
    ├── projects/
    ├── tasks/
    ├── outputs/
    │   ├── images/
    │   └── docs/
    ├── knowledge/
    ├── scripts/
    ├── memory/
    │   └── YYYY-MM-DD.md    ← 初始化日志
    ├── tmp/
    ├── WORKSPACE.md          ← 持久化规范文件
    ├── SOUL.md
    ├── USER.md
    └── ...其他系统配置
    ```
    
    ### 重启后新智能体进入同一工作区
    
    新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → **什么都不做**(跳过 Step 2-5)→ 回一句「工作区已符合规范」即可。
    
    **重启时依赖 WORKSPACE.md(目录规范)和 AGENTS.md(配置修改规范)作为持久化规范来源**,而不是依赖 SKILL.md(技能可能不在新智能体的技能列表中)。
    
    > 注:这两份规范都是**用户资产**——本技能提交的是「文本 + 建议」,是否落地由用户决定;本技能不安装常驻机制,也不在用户不知情时改动它们。
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/dtsola-xiaoyaoclaw-workspace-initializer.md

// REPO STATS

4 stars
0 open issues
Last commit: 1mo ago