{"id":"9fc2f0a6-a536-4c9d-983b-20c00b7b31d3","entityType":"agent","slug":"clawhub-dtsola-xiaoyaoclaw-workspace-initializer","name":"OpenClaw Workspace Initializer","canonicalUrl":"https://www.xpersona.co/agent/clawhub-dtsola-xiaoyaoclaw-workspace-initializer","canonicalPath":"/agent/clawhub-dtsola-xiaoyaoclaw-workspace-initializer","generatedAt":"2026-10-11T22:56:55.701Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:39:20.915Z","emptyReason":null},"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 并明确同意，不擅自改写。","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s174gzbbbyab1ahh0pf7tmgepn8afw1v:xiaoyaoclaw-workspace-initializer","sourceUrl":"https://clawhub.ai/dtsola/xiaoyaoclaw-workspace-initializer","homepage":"https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/dtsola/xiaoyaoclaw-workspace-initializer","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"OpenClaw Workspace Initializer technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:39:20.915Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:39:20.915Z","emptyReason":null},"stars":null,"forks":null,"downloads":1008,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.8","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:39:20.846Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T18:39:20.915Z","lastCrawledAt":"2026-10-11T18:39:20.846Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T18:39:20.846Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.8","createdAt":"2026-09-28T10:05:05.700Z","changelog":"v1.0.8 - brand promo link updated to https://www.xiaoyaosai.com/ (docs-only change: SKILL.md bilingual promo line; no behavior change).","fileCount":13,"zipByteSize":542322},{"version":"1.0.7","createdAt":"2026-09-25T02:55:32.942Z","changelog":"Docs only: replaced the XiaoyaoClaw promo line in SKILL.md with a bilingual XiaoyaoAI promo block (Chinese + English, project.xiaoyaosai.com). No functional, script, or metadata changes.","fileCount":13,"zipByteSize":542267},{"version":"1.0.6","createdAt":"2026-09-17T03:36:25.480Z","changelog":"Security review fixes (5 findings). Approval gates: a Step 0 dry-run now lists what is missing, what will be created, what will not be touched and what needs separate approval, and waits for confirmation before any write. AGENTS.md, WORKSPACE.md, SOUL.md and USER.md are treated as user-owned assets - rule persistence into AGENTS.md is propose-only by default, with the exact diff shown and the effect on future sessions stated, written only after explicit approval. Scope limits: the former path-conflict arbitration is now a file-placement convention limited to where this workspace's own output goes; a skill's safety rules, licence and workflow stay authoritative, output paths are mapped rather than overridden, skills that must write outside the workspace are honoured, and unresolvable conflicts return to the user. Activation narrowed to an explicit initialise/repair request in a confirmed workspace root, with exclusions for existing project structures, competing conventions, passive questions and already-compliant workspaces. Docs aligned across README (zh/en) and both templates; repo-side notes are excluded from the published bundle.","fileCount":13,"zipByteSize":542589},{"version":"1.0.5","createdAt":"2026-09-01T08:56:17.083Z","changelog":"- Removed the sample file skill-card.md. - Minor documentation update in SKILL.md, including mention of the sister project xiaoyaoclaw-memory-distill and expanded system directory notes. - No functional or behavioral changes to the skill logic.","fileCount":5,"zipByteSize":6633},{"version":"1.0.4","createdAt":"2026-08-25T06:35:17.812Z","changelog":"- Renamed the skill from \"openclaw-workspace-initializer\" to \"xiaoyaoclaw-workspace-initializer\". - Updated documentation links and log messages to reflect the new skill name and repository. - Removed the sample file \"skill-card.md\". - No changes to core initialization logic or workflow.","fileCount":5,"zipByteSize":6383},{"version":"1.0.3","createdAt":"2026-08-24T09:25:31.894Z","changelog":"- Removed the sample file skill-card.md from the repository. - No functional or behavior changes; only a documentation/sample asset was deleted.","fileCount":5,"zipByteSize":6508},{"version":"1.0.2","createdAt":"2026-08-21T04:00:18.273Z","changelog":"- Added section on handling output path conflicts between skills and workspace directory rules, with arbitration principles for path management. - Clarified that WORKSPACE.md is the single authoritative source for path specifications and output locations. - Stated that agents must translate skill-specified paths to fit workspace conventions and report any differences to the user. - Removed the skill-card.md file; no changes to core workflow or functionality.","fileCount":5,"zipByteSize":6450},{"version":"1.0.1","createdAt":"2026-08-20T05:26:58.448Z","changelog":"- Added templates/AGENTS-config-safety.md to provide configuration safety guidelines. - Added templates/WORKSPACE.md as a standard workspace directory rules template. - Removed deprecated or redundant skill-card.md. - No functional changes; this update standardizes documentation and templates for easier workspace setup and safer multi-agent configuration.","fileCount":5,"zipByteSize":5826}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s174gzbbbyab1ahh0pf7tmgepn8afw1v:xiaoyaoclaw-workspace-initializer","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s174gzbbbyab1ahh0pf7tmgepn8afw1v:xiaoyaoclaw-workspace-initializer` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/dtsola/xiaoyaoclaw-workspace-initializer before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T22:56:55.696Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-dtsola-xiaoyaoclaw-workspace-initializer/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T18:39:20.915Z","emptyReason":null},"readme":"Skill: OpenClaw Workspace Initializer\n\nOwner: dtsola\n\nSummary: 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 并明确同意，不擅自改写。\n\nTags: latest:1.0.8\n\nVersion history:\n\nv1.0.8 | 2026-09-28T10:05:05.700Z | user\n\nv1.0.8 - brand promo link updated to https://www.xiaoyaosai.com/ (docs-only change: SKILL.md bilingual promo line; no behavior change).\n\nv1.0.7 | 2026-09-25T02:55:32.942Z | user\n\nDocs only: replaced the XiaoyaoClaw promo line in SKILL.md with a bilingual XiaoyaoAI promo block (Chinese + English, project.xiaoyaosai.com). No functional, script, or metadata changes.\n\nv1.0.6 | 2026-09-17T03:36:25.480Z | user\n\nSecurity review fixes (5 findings). Approval gates: a Step 0 dry-run now lists what is missing, what will be created, what will not be touched and what needs separate approval, and waits for confirmation before any write. AGENTS.md, WORKSPACE.md, SOUL.md and USER.md are treated as user-owned assets - rule persistence into AGENTS.md is propose-only by default, with the exact diff shown and the effect on future sessions stated, written only after explicit approval. Scope limits: the former path-conflict arbitration is now a file-placement convention limited to where this workspace's own output goes; a skill's safety rules, licence and workflow stay authoritative, output paths are mapped rather than overridden, skills that must write outside the workspace are honoured, and unresolvable conflicts return to the user. Activation narrowed to an explicit initialise/repair request in a confirmed workspace root, with exclusions for existing project structures, competing conventions, passive questions and already-compliant workspaces. Docs aligned across README (zh/en) and both templates; repo-side notes are excluded from the published bundle.\n\nv1.0.5 | 2026-09-01T08:56:17.083Z | user\n\n- Removed the sample file skill-card.md.\n- Minor documentation update in SKILL.md, including mention of the sister project xiaoyaoclaw-memory-distill and expanded system directory notes.\n- No functional or behavioral changes to the skill logic.\n\nv1.0.4 | 2026-08-25T06:35:17.812Z | user\n\n- Renamed the skill from \"openclaw-workspace-initializer\" to \"xiaoyaoclaw-workspace-initializer\".\n- Updated documentation links and log messages to reflect the new skill name and repository.\n- Removed the sample file \"skill-card.md\".\n- No changes to core initialization logic or workflow.\n\nv1.0.3 | 2026-08-24T09:25:31.894Z | user\n\n- Removed the sample file skill-card.md from the repository.\n- No functional or behavior changes; only a documentation/sample asset was deleted.\n\nv1.0.2 | 2026-08-21T04:00:18.273Z | user\n\n- Added section on handling output path conflicts between skills and workspace directory rules, with arbitration principles for path management.\n- Clarified that WORKSPACE.md is the single authoritative source for path specifications and output locations.\n- Stated that agents must translate skill-specified paths to fit workspace conventions and report any differences to the user.\n- Removed the skill-card.md file; no changes to core workflow or functionality.\n\nv1.0.1 | 2026-08-20T05:26:58.448Z | user\n\n- Added templates/AGENTS-config-safety.md to provide configuration safety guidelines.\n- Added templates/WORKSPACE.md as a standard workspace directory rules template.\n- Removed deprecated or redundant skill-card.md.\n- No functional changes; this update standardizes documentation and templates for easier workspace setup and safer multi-agent configuration.\n\nv1.0.0 | 2026-08-18T11:48:25.147Z | user\n\nInitial release of openclaw-workspace-initializer.\n\n- Provides OpenClaw workspace initialization and standardization for agents.\n- Sets up standard directory structure (projects, tasks, outputs, knowledge, scripts, memory, tmp).\n- Ensures presence of WORKSPACE.md directory management rules and multi-agent config safety.\n- Guides new agents to follow workspace conventions and configuration safety rules.\n- Supports initialization logging and AGENTS.md updates if present.\n\nv0.1.1 | 2026-08-18T11:46:42.352Z | user\n\n- Removed 10 files, including documentation (.gitignore, LICENSE, README.md), assets (quickstart step images), and templates (AGENTS-config-safety.md, WORKSPACE.md).\n- All quickstart image assets and related documentation are now referenced via an external GitHub repository instead of being included in the skill.\n- Updated SKILL.md to point users and agents to the official GitHub repository for complete documentation and guides.\n- Core functionality and workflow remain unchanged; only bundled resource files and in-repo docs were removed.\n\nv0.1.0 | 2026-08-18T11:32:37.960Z | auto\n\nopenclaw-workspace-initializer v0.1.0\n\n- Initial release.\n- Detects and creates missing standard workspace directories and WORKSPACE.md.\n- Provides multi-agent config safety: requires config.patch, forbids config.apply.\n- Writes workspace rules and config conventions into AGENTS.md when present.\n- Logs initialization in memory/YYYY-MM-DD.md for audit and traceability.\n\nArchive index:\n\nArchive v1.0.8: 13 files, 542322 bytes\n\nFiles: assets/quickstart-step1-new-agent.png (154145b), assets/quickstart-step2-init-workspace.png (242264b), assets/quickstart-step3-workspace-ready.png (64466b), assets/readme/community-qr.png (97430b), assets/readme/hero.svg (3908b), LICENSE (1063b), README.en.md (7851b), README.md (7670b), skill-card.md (1801b), SKILL.md (11042b), templates/AGENTS-config-safety.md (789b), templates/WORKSPACE.md (2807b), _meta.json (152b)\n\nFile v1.0.8:SKILL.md\n\n---\nname: xiaoyaoclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. Activate only after the user explicitly asks to initialize or repair\n  this workspace, and only in a workspace root the user names as such. Do NOT\n  activate in a repository that already has its own structure or an alternative\n  workspace convention, and never rewrite the user's existing governance files\n  (AGENTS.md / WORKSPACE.md / SOUL.md / USER.md) without showing the exact diff\n  and getting explicit approval first.\n  中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。仅在用户明确要求\n  初始化/修复本工作区、且确认这是工作区根目录时使用；已有项目结构或已存在其他\n  工作区规范的仓库不触发；AGENTS.md / WORKSPACE.md / SOUL.md / USER.md 属用户\n  资产，未经用户看到确切 diff 并明确同意，不擅自改写。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n> 🚀 **小遥AI：「让每个人的数字生活，都有一座自己说了算的小遥」：<https://www.xiaoyaosai.com/>**\n> 🚀 **XiaoyaoAI：「For every digital life,Everyone has aXiaoyao of their own」：<https://www.xiaoyaosai.com/>**\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n> 🧩 **姊妹项目：** 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）——把对话蒸馏成结构化记忆（MEMORY.md + 每日日志），解决上下文溢出，缺失时自动首次建忆：<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\n\n## 激活边界（避免误触发 / 越权改动）\n\n**只在下面两种情况进入工作流：**\n\n1. 用户**明确要求**初始化 / 修复本工作区（「初始化一下工作区」「补上缺的目录和规范」）；或\n2. 智能体发现当前根目录**确实缺少**标准目录或 `WORKSPACE.md`，**且**用户当轮的任务本来就要在该目录下落文件。\n\n**以下情况不要激活、不要改动任何东西：**\n\n- 仓库里已经有自己的目录结构与规范（例如已有 `src/`、`docs/`、`apps/` 等工程约定）；\n- 已存在其他工作区规范（别的 `WORKSPACE.md` / `.cursor/rules/` / 团队规范）——先问用户以哪套为准；\n- 用户只是在提问、讨论、看代码，或没有要求结构化改造；\n- 工作区已经合规（此时**什么都不做**，只回一句「已符合规范」，不产生任何写入）。\n\n**不可越界的三条：**\n\n- **不覆盖已有文件**：只创建缺失项，已存在的目录/文件一律跳过。\n- **用户资产只提议、不擅自改**：`AGENTS.md`、`WORKSPACE.md`、`SOUL.md`、`USER.md` 等治理与配置类文件，改前必须展示**确切 diff** 并取得用户明确同意。\n- **不装常驻机制**：不建 cron、不起守护进程、不写启动脚本、不写跨会话状态文件；本技能只在用户批准的那一轮里做文件改动。\n\n## 工作流\n\n### Step 0: 先出差异清单，默认 dry-run（改动前必须过的闸门）\n\n在任何写入之前，先给用户一份**差异清单**，并停下来等确认：\n\n```text\n检测结果（只读）\n  缺失目录：memory/  tmp/\n  缺失文件：WORKSPACE.md\n  将创建：  4 个目录 + 1 个文件（内容：标准目录规范模板）\n  不会触碰：已存在的 projects/ tasks/ knowledge/ scripts/ outputs/\n  需要单独批准：AGENTS.md 的启动读取规则（会改变未来会话的启动行为）\n```\n\n用户确认后再进入 Step 2；用户没确认就**不改任何东西**。\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n- `.clawhub/`\n\n### Step 2: 创建缺失的目录结构（用户确认后执行）\n\n逐项创建**缺失**目录（已存在的一律跳过，绝不删除/覆盖）：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md（仅当不存在时）\n\n如果根目录**没有** `WORKSPACE.md`：读取本 skill 的 `templates/WORKSPACE.md`，把**将要写入的完整内容**给用户过一遍（或展示 diff）再写入。\n**如果已存在则不覆盖**——需要修改时按「用户资产」处理：先给 diff，得到明确同意再改。\n\n## 文件放置约定（只管「产出放哪」，不覆盖技能指令）\n\n**适用范围严格限定**：本节只决定**本工作区自己产出的文件放在哪里**，它**不是对其他技能的指令覆盖**。\n\n**优先级（从高到低）：**\n\n1. **用户当轮的明确要求** — 用户说放哪就放哪\n2. **其他技能的安全规则、许可条款、既定流程** — 一律优先，本文件不得改写、不得要求技能绕过\n3. **本文件（WORKSPACE.md）的目录规范** — 仅在「上面两条没规定产出位置」时生效\n\n**做法：**\n\n- 技能若自带输出路径约定（如 `~/Downloads/xxx/`），把它的**产出位置**映射到工作区内并**告知用户差异**（「技能原约定 X，按工作区规范存到 Y」）；映射只涉及存放位置，不涉及技能内容与流程。\n- 若技能**必须**写在工作区之外（例如它自己的数据目录、系统约定位置），**以技能为准**，如实汇报，不硬拉进工作区。\n- 遇到无法用「换个位置」解决的冲突（例如技能要求改工作区外的配置）→ **停下来问用户**，不做单方面决定。\n\n**设计原则：** 本文件只管「文件放哪」，不管「技能怎么做」。自研技能不硬编码工作目录，输出位置默认由 WORKSPACE.md 决定。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 把工作区规范接入 AGENTS.md（**默认只提议，需明确批准**）\n\n⚠️ **为什么这一步要单独批准**：`AGENTS.md` 会被 agent 在**每次会话启动时读取**，改它等于改变未来的行为——属于「用户资产」，不是普通输出文件。因此：\n\n- **默认不动手**：先给出**确切 diff**（新增哪几行、插在哪个章节），并明确提示「这会让未来每次会话启动都先读 WORKSPACE.md」，**得到用户明确同意后**才写入。\n- 用户不同意 / 没回应 → **跳过**，在汇报里写「AGENTS.md 未改动（待你确认）」。\n- 不追加与本次初始化无关的内容；不覆盖用户已有的启动规则，只做**最小必要新增**。\n\n批准后要做的两项（若 `AGENTS.md` 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志（随同一轮批准一起做）\n\n在本工作区自己的 `memory/YYYY-MM-DD.md` 追加一条初始化记录（只写 Memory 目录内，不写到别处；如果用户没批准本轮改动，就不写）：\n\n> xiaoyaoclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → **出差异清单并等用户确认（Step 0 闸门）** → 创建缺失目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ **给出 AGENTS.md 的确切 diff，经用户批准后**才接入启动规则 → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → **什么都不做**（跳过 Step 2-5）→ 回一句「工作区已符合规范」即可。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\n> 注：这两份规范都是**用户资产**——本技能提交的是「文本 + 建议」，是否落地由用户决定；本技能不安装常驻机制，也不在用户不知情时改动它们。\n\nFile v1.0.8:README.md\n\n# OpenClaw Workspace Initializer 🏠\r\n\r\n<div align=\"center\">\r\n  <strong>🇨🇳 中文</strong> | <a href=\"README.en.md\">🌐 English</a>\r\n</div>\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> 给每个 OpenClaw agent 一个「家」：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## 为什么需要它\r\n\r\nOpenClaw agent 每次会话都是全新启动。没有工作区规范，你的 agent 会：\r\n- ❌ 把文件乱扔在根目录，越攒越乱\r\n- ❌ 忘记自己的记忆系统（`memory/`），每次醒来都失忆\r\n- ❌ 在多 agent 共享配置时，用 `config.apply` 整份覆盖 openclaw.json，**抹掉其他 agent 的修改**\r\n\r\n这个 skill 一次性解决：**目录结构 + 持久化规范 + 配置安全**。\r\n\r\n## 特性\r\n\r\n- 🗂️ 标准目录结构：`projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md 规范：重启后依然生效的目录管理规则（**用户资产** —— 内容先给你过目，已存在则不覆盖）\r\n- 🛡️ 多 agent 配置安全：只用 `config.patch`，禁止 `config.apply` 覆盖他人修改\r\n- ⚖️ **文件放置统一**：其他技能约定与 WORKSPACE.md 冲突的**输出路径**，由执行 agent 映射进工作区并注明差异（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`）——但技能自身的安全规则、许可与流程优先，不覆盖、不要求技能绕过；换位置解决不了的冲突会先问你\r\n\r\n## 安装\r\n\r\n```bash\r\n# ClawHub（推荐）\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# 或从 GitHub 手动安装\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# 把 SKILL.md 和 templates/ 放到你的 skills 目录\r\n```\r\n\r\n## 使用\r\n\r\n1. 把 skill 放到 OpenClaw 的 skills 目录\r\n2. 首次进入（或重置）一个工作区时，agent 会自动：\r\n   - 创建 `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - 写入 `WORKSPACE.md` 目录规范（重启后依然生效）\r\n   - 检测多 agent 场景，把「config.patch ✅ / config.apply ❌」安全规范持久化进 `AGENTS.md`\r\n   - 在 `memory/` 记录初始化日志\r\n\r\n## 🚀 快速上手（三步，10 分钟）\r\n\r\n以飞书 Bot 接入为例，三步让你的 agent 拥有一个规范的家：\r\n\r\n### Step 1：接入你的 agent\r\n\r\n新建一个智能体并接入（飞书 Bot / 微信 / Telegram 等均可），和它完成身份确认——起名字、确定称呼、划定职责范围：\r\n\r\n![Step 1 - 全新 agent 接入](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2：一句话触发初始化\r\n\r\n对你的 agent 说：\r\n\r\n> 初始化你的工作目录，使用 xiaoyaoclaw-workspace-initializer\r\n\r\nagent 会**先给差异清单等你确认**（将创建什么 / 不会动什么），确认后再执行：建缺失目录 → 写入 `WORKSPACE.md` → 把「Read WORKSPACE.md」启动规则与配置安全规范作为**建议补丁**给你过目（`AGENTS.md` 影响未来每次会话启动，需单独同意）→ 记录初始化日志：\r\n\r\n![Step 2 - 执行初始化](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3：验收成果\r\n\r\n打开 agent 的工作区目录（Windows 资源管理器示例），标准结构已就位：\r\n\r\n![Step 3 - 初始化完成](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 之后每次会话，agent 都会先读 `WORKSPACE.md` 再干活——目录不乱、记忆不丢、配置不打架。\r\n\r\n## 与其他方案的区别\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| 目录结构 | 基础模板 | 完整规范体系（7 目录 + 命名规范 + 行为规则） |\r\n| 持久化规范 | 无 WORKSPACE.md 规范 | ✅ WORKSPACE.md 重启后持续生效 |\r\n| 多 agent 配置安全 | ❌ | ✅ config.patch / 禁 config.apply（实战踩坑沉淀） |\r\n| 模板独立 | 内嵌 | ✅ templates/ 可单独复用 |\r\n\r\n**实战验证**：本规范来自 7 个 agent 共享单份 openclaw.json 的真实生产环境，`config.apply` 覆盖事故（openclaw.json.bak* 痕迹）是血泪教训。\r\n\r\n## 💬 加入交流群\r\n\r\n小遥全系产品用户交流群——产品反馈 · 使用交流 · 功能建议：\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/community-qr.png\" width=\"280\" alt=\"小遥AI 用户交流群二维码：扫码加群，或添加微信 dtsola（备注：加群）\">\r\n</p>\r\n\r\n<p align=\"center\">扫码加群，或添加微信 <code>dtsola</code>（备注：<b>加群</b>）</p>\r\n\r\n## 姊妹项目\r\n\r\n- 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）：把对话蒸馏成结构化记忆——根目录 MEMORY.md + memory/ 每日日志，解决上下文溢出；MEMORY.md 缺失时自动从历史日志「首次建忆」。<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n- 📚 **xiaoyaoclaw-kb-retriever**（知识库检索器）：本地知识库检索——分层 data_structure.md 索引导航 + 渐进式检索（md/pdf/xlsx），零依赖零 API key，Windows / macOS 双平台。<https://github.com/dtsola/xiaoyaoclaw-kb-retriever>\r\n- 🩹 **xiaoyaoclaw-workspace-auditor**：工作区体检（只读审计），5 类检查 + 分级报告 + 修复建议，零依赖脚本永不改文件。<https://github.com/dtsola/xiaoyaoclaw-workspace-auditor>\r\n- 🗂️ **xiaoyaoclaw-task-progress-tracker**（任务进度跟踪器）：目录即容器，PROGRESS.md 即进度——tasks/ 与 projects/ 生命周期管理（状态 + 进度日志 + 文档索引）。<https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker>\r\n- 📎 **xiaoyaoclaw-web-clipper**（网页剪藏）：把任意网页保存为带 frontmatter 的本地 Markdown——双引擎正文提取（readability + trafilatura 降级链）、中文文件名安全、批量剪藏 + 去重；输出直通 knowledge/clippings/，配合 kb-retriever 建索引即可检索。<https://github.com/dtsola/xiaoyaoclaw-web-clipper>\r\n- 🤝 **xiaoyaoclaw-agent-orchestrator**（Agent 协作编排，**协作层**）：架在生态之上——拆任务、分 agent、管进度、聚结果、失败重试。<https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator>\r\n- 📊 **xiaoyaoclaw-usage-report**（用量报告）：解析 session JSONL，回答「每次 agent 任务花了多久、用了哪些工具/技能/模型、消耗了多少 token」——零依赖纯本地，token 为主指标。<https://github.com/dtsola/xiaoyaoclaw-usage-report>\r\n- 🎛️ **xiaoyaoclaw-commander**（跨工具指挥官，**指挥层**）：让任意支持 Agent Skills 的工具（Claude Code / Codex / OpenCode / Trae / DSH）指挥小遥Claw / OpenClaw 多 agent 系统。<https://github.com/dtsola/xiaoyaoclaw-commander>\r\n- 🔍 **xiaoyaoclaw-seo-skill**（SEO 技能）：网站搜索可见性分析与优化——audit（技术SEO）/page（页面）/content（内容质量）/schema（结构化数据）/geo（AI搜索优化）五流程 + 零依赖审计脚本，跨工具通用。<https://github.com/dtsola/xiaoyaoclaw-seo-skill>\r\n\r\n##\n\nFile v1.0.8:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1790589905700\n}\n\nFile v1.0.8:README.en.md\n\n# OpenClaw Workspace Initializer 🏠\r\n\r\n> Give every OpenClaw agent a home: standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> Give every OpenClaw agent a \"home\": standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## Why you need it\r\n\r\nEvery OpenClaw agent session starts fresh. Without workspace conventions, your agent will:\r\n- ❌ Scatter files around the root directory, messier every day\r\n- ❌ Forget its own memory system (`memory/`), waking up amnesiac every session\r\n- ❌ In multi-agent shared config setups, use `config.apply` to overwrite the whole `openclaw.json`, **wiping out other agents' changes**\r\n\r\nThis skill solves it all in one go: **directory structure + persistent rules + config safety**.\r\n\r\n## Features\r\n\r\n- 🗂️ Standard directory structure: `projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md rules: directory conventions that survive restarts — **yours to own**; the skill shows the content first and never overwrites an existing file\r\n- 🛡️ Multi-agent config safety: `config.patch` only — `config.apply` is forbidden to avoid overwriting others' changes\r\n- ⚖️ **Unified file placement**: when another skill's output path clashes with WORKSPACE.md, the executing agent maps the output into the workspace and notes the difference (e.g. `~/Downloads/research/<topic>` → `tasks/<topic>/`) — while the skill's own safety rules, licence and workflow stay authoritative, and unresolvable conflicts go back to you.\r\n\r\n## Install\r\n\r\n```bash\r\n# From ClawHub (recommended)\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# Or manually from GitHub\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# Put SKILL.md and templates/ into your skills directory\r\n```\r\n\r\n## Usage\r\n\r\n1. Put the skill in your OpenClaw skills directory\r\n2. When entering (or resetting) a workspace, your agent will automatically:\r\n   - Create `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - Write the `WORKSPACE.md` directory rules (only if missing; you approve the content first)\r\n   - Detect multi-agent setups and propose the \"config.patch ✅ / config.apply ❌\" rules for `AGENTS.md` (diff first, written only with your approval)\r\n   - Log the initialization into `memory/`\r\n\r\n## 🚀 Quick Start (3 steps, 10 minutes)\r\n\r\nUsing a Feishu bot as an example — three steps to give your agent a well-organized home:\r\n\r\n### Step 1: Onboard your agent\r\n\r\nCreate a new agent and connect it (Feishu Bot / WeChat / Telegram, etc.), then confirm its identity — name, how to address it, scope of responsibilities:\r\n\r\n![Step 1 - new agent onboarded](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2: Trigger initialization with one phrase\r\n\r\nTell your agent:\r\n\r\n> Initialize your workspace using xiaoyaoclaw-workspace-initializer\r\n\r\nIt will first show a diff list and wait for your confirmation (what will be created, what will not be touched). After that: create the missing directories → write `WORKSPACE.md` → propose the \"Read WORKSPACE.md\" startup rule and the config-safety rules as a patch for your approval before touching `AGENTS.md` → log the initialization:\r\n\r\n![Step 2 - running initialization](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3: Verify the result\r\n\r\nOpen your agent's workspace directory (Windows Explorer example) — the standard structure is in place:\r\n\r\n![Step 3 - workspace ready](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 From now on, your agent reads `WORKSPACE.md` at every session start — no messy directories, no lost memory, no config conflicts.\r\n\r\n## How it compares\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| Directory structure | basic template | complete convention system (7 dirs + naming rules + behavior rules) |\r\n| Persistent rules | no WORKSPACE.md | ✅ WORKSPACE.md survives restarts |\r\n| Multi-agent config safety | ❌ | ✅ config.patch / no config.apply (learned from real incidents) |\r\n| Standalone templates | embedded | ✅ templates/ reusable separately |\r\n\r\n**Proven in production**: these conventions come from a real environment where 7 agents share a single `openclaw.json`; the `config.apply` overwrite incident (`openclaw.json.bak*` traces) was a costly lesson.\r\n\r\n## 💬 Join the community\r\n\r\nXiaoyao product family user group — feedback · exchange · suggestions:\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/community-qr.png\" width=\"280\" alt=\"XiaoyaoAI user group QR: scan to join, or add WeChat dtsola (note: 加群)\">\r\n</p>\r\n\r\n<p align=\"center\">Scan to join, or add WeChat <code>dtsola</code> (note: <b>加群</b>)</p>\r\n\r\n## Sister projects\r\n\r\n- 🧠 **xiaoyaoclaw-memory-distill** (memory distill): distill conversations into structured memory — root `MEMORY.md` + `memory/` daily logs, solving context overflow; auto-builds MEMORY.md from history logs when missing. <https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n- 📚 **xiaoyaoclaw-kb-retriever** (knowledge base retriever): local KB retrieval — hierarchical data_structure.md index navigation + progressive retrieval over md/pdf/xlsx, zero dependencies, Windows & macOS ready. <https://github.com/dtsola/xiaoyaoclaw-kb-retriever>\r\n- 🩹 **xiaoyaoclaw-workspace-auditor**: read-only workspace health check — 5 categories, graded report with fix suggestions, zero-dependency, never modifies files. <https://github.com/dtsola/xiaoyaoclaw-workspace-auditor>\r\n- 🗂️ **xiaoyaoclaw-task-progress-tracker** (task progress tracker): directory as container, PROGRESS.md as progress — lifecycle management for tasks/ and projects/ (status + progress log + document index). <https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker>\r\n- 📎 **xiaoyaoclaw-web-clipper**: save any web page as clean local Markdown with frontmatter — dual-engine extraction (readability + trafilatura fallback), Chinese-safe filenames, batch clipping with dedup; output lands in knowledge/clippings/ ready for kb-retriever indexing. <https://github.com/dtsola/xiaoyaoclaw-web-clipper>\r\n- 🤝 **xiaoyaoclaw-agent-orchestrator** (collaboration layer): on top of the ecosystem — split, dispatch, track, aggregate, retry.<https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator>\r\n- 📊 **xiaoyaoclaw-usage-report**: parse session JSONL to answer how long each task took, which tools/skills/models were used, and how many tokens were consumed — zero dependency, local only, token is the primary metric. <https://github.com/dtsola/xiaoyaoclaw-usage-report>\r\n- 🎛️ **xiaoyaoclaw-commander** (cross-tool commander, **command layer**): command your XiaoyaoClaw/OpenClaw multi-agent system from any Agent Skills tool (Claude Code / Codex / OpenCode / Trae / DSH). <https://github.com/dtsola/xiaoyaoclaw-commander>\r\n- 🔍 **xiaoyaoclaw-seo-skill** (SEO skill): analyze & optimize website search visibility — audit (technical SEO) / page / content / schema / geo (AI search, AEO/GEO) workflows + zero-dependency audit script, cross-tool ready. <https://github.com/dtsola/xiaoyaoclaw-seo-skill>\r\n\r\n##\n\nFile v1.0.8:skill-card.md\n\n## Description:\n\nInitializes an approved OpenClaw workspace with standard directories, workspace rules, and guidance for safe multi-agent configuration changes.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nOpenClaw users and agent developers use this skill to organize a user-approved workspace, add persistent directory conventions, and propose safe configuration rules without overwriting existing governance files.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Changes to WORKSPACE.md or AGENTS.md can steer future agent behavior in the workspace.\n\nMitigation: Review the dry-run and exact file diffs before approval; do not change existing governance files without explicit consent.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Workspace rules template](templates/WORKSPACE.md)\n- [Agent configuration safety template](templates/AGENTS-config-safety.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration guidance, Files]\n\n**Output Format:** [Markdown guidance, proposed diffs, and approved local workspace files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Presents a dry-run before changes and requires explicit approval for workspace rules or agent startup instructions.]\n\n## Skill Version(s):\n\n1.0.8 (source: server-resolved ClawHub release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.8:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\r\n\r\n> 本段是**待用户批准的提议文本**：把它写进 `AGENTS.md` 会改变未来会话的配置操作方式，因此需先给 diff、经用户同意再落地。\r\n\r\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\r\n\r\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\r\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\r\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\r\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.8:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\r\n\r\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\r\n\r\n> **本文件的归属与边界**：这是**用户维护**的工作区约定，智能体只能提议修改、不能擅自改写。\r\n> 它只决定**本工作区产出的文件放在哪里**，不是对其他技能的指令覆盖 —— 技能自身的安全规则、许可条款与既定流程一律优先；解决不了的冲突停下来问用户。\r\n\r\n## 目录结构\r\n\r\n| 目录 | 用途 | 生命周期 |\r\n|------|------|---------|\r\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\r\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\r\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\r\n| `knowledge/` | 知识库 | 永久 |\r\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\r\n| `memory/` | 日常日志 | 永久 |\r\n| `tmp/` | 临时缓存 | 手动清理 |\r\n| `.openclaw/`, `agent/`, `sessions/`, `.clawhub/` | 系统目录，不要手动修改或删除 | 永久 |\r\n\r\n## 命名规范\r\n\r\n| 场景 | 规则 | 例子 |\r\n|------|------|------|\r\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\r\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\r\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\r\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\r\n\r\n## 行为规则\r\n\r\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\r\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\r\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\r\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\r\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\r\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\r\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\r\n8. **tmp 清理** → 只在用户要求时手动清理\r\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/`、`.clawhub/` 不要手动修改或删除\r\n10. **文件放置约定** → 其他技能约定的**输出路径**与本文件冲突时，把产出位置映射到工作区并**注明差异**（技能原约定 X → 存到 Y）；\r\n    但技能的安全规则、许可条款、既定流程**优先于本文件**，不得以本文件为由要求技能绕过；技能必须在工作区外写入时以技能为准；无法靠换位置解决的冲突 → 问用户，不单方面决定\n\nFile v1.0.8:LICENSE\n\nMIT License\n\nCopyright (c) 2026 dtsola\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v1.0.7: 13 files, 542267 bytes\n\nFiles: assets/quickstart-step1-new-agent.png (154145b), assets/quickstart-step2-init-workspace.png (242264b), assets/quickstart-step3-workspace-ready.png (64466b), assets/readme/community-qr.png (97430b), assets/readme/hero.svg (3908b), LICENSE (1063b), README.en.md (7851b), README.md (7670b), skill-card.md (1685b), SKILL.md (11050b), templates/AGENTS-config-safety.md (789b), templates/WORKSPACE.md (2807b), _meta.json (152b)\n\nFile v1.0.7:SKILL.md\n\n---\nname: xiaoyaoclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. Activate only after the user explicitly asks to initialize or repair\n  this workspace, and only in a workspace root the user names as such. Do NOT\n  activate in a repository that already has its own structure or an alternative\n  workspace convention, and never rewrite the user's existing governance files\n  (AGENTS.md / WORKSPACE.md / SOUL.md / USER.md) without showing the exact diff\n  and getting explicit approval first.\n  中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。仅在用户明确要求\n  初始化/修复本工作区、且确认这是工作区根目录时使用；已有项目结构或已存在其他\n  工作区规范的仓库不触发；AGENTS.md / WORKSPACE.md / SOUL.md / USER.md 属用户\n  资产，未经用户看到确切 diff 并明确同意，不擅自改写。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n> 🚀 **小遥AI：「让每个人的数字生活，都有一座自己说了算的小遥」：<https://project.xiaoyaosai.com/>**\n> 🚀 **XiaoyaoAI：「For every digital life,Everyone has aXiaoyao of their own」：<https://project.xiaoyaosai.com/>**\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n> 🧩 **姊妹项目：** 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）——把对话蒸馏成结构化记忆（MEMORY.md + 每日日志），解决上下文溢出，缺失时自动首次建忆：<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\n\n## 激活边界（避免误触发 / 越权改动）\n\n**只在下面两种情况进入工作流：**\n\n1. 用户**明确要求**初始化 / 修复本工作区（「初始化一下工作区」「补上缺的目录和规范」）；或\n2. 智能体发现当前根目录**确实缺少**标准目录或 `WORKSPACE.md`，**且**用户当轮的任务本来就要在该目录下落文件。\n\n**以下情况不要激活、不要改动任何东西：**\n\n- 仓库里已经有自己的目录结构与规范（例如已有 `src/`、`docs/`、`apps/` 等工程约定）；\n- 已存在其他工作区规范（别的 `WORKSPACE.md` / `.cursor/rules/` / 团队规范）——先问用户以哪套为准；\n- 用户只是在提问、讨论、看代码，或没有要求结构化改造；\n- 工作区已经合规（此时**什么都不做**，只回一句「已符合规范」，不产生任何写入）。\n\n**不可越界的三条：**\n\n- **不覆盖已有文件**：只创建缺失项，已存在的目录/文件一律跳过。\n- **用户资产只提议、不擅自改**：`AGENTS.md`、`WORKSPACE.md`、`SOUL.md`、`USER.md` 等治理与配置类文件，改前必须展示**确切 diff** 并取得用户明确同意。\n- **不装常驻机制**：不建 cron、不起守护进程、不写启动脚本、不写跨会话状态文件；本技能只在用户批准的那一轮里做文件改动。\n\n## 工作流\n\n### Step 0: 先出差异清单，默认 dry-run（改动前必须过的闸门）\n\n在任何写入之前，先给用户一份**差异清单**，并停下来等确认：\n\n```text\n检测结果（只读）\n  缺失目录：memory/  tmp/\n  缺失文件：WORKSPACE.md\n  将创建：  4 个目录 + 1 个文件（内容：标准目录规范模板）\n  不会触碰：已存在的 projects/ tasks/ knowledge/ scripts/ outputs/\n  需要单独批准：AGENTS.md 的启动读取规则（会改变未来会话的启动行为）\n```\n\n用户确认后再进入 Step 2；用户没确认就**不改任何东西**。\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n- `.clawhub/`\n\n### Step 2: 创建缺失的目录结构（用户确认后执行）\n\n逐项创建**缺失**目录（已存在的一律跳过，绝不删除/覆盖）：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md（仅当不存在时）\n\n如果根目录**没有** `WORKSPACE.md`：读取本 skill 的 `templates/WORKSPACE.md`，把**将要写入的完整内容**给用户过一遍（或展示 diff）再写入。\n**如果已存在则不覆盖**——需要修改时按「用户资产」处理：先给 diff，得到明确同意再改。\n\n## 文件放置约定（只管「产出放哪」，不覆盖技能指令）\n\n**适用范围严格限定**：本节只决定**本工作区自己产出的文件放在哪里**，它**不是对其他技能的指令覆盖**。\n\n**优先级（从高到低）：**\n\n1. **用户当轮的明确要求** — 用户说放哪就放哪\n2. **其他技能的安全规则、许可条款、既定流程** — 一律优先，本文件不得改写、不得要求技能绕过\n3. **本文件（WORKSPACE.md）的目录规范** — 仅在「上面两条没规定产出位置」时生效\n\n**做法：**\n\n- 技能若自带输出路径约定（如 `~/Downloads/xxx/`），把它的**产出位置**映射到工作区内并**告知用户差异**（「技能原约定 X，按工作区规范存到 Y」）；映射只涉及存放位置，不涉及技能内容与流程。\n- 若技能**必须**写在工作区之外（例如它自己的数据目录、系统约定位置），**以技能为准**，如实汇报，不硬拉进工作区。\n- 遇到无法用「换个位置」解决的冲突（例如技能要求改工作区外的配置）→ **停下来问用户**，不做单方面决定。\n\n**设计原则：** 本文件只管「文件放哪」，不管「技能怎么做」。自研技能不硬编码工作目录，输出位置默认由 WORKSPACE.md 决定。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 把工作区规范接入 AGENTS.md（**默认只提议，需明确批准**）\n\n⚠️ **为什么这一步要单独批准**：`AGENTS.md` 会被 agent 在**每次会话启动时读取**，改它等于改变未来的行为——属于「用户资产」，不是普通输出文件。因此：\n\n- **默认不动手**：先给出**确切 diff**（新增哪几行、插在哪个章节），并明确提示「这会让未来每次会话启动都先读 WORKSPACE.md」，**得到用户明确同意后**才写入。\n- 用户不同意 / 没回应 → **跳过**，在汇报里写「AGENTS.md 未改动（待你确认）」。\n- 不追加与本次初始化无关的内容；不覆盖用户已有的启动规则，只做**最小必要新增**。\n\n批准后要做的两项（若 `AGENTS.md` 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志（随同一轮批准一起做）\n\n在本工作区自己的 `memory/YYYY-MM-DD.md` 追加一条初始化记录（只写 Memory 目录内，不写到别处；如果用户没批准本轮改动，就不写）：\n\n> xiaoyaoclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → **出差异清单并等用户确认（Step 0 闸门）** → 创建缺失目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ **给出 AGENTS.md 的确切 diff，经用户批准后**才接入启动规则 → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → **什么都不做**（跳过 Step 2-5）→ 回一句「工作区已符合规范」即可。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\n> 注：这两份规范都是**用户资产**——本技能提交的是「文本 + 建议」，是否落地由用户决定；本技能不安装常驻机制，也不在用户不知情时改动它们。\n\nFile v1.0.7:README.md\n\n# OpenClaw Workspace Initializer 🏠\r\n\r\n<div align=\"center\">\r\n  <strong>🇨🇳 中文</strong> | <a href=\"README.en.md\">🌐 English</a>\r\n</div>\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> 给每个 OpenClaw agent 一个「家」：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## 为什么需要它\r\n\r\nOpenClaw agent 每次会话都是全新启动。没有工作区规范，你的 agent 会：\r\n- ❌ 把文件乱扔在根目录，越攒越乱\r\n- ❌ 忘记自己的记忆系统（`memory/`），每次醒来都失忆\r\n- ❌ 在多 agent 共享配置时，用 `config.apply` 整份覆盖 openclaw.json，**抹掉其他 agent 的修改**\r\n\r\n这个 skill 一次性解决：**目录结构 + 持久化规范 + 配置安全**。\r\n\r\n## 特性\r\n\r\n- 🗂️ 标准目录结构：`projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md 规范：重启后依然生效的目录管理规则（**用户资产** —— 内容先给你过目，已存在则不覆盖）\r\n- 🛡️ 多 agent 配置安全：只用 `config.patch`，禁止 `config.apply` 覆盖他人修改\r\n- ⚖️ **文件放置统一**：其他技能约定与 WORKSPACE.md 冲突的**输出路径**，由执行 agent 映射进工作区并注明差异（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`）——但技能自身的安全规则、许可与流程优先，不覆盖、不要求技能绕过；换位置解决不了的冲突会先问你\r\n\r\n## 安装\r\n\r\n```bash\r\n# ClawHub（推荐）\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# 或从 GitHub 手动安装\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# 把 SKILL.md 和 templates/ 放到你的 skills 目录\r\n```\r\n\r\n## 使用\r\n\r\n1. 把 skill 放到 OpenClaw 的 skills 目录\r\n2. 首次进入（或重置）一个工作区时，agent 会自动：\r\n   - 创建 `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - 写入 `WORKSPACE.md` 目录规范（重启后依然生效）\r\n   - 检测多 agent 场景，把「config.patch ✅ / config.apply ❌」安全规范持久化进 `AGENTS.md`\r\n   - 在 `memory/` 记录初始化日志\r\n\r\n## 🚀 快速上手（三步，10 分钟）\r\n\r\n以飞书 Bot 接入为例，三步让你的 agent 拥有一个规范的家：\r\n\r\n### Step 1：接入你的 agent\r\n\r\n新建一个智能体并接入（飞书 Bot / 微信 / Telegram 等均可），和它完成身份确认——起名字、确定称呼、划定职责范围：\r\n\r\n![Step 1 - 全新 agent 接入](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2：一句话触发初始化\r\n\r\n对你的 agent 说：\r\n\r\n> 初始化你的工作目录，使用 xiaoyaoclaw-workspace-initializer\r\n\r\nagent 会**先给差异清单等你确认**（将创建什么 / 不会动什么），确认后再执行：建缺失目录 → 写入 `WORKSPACE.md` → 把「Read WORKSPACE.md」启动规则与配置安全规范作为**建议补丁**给你过目（`AGENTS.md` 影响未来每次会话启动，需单独同意）→ 记录初始化日志：\r\n\r\n![Step 2 - 执行初始化](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3：验收成果\r\n\r\n打开 agent 的工作区目录（Windows 资源管理器示例），标准结构已就位：\r\n\r\n![Step 3 - 初始化完成](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 之后每次会话，agent 都会先读 `WORKSPACE.md` 再干活——目录不乱、记忆不丢、配置不打架。\r\n\r\n## 与其他方案的区别\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| 目录结构 | 基础模板 | 完整规范体系（7 目录 + 命名规范 + 行为规则） |\r\n| 持久化规范 | 无 WORKSPACE.md 规范 | ✅ WORKSPACE.md 重启后持续生效 |\r\n| 多 agent 配置安全 | ❌ | ✅ config.patch / 禁 config.apply（实战踩坑沉淀） |\r\n| 模板独立 | 内嵌 | ✅ templates/ 可单独复用 |\r\n\r\n**实战验证**：本规范来自 7 个 agent 共享单份 openclaw.json 的真实生产环境，`config.apply` 覆盖事故（openclaw.json.bak* 痕迹）是血泪教训。\r\n\r\n## 💬 加入交流群\r\n\r\n小遥全系产品用户交流群——产品反馈 · 使用交流 · 功能建议：\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/community-qr.png\" width=\"280\" alt=\"小遥AI 用户交流群二维码：扫码加群，或添加微信 dtsola（备注：加群）\">\r\n</p>\r\n\r\n<p align=\"center\">扫码加群，或添加微信 <code>dtsola</code>（备注：<b>加群</b>）</p>\r\n\r\n## 姊妹项目\r\n\r\n- 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）：把对话蒸馏成结构化记忆——根目录 MEMORY.md + memory/ 每日日志，解决上下文溢出；MEMORY.md 缺失时自动从历史日志「首次建忆」。<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n- 📚 **xiaoyaoclaw-kb-retriever**（知识库检索器）：本地知识库检索——分层 data_structure.md 索引导航 + 渐进式检索（md/pdf/xlsx），零依赖零 API key，Windows / macOS 双平台。<https://github.com/dtsola/xiaoyaoclaw-kb-retriever>\r\n- 🩹 **xiaoyaoclaw-workspace-auditor**：工作区体检（只读审计），5 类检查 + 分级报告 + 修复建议，零依赖脚本永不改文件。<https://github.com/dtsola/xiaoyaoclaw-workspace-auditor>\r\n- 🗂️ **xiaoyaoclaw-task-progress-tracker**（任务进度跟踪器）：目录即容器，PROGRESS.md 即进度——tasks/ 与 projects/ 生命周期管理（状态 + 进度日志 + 文档索引）。<https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker>\r\n- 📎 **xiaoyaoclaw-web-clipper**（网页剪藏）：把任意网页保存为带 frontmatter 的本地 Markdown——双引擎正文提取（readability + trafilatura 降级链）、中文文件名安全、批量剪藏 + 去重；输出直通 knowledge/clippings/，配合 kb-retriever 建索引即可检索。<https://github.com/dtsola/xiaoyaoclaw-web-clipper>\r\n- 🤝 **xiaoyaoclaw-agent-orchestrator**（Agent 协作编排，**协作层**）：架在生态之上——拆任务、分 agent、管进度、聚结果、失败重试。<https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator>\r\n- 📊 **xiaoyaoclaw-usage-report**（用量报告）：解析 session JSONL，回答「每次 agent 任务花了多久、用了哪些工具/技能/模型、消耗了多少 token」——零依赖纯本地，token 为主指标。<https://github.com/dtsola/xiaoyaoclaw-usage-report>\r\n- 🎛️ **xiaoyaoclaw-commander**（跨工具指挥官，**指挥层**）：让任意支持 Agent Skills 的工具（Claude Code / Codex / OpenCode / Trae / DSH）指挥小遥Claw / OpenClaw 多 agent 系统。<https://github.com/dtsola/xiaoyaoclaw-commander>\r\n- 🔍 **xiaoyaoclaw-seo-skill**（SEO 技能）：网站搜索可见性分析与优化——audit（技术SEO）/page（页面）/content（内容质量）/schema（结构化数据）/geo（AI搜索优化）五流程 + 零依赖审计脚本，跨工具通用。<https://github.com/dtsola/xiaoyaoclaw-seo-skill>\r\n\r\n##\n\nFile v1.0.7:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.7\",\n  \"publishedAt\": 1790304932942\n}\n\nFile v1.0.7:README.en.md\n\n# OpenClaw Workspace Initializer 🏠\r\n\r\n> Give every OpenClaw agent a home: standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> Give every OpenClaw agent a \"home\": standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## Why you need it\r\n\r\nEvery OpenClaw agent session starts fresh. Without workspace conventions, your agent will:\r\n- ❌ Scatter files around the root directory, messier every day\r\n- ❌ Forget its own memory system (`memory/`), waking up amnesiac every session\r\n- ❌ In multi-agent shared config setups, use `config.apply` to overwrite the whole `openclaw.json`, **wiping out other agents' changes**\r\n\r\nThis skill solves it all in one go: **directory structure + persistent rules + config safety**.\r\n\r\n## Features\r\n\r\n- 🗂️ Standard directory structure: `projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md rules: directory conventions that survive restarts — **yours to own**; the skill shows the content first and never overwrites an existing file\r\n- 🛡️ Multi-agent config safety: `config.patch` only — `config.apply` is forbidden to avoid overwriting others' changes\r\n- ⚖️ **Unified file placement**: when another skill's output path clashes with WORKSPACE.md, the executing agent maps the output into the workspace and notes the difference (e.g. `~/Downloads/research/<topic>` → `tasks/<topic>/`) — while the skill's own safety rules, licence and workflow stay authoritative, and unresolvable conflicts go back to you.\r\n\r\n## Install\r\n\r\n```bash\r\n# From ClawHub (recommended)\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# Or manually from GitHub\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# Put SKILL.md and templates/ into your skills directory\r\n```\r\n\r\n## Usage\r\n\r\n1. Put the skill in your OpenClaw skills directory\r\n2. When entering (or resetting) a workspace, your agent will automatically:\r\n   - Create `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - Write the `WORKSPACE.md` directory rules (only if missing; you approve the content first)\r\n   - Detect multi-agent setups and propose the \"config.patch ✅ / config.apply ❌\" rules for `AGENTS.md` (diff first, written only with your approval)\r\n   - Log the initialization into `memory/`\r\n\r\n## 🚀 Quick Start (3 steps, 10 minutes)\r\n\r\nUsing a Feishu bot as an example — three steps to give your agent a well-organized home:\r\n\r\n### Step 1: Onboard your agent\r\n\r\nCreate a new agent and connect it (Feishu Bot / WeChat / Telegram, etc.), then confirm its identity — name, how to address it, scope of responsibilities:\r\n\r\n![Step 1 - new agent onboarded](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2: Trigger initialization with one phrase\r\n\r\nTell your agent:\r\n\r\n> Initialize your workspace using xiaoyaoclaw-workspace-initializer\r\n\r\nIt will first show a diff list and wait for your confirmation (what will be created, what will not be touched). After that: create the missing directories → write `WORKSPACE.md` → propose the \"Read WORKSPACE.md\" startup rule and the config-safety rules as a patch for your approval before touching `AGENTS.md` → log the initialization:\r\n\r\n![Step 2 - running initialization](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3: Verify the result\r\n\r\nOpen your agent's workspace directory (Windows Explorer example) — the standard structure is in place:\r\n\r\n![Step 3 - workspace ready](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 From now on, your agent reads `WORKSPACE.md` at every session start — no messy directories, no lost memory, no config conflicts.\r\n\r\n## How it compares\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| Directory structure | basic template | complete convention system (7 dirs + naming rules + behavior rules) |\r\n| Persistent rules | no WORKSPACE.md | ✅ WORKSPACE.md survives restarts |\r\n| Multi-agent config safety | ❌ | ✅ config.patch / no config.apply (learned from real incidents) |\r\n| Standalone templates | embedded | ✅ templates/ reusable separately |\r\n\r\n**Proven in production**: these conventions come from a real environment where 7 agents share a single `openclaw.json`; the `config.apply` overwrite incident (`openclaw.json.bak*` traces) was a costly lesson.\r\n\r\n## 💬 Join the community\r\n\r\nXiaoyao product family user group — feedback · exchange · suggestions:\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/community-qr.png\" width=\"280\" alt=\"XiaoyaoAI user group QR: scan to join, or add WeChat dtsola (note: 加群)\">\r\n</p>\r\n\r\n<p align=\"center\">Scan to join, or add WeChat <code>dtsola</code> (note: <b>加群</b>)</p>\r\n\r\n## Sister projects\r\n\r\n- 🧠 **xiaoyaoclaw-memory-distill** (memory distill): distill conversations into structured memory — root `MEMORY.md` + `memory/` daily logs, solving context overflow; auto-builds MEMORY.md from history logs when missing. <https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n- 📚 **xiaoyaoclaw-kb-retriever** (knowledge base retriever): local KB retrieval — hierarchical data_structure.md index navigation + progressive retrieval over md/pdf/xlsx, zero dependencies, Windows & macOS ready. <https://github.com/dtsola/xiaoyaoclaw-kb-retriever>\r\n- 🩹 **xiaoyaoclaw-workspace-auditor**: read-only workspace health check — 5 categories, graded report with fix suggestions, zero-dependency, never modifies files. <https://github.com/dtsola/xiaoyaoclaw-workspace-auditor>\r\n- 🗂️ **xiaoyaoclaw-task-progress-tracker** (task progress tracker): directory as container, PROGRESS.md as progress — lifecycle management for tasks/ and projects/ (status + progress log + document index). <https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker>\r\n- 📎 **xiaoyaoclaw-web-clipper**: save any web page as clean local Markdown with frontmatter — dual-engine extraction (readability + trafilatura fallback), Chinese-safe filenames, batch clipping with dedup; output lands in knowledge/clippings/ ready for kb-retriever indexing. <https://github.com/dtsola/xiaoyaoclaw-web-clipper>\r\n- 🤝 **xiaoyaoclaw-agent-orchestrator** (collaboration layer): on top of the ecosystem — split, dispatch, track, aggregate, retry.<https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator>\r\n- 📊 **xiaoyaoclaw-usage-report**: parse session JSONL to answer how long each task took, which tools/skills/models were used, and how many tokens were consumed — zero dependency, local only, token is the primary metric. <https://github.com/dtsola/xiaoyaoclaw-usage-report>\r\n- 🎛️ **xiaoyaoclaw-commander** (cross-tool commander, **command layer**): command your XiaoyaoClaw/OpenClaw multi-agent system from any Agent Skills tool (Claude Code / Codex / OpenCode / Trae / DSH). <https://github.com/dtsola/xiaoyaoclaw-commander>\r\n- 🔍 **xiaoyaoclaw-seo-skill** (SEO skill): analyze & optimize website search visibility — audit (technical SEO) / page / content / schema / geo (AI search, AEO/GEO) workflows + zero-dependency audit script, cross-tool ready. <https://github.com/dtsola/xiaoyaoclaw-seo-skill>\r\n\r\n##\n\nFile v1.0.7:skill-card.md\n\n## Description:\n\nHelps OpenClaw agents initialize a user-approved workspace directory structure and persistent workspace guidance without overwriting existing governance files.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nOpenClaw users and agent operators use this skill to initialize or repair an explicitly designated workspace root, with approval before creating folders or changing persistent workspace guidance.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workspace governance files can shape future agent behavior.\n\nMitigation: Review the proposed WORKSPACE.md and exact AGENTS.md diff, and approve them before any persistent changes.\n\n## Reference(s):\n\n- [ClawHub skill listing](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Workspace guidance template](templates/WORKSPACE.md)\n- [Agent configuration safety template](templates/AGENTS-config-safety.md)\n\n## Skill Output:\n\n**Output Type(s):** [Guidance, Markdown, Configuration instructions]\n\n**Output Format:** [Markdown guidance and proposed workspace file changes]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Proposes a change list and requests approval before persistent file changes.]\n\n## Skill Version(s):\n\n1.0.7 (source: server-resolved release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.7:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\r\n\r\n> 本段是**待用户批准的提议文本**：把它写进 `AGENTS.md` 会改变未来会话的配置操作方式，因此需先给 diff、经用户同意再落地。\r\n\r\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\r\n\r\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\r\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\r\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\r\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.7:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\r\n\r\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\r\n\r\n> **本文件的归属与边界**：这是**用户维护**的工作区约定，智能体只能提议修改、不能擅自改写。\r\n> 它只决定**本工作区产出的文件放在哪里**，不是对其他技能的指令覆盖 —— 技能自身的安全规则、许可条款与既定流程一律优先；解决不了的冲突停下来问用户。\r\n\r\n## 目录结构\r\n\r\n| 目录 | 用途 | 生命周期 |\r\n|------|------|---------|\r\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\r\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\r\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\r\n| `knowledge/` | 知识库 | 永久 |\r\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\r\n| `memory/` | 日常日志 | 永久 |\r\n| `tmp/` | 临时缓存 | 手动清理 |\r\n| `.openclaw/`, `agent/`, `sessions/`, `.clawhub/` | 系统目录，不要手动修改或删除 | 永久 |\r\n\r\n## 命名规范\r\n\r\n| 场景 | 规则 | 例子 |\r\n|------|------|------|\r\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\r\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\r\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\r\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\r\n\r\n## 行为规则\r\n\r\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\r\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\r\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\r\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\r\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\r\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\r\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\r\n8. **tmp 清理** → 只在用户要求时手动清理\r\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/`、`.clawhub/` 不要手动修改或删除\r\n10. **文件放置约定** → 其他技能约定的**输出路径**与本文件冲突时，把产出位置映射到工作区并**注明差异**（技能原约定 X → 存到 Y）；\r\n    但技能的安全规则、许可条款、既定流程**优先于本文件**，不得以本文件为由要求技能绕过；技能必须在工作区外写入时以技能为准；无法靠换位置解决的冲突 → 问用户，不单方面决定\n\nFile v1.0.7:LICENSE\n\nMIT License\n\nCopyright (c) 2026 dtsola\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v1.0.6: 13 files, 542589 bytes\n\nFiles: assets/quickstart-step1-new-agent.png (154145b), assets/quickstart-step2-init-workspace.png (242264b), assets/quickstart-step3-workspace-ready.png (64466b), assets/readme/community-qr.png (97430b), assets/readme/hero.svg (3908b), LICENSE (1063b), README.en.md (7851b), README.md (7670b), skill-card.md (2521b), SKILL.md (11110b), templates/AGENTS-config-safety.md (789b), templates/WORKSPACE.md (2807b), _meta.json (152b)\n\nFile v1.0.6:SKILL.md\n\n---\r\nname: xiaoyaoclaw-workspace-initializer\r\ndescription: >\r\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\r\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\r\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\r\n  never config.apply) + memory log. Use when an agent enters a new/empty\r\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\r\n  missing. Activate only after the user explicitly asks to initialize or repair\r\n  this workspace, and only in a workspace root the user names as such. Do NOT\r\n  activate in a repository that already has its own structure or an alternative\r\n  workspace convention, and never rewrite the user's existing governance files\r\n  (AGENTS.md / WORKSPACE.md / SOUL.md / USER.md) without showing the exact diff\r\n  and getting explicit approval first.\r\n  中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。仅在用户明确要求\r\n  初始化/修复本工作区、且确认这是工作区根目录时使用；已有项目结构或已存在其他\r\n  工作区规范的仓库不触发；AGENTS.md / WORKSPACE.md / SOUL.md / USER.md 属用户\r\n  资产，未经用户看到确切 diff 并明确同意，不擅自改写。\r\n---\r\n\r\n# OpenClaw Workspace Initializer（工作区初始化器）\r\n\r\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**\r\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\r\n\r\n> 🚀 **小遥Claw：「把 AI 助手装进自己的电脑」：<https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz>**\r\n\r\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\r\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\r\n\r\n> 🧩 **姊妹项目：** 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）——把对话蒸馏成结构化记忆（MEMORY.md + 每日日志），解决上下文溢出，缺失时自动首次建忆：<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n\r\n## 激活边界（避免误触发 / 越权改动）\r\n\r\n**只在下面两种情况进入工作流：**\r\n\r\n1. 用户**明确要求**初始化 / 修复本工作区（「初始化一下工作区」「补上缺的目录和规范」）；或\r\n2. 智能体发现当前根目录**确实缺少**标准目录或 `WORKSPACE.md`，**且**用户当轮的任务本来就要在该目录下落文件。\r\n\r\n**以下情况不要激活、不要改动任何东西：**\r\n\r\n- 仓库里已经有自己的目录结构与规范（例如已有 `src/`、`docs/`、`apps/` 等工程约定）；\r\n- 已存在其他工作区规范（别的 `WORKSPACE.md` / `.cursor/rules/` / 团队规范）——先问用户以哪套为准；\r\n- 用户只是在提问、讨论、看代码，或没有要求结构化改造；\r\n- 工作区已经合规（此时**什么都不做**，只回一句「已符合规范」，不产生任何写入）。\r\n\r\n**不可越界的三条：**\r\n\r\n- **不覆盖已有文件**：只创建缺失项，已存在的目录/文件一律跳过。\r\n- **用户资产只提议、不擅自改**：`AGENTS.md`、`WORKSPACE.md`、`SOUL.md`、`USER.md` 等治理与配置类文件，改前必须展示**确切 diff** 并取得用户明确同意。\r\n- **不装常驻机制**：不建 cron、不起守护进程、不写启动脚本、不写跨会话状态文件；本技能只在用户批准的那一轮里做文件改动。\r\n\r\n## 工作流\r\n\r\n### Step 0: 先出差异清单，默认 dry-run（改动前必须过的闸门）\r\n\r\n在任何写入之前，先给用户一份**差异清单**，并停下来等确认：\r\n\r\n```text\r\n检测结果（只读）\r\n  缺失目录：memory/  tmp/\r\n  缺失文件：WORKSPACE.md\r\n  将创建：  4 个目录 + 1 个文件（内容：标准目录规范模板）\r\n  不会触碰：已存在的 projects/ tasks/ knowledge/ scripts/ outputs/\r\n  需要单独批准：AGENTS.md 的启动读取规则（会改变未来会话的启动行为）\r\n```\r\n\r\n用户确认后再进入 Step 2；用户没确认就**不改任何东西**。\r\n\r\n### Step 1: 检测当前状态\r\n\r\n检查工作区根目录是否存在以下内容：\r\n\r\n**必备子目录：**\r\n- `projects/` — 长期开发项目\r\n- `tasks/` — 一次性任务\r\n- `outputs/` — 生成物（图片、文档等）\r\n- `knowledge/` — 知识库\r\n- `scripts/` — 工具/一次性脚本\r\n- `memory/` — 日常日志\r\n- `tmp/` — 临时缓存\r\n\r\n**必备规范文件：**\r\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\r\n\r\n**系统目录（不要修改或删除）：**\r\n- `.openclaw/`\r\n- `agent/`\r\n- `sessions/`\r\n- `.clawhub/`\r\n\r\n### Step 2: 创建缺失的目录结构（用户确认后执行）\r\n\r\n逐项创建**缺失**目录（已存在的一律跳过，绝不删除/覆盖）：\r\n\r\n```bash\r\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\r\n```\r\n\r\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\r\n\r\n### Step 3: 写入 WORKSPACE.md（仅当不存在时）\r\n\r\n如果根目录**没有** `WORKSPACE.md`：读取本 skill 的 `templates/WORKSPACE.md`，把**将要写入的完整内容**给用户过一遍（或展示 diff）再写入。\r\n**如果已存在则不覆盖**——需要修改时按「用户资产」处理：先给 diff，得到明确同意再改。\r\n\r\n## 文件放置约定（只管「产出放哪」，不覆盖技能指令）\r\n\r\n**适用范围严格限定**：本节只决定**本工作区自己产出的文件放在哪里**，它**不是对其他技能的指令覆盖**。\r\n\r\n**优先级（从高到低）：**\r\n\r\n1. **用户当轮的明确要求** — 用户说放哪就放哪\r\n2. **其他技能的安全规则、许可条款、既定流程** — 一律优先，本文件不得改写、不得要求技能绕过\r\n3. **本文件（WORKSPACE.md）的目录规范** — 仅在「上面两条没规定产出位置」时生效\r\n\r\n**做法：**\r\n\r\n- 技能若自带输出路径约定（如 `~/Downloads/xxx/`），把它的**产出位置**映射到工作区内并**告知用户差异**（「技能原约定 X，按工作区规范存到 Y」）；映射只涉及存放位置，不涉及技能内容与流程。\r\n- 若技能**必须**写在工作区之外（例如它自己的数据目录、系统约定位置），**以技能为准**，如实汇报，不硬拉进工作区。\r\n- 遇到无法用「换个位置」解决的冲突（例如技能要求改工作区外的配置）→ **停下来问用户**，不做单方面决定。\r\n\r\n**设计原则：** 本文件只管「文件放哪」，不管「技能怎么做」。自研技能不硬编码工作目录，输出位置默认由 WORKSPACE.md 决定。\r\n\r\n### Step 4: 引导新智能体\r\n\r\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\r\n\r\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\r\n>\r\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\r\n>\r\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\r\n\r\n### Step 4.5: 把工作区规范接入 AGENTS.md（**默认只提议，需明确批准**）\r\n\r\n⚠️ **为什么这一步要单独批准**：`AGENTS.md` 会被 agent 在**每次会话启动时读取**，改它等于改变未来的行为——属于「用户资产」，不是普通输出文件。因此：\r\n\r\n- **默认不动手**：先给出**确切 diff**（新增哪几行、插在哪个章节），并明确提示「这会让未来每次会话启动都先读 WORKSPACE.md」，**得到用户明确同意后**才写入。\r\n- 用户不同意 / 没回应 → **跳过**，在汇报里写「AGENTS.md 未改动（待你确认）」。\r\n- 不追加与本次初始化无关的内容；不覆盖用户已有的启动规则，只做**最小必要新增**。\r\n\r\n批准后要做的两项（若 `AGENTS.md` 不存在则跳过，或随工作区模板一并创建）：\r\n\r\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\r\n\r\n> `Read WORKSPACE.md` — workspace directory rules\r\n\r\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\r\n\r\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\r\n\r\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\r\n\r\n### Step 5: 记录初始化日志（随同一轮批准一起做）\r\n\r\n在本工作区自己的 `memory/YYYY-MM-DD.md` 追加一条初始化记录（只写 Memory 目录内，不写到别处；如果用户没批准本轮改动，就不写）：\r\n\r\n> xiaoyaoclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\r\n\r\n## 完整示例\r\n\r\n### 首次进入空工作区\r\n\r\n检测 → **出差异清单并等用户确认（Step 0 闸门）** → 创建缺失目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ **给出 AGENTS.md 的确切 diff，经用户批准后**才接入启动规则 → 记录日志\r\n\r\n**产出：**\r\n```\r\n根目录/\r\n├── projects/\r\n├── tasks/\r\n├── outputs/\r\n│   ├── images/\r\n│   └── docs/\r\n├── knowledge/\r\n├── scripts/\r\n├── memory/\r\n│   └── YYYY-MM-DD.md    ← 初始化日志\r\n├── tmp/\r\n├── WORKSPACE.md          ← 持久化规范文件\r\n├── SOUL.md\r\n├── USER.md\r\n└── ...其他系统配置\r\n```\r\n\r\n### 重启后新智能体进入同一工作区\r\n\r\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → **什么都不做**（跳过 Step 2-5）→ 回一句「工作区已符合规范」即可。\r\n\r\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\r\n\r\n> 注：这两份规范都是**用户资产**——本技能提交的是「文本 + 建议」，是否落地由用户决定；本技能不安装常驻机制，也不在用户不知情时改动它们。\n\nFile v1.0.6:README.md\n\n# OpenClaw Workspace Initializer 🏠\r\n\r\n<div align=\"center\">\r\n  <strong>🇨🇳 中文</strong> | <a href=\"README.en.md\">🌐 English</a>\r\n</div>\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> 给每个 OpenClaw agent 一个「家」：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## 为什么需要它\r\n\r\nOpenClaw agent 每次会话都是全新启动。没有工作区规范，你的 agent 会：\r\n- ❌ 把文件乱扔在根目录，越攒越乱\r\n- ❌ 忘记自己的记忆系统（`memory/`），每次醒来都失忆\r\n- ❌ 在多 agent 共享配置时，用 `config.apply` 整份覆盖 openclaw.json，**抹掉其他 agent 的修改**\r\n\r\n这个 skill 一次性解决：**目录结构 + 持久化规范 + 配置安全**。\r\n\r\n## 特性\r\n\r\n- 🗂️ 标准目录结构：`projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md 规范：重启后依然生效的目录管理规则（**用户资产** —— 内容先给你过目，已存在则不覆盖）\r\n- 🛡️ 多 agent 配置安全：只用 `config.patch`，禁止 `config.apply` 覆盖他人修改\r\n- ⚖️ **文件放置统一**：其他技能约定与 WORKSPACE.md 冲突的**输出路径**，由执行 agent 映射进工作区并注明差异（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`）——但技能自身的安全规则、许可与流程优先，不覆盖、不要求技能绕过；换位置解决不了的冲突会先问你\r\n\r\n## 安装\r\n\r\n```bash\r\n# ClawHub（推荐）\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# 或从 GitHub 手动安装\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# 把 SKILL.md 和 templates/ 放到你的 skills 目录\r\n```\r\n\r\n## 使用\r\n\r\n1. 把 skill 放到 OpenClaw 的 skills 目录\r\n2. 首次进入（或重置）一个工作区时，agent 会自动：\r\n   - 创建 `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - 写入 `WORKSPACE.md` 目录规范（重启后依然生效）\r\n   - 检测多 agent 场景，把「config.patch ✅ / config.apply ❌」安全规范持久化进 `AGENTS.md`\r\n   - 在 `memory/` 记录初始化日志\r\n\r\n## 🚀 快速上手（三步，10 分钟）\r\n\r\n以飞书 Bot 接入为例，三步让你的 agent 拥有一个规范的家：\r\n\r\n### Step 1：接入你的 agent\r\n\r\n新建一个智能体并接入（飞书 Bot / 微信 / Telegram 等均可），和它完成身份确认——起名字、确定称呼、划定职责范围：\r\n\r\n![Step 1 - 全新 agent 接入](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2：一句话触发初始化\r\n\r\n对你的 agent 说：\r\n\r\n> 初始化你的工作目录，使用 xiaoyaoclaw-workspace-initializer\r\n\r\nagent 会**先给差异清单等你确认**（将创建什么 / 不会动什么），确认后再执行：建缺失目录 → 写入 `WORKSPACE.md` → 把「Read WORKSPACE.md」启动规则与配置安全规范作为**建议补丁**给你过目（`AGENTS.md` 影响未来每次会话启动，需单独同意）→ 记录初始化日志：\r\n\r\n![Step 2 - 执行初始化](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3：验收成果\r\n\r\n打开 agent 的工作区目录（Windows 资源管理器示例），标准结构已就位：\r\n\r\n![Step 3 - 初始化完成](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 之后每次会话，agent 都会先读 `WORKSPACE.md` 再干活——目录不乱、记忆不丢、配置不打架。\r\n\r\n## 与其他方案的区别\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| 目录结构 | 基础模板 | 完整规范体系（7 目录 + 命名规范 + 行为规则） |\r\n| 持久化规范 | 无 WORKSPACE.md 规范 | ✅ WORKSPACE.md 重启后持续生效 |\r\n| 多 agent 配置安全 | ❌ | ✅ config.patch / 禁 config.apply（实战踩坑沉淀） |\r\n| 模板独立 | 内嵌 | ✅ templates/ 可单独复用 |\r\n\r\n**实战验证**：本规范来自 7 个 agent 共享单份 openclaw.json 的真实生产环境，`config.apply` 覆盖事故（openclaw.json.bak* 痕迹）是血泪教训。\r\n\r\n## 💬 加入交流群\r\n\r\n小遥全系产品用户交流群——产品反馈 · 使用交流 · 功能建议：\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/community-qr.png\" width=\"280\" alt=\"小遥AI 用户交流群二维码：扫码加群，或添加微信 dtsola（备注：加群）\">\r\n</p>\r\n\r\n<p align=\"center\">扫码加群，或添加微信 <code>dtsola</code>（备注：<b>加群</b>）</p>\r\n\r\n## 姊妹项目\r\n\r\n- 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）：把对话蒸馏成结构化记忆——根目录 MEMORY.md + memory/ 每日日志，解决上下文溢出；MEMORY.md 缺失时自动从历史日志「首次建忆」。<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n- 📚 **xiaoyaoclaw-kb-retriever**（知识库检索器）：本地知识库检索——分层 data_structure.md 索引导航 + 渐进式检索（md/pdf/xlsx），零依赖零 API key，Windows / macOS 双平台。<https://github.com/dtsola/xiaoyaoclaw-kb-retriever>\r\n- 🩹 **xiaoyaoclaw-workspace-auditor**：工作区体检（只读审计），5 类检查 + 分级报告 + 修复建议，零依赖脚本永不改文件。<https://github.com/dtsola/xiaoyaoclaw-workspace-auditor>\r\n- 🗂️ **xiaoyaoclaw-task-progress-tracker**（任务进度跟踪器）：目录即容器，PROGRESS.md 即进度——tasks/ 与 projects/ 生命周期管理（状态 + 进度日志 + 文档索引）。<https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker>\r\n- 📎 **xiaoyaoclaw-web-clipper**（网页剪藏）：把任意网页保存为带 frontmatter 的本地 Markdown——双引擎正文提取（readability + trafilatura 降级链）、中文文件名安全、批量剪藏 + 去重；输出直通 knowledge/clippings/，配合 kb-retriever 建索引即可检索。<https://github.com/dtsola/xiaoyaoclaw-web-clipper>\r\n- 🤝 **xiaoyaoclaw-agent-orchestrator**（Agent 协作编排，**协作层**）：架在生态之上——拆任务、分 agent、管进度、聚结果、失败重试。<https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator>\r\n- 📊 **xiaoyaoclaw-usage-report**（用量报告）：解析 session JSONL，回答「每次 agent 任务花了多久、用了哪些工具/技能/模型、消耗了多少 token」——零依赖纯本地，token 为主指标。<https://github.com/dtsola/xiaoyaoclaw-usage-report>\r\n- 🎛️ **xiaoyaoclaw-commander**（跨工具指挥官，**指挥层**）：让任意支持 Agent Skills 的工具（Claude Code / Codex / OpenCode / Trae / DSH）指挥小遥Claw / OpenClaw 多 agent 系统。<https://github.com/dtsola/xiaoyaoclaw-commander>\r\n- 🔍 **xiaoyaoclaw-seo-skill**（SEO 技能）：网站搜索可见性分析与优化——audit（技术SEO）/page（页面）/content（内容质量）/schema（结构化数据）/geo（AI搜索优化）五流程 + 零依赖审计脚本，跨工具通用。<https://github.com/dtsola/xiaoyaoclaw-seo-skill>\r\n\r\n##\n\nFile v1.0.6:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.6\",\n  \"publishedAt\": 1789616185480\n}\n\nFile v1.0.6:README.en.md\n\n# OpenClaw Workspace Initializer 🏠\r\n\r\n> Give every OpenClaw agent a home: standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> Give every OpenClaw agent a \"home\": standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## Why you need it\r\n\r\nEvery OpenClaw agent session starts fresh. Without workspace conventions, your agent will:\r\n- ❌ Scatter files around the root directory, messier every day\r\n- ❌ Forget its own memory system (`memory/`), waking up amnesiac every session\r\n- ❌ In multi-agent shared config setups, use `config.apply` to overwrite the whole `openclaw.json`, **wiping out other agents' changes**\r\n\r\nThis skill solves it all in one go: **directory structure + persistent rules + config safety**.\r\n\r\n## Features\r\n\r\n- 🗂️ Standard directory structure: `projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md rules: directory conventions that survive restarts — **yours to own**; the skill shows the content first and never overwrites an existing file\r\n- 🛡️ Multi-agent config safety: `config.patch` only — `config.apply` is forbidden to avoid overwriting others' changes\r\n- ⚖️ **Unified file placement**: when another skill's output path clashes with WORKSPACE.md, the executing agent maps the output into the workspace and notes the difference (e.g. `~/Downloads/research/<topic>` → `tasks/<topic>/`) — while the skill's own safety rules, licence and workflow stay authoritative, and unresolvable conflicts go back to you.\r\n\r\n## Install\r\n\r\n```bash\r\n# From ClawHub (recommended)\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# Or manually from GitHub\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# Put SKILL.md and templates/ into your skills directory\r\n```\r\n\r\n## Usage\r\n\r\n1. Put the skill in your OpenClaw skills directory\r\n2. When entering (or resetting) a workspace, your agent will automatically:\r\n   - Create `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - Write the `WORKSPACE.md` directory rules (only if missing; you approve the content first)\r\n   - Detect multi-agent setups and propose the \"config.patch ✅ / config.apply ❌\" rules for `AGENTS.md` (diff first, written only with your approval)\r\n   - Log the initialization into `memory/`\r\n\r\n## 🚀 Quick Start (3 steps, 10 minutes)\r\n\r\nUsing a Feishu bot as an example — three steps to give your agent a well-organized home:\r\n\r\n### Step 1: Onboard your agent\r\n\r\nCreate a new agent and connect it (Feishu Bot / WeChat / Telegram, etc.), then confirm its identity — name, how to address it, scope of responsibilities:\r\n\r\n![Step 1 - new agent onboarded](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2: Trigger initialization with one phrase\r\n\r\nTell your agent:\r\n\r\n> Initialize your workspace using xiaoyaoclaw-workspace-initializer\r\n\r\nIt will first show a diff list and wait for your confirmation (what will be created, what will not be touched). After that: create the missing directories → write `WORKSPACE.md` → propose the \"Read WORKSPACE.md\" startup rule and the config-safety rules as a patch for your approval before touching `AGENTS.md` → log the initialization:\r\n\r\n![Step 2 - running initialization](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3: Verify the result\r\n\r\nOpen your agent's workspace directory (Windows Explorer example) — the standard structure is in place:\r\n\r\n![Step 3 - workspace ready](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 From now on, your agent reads `WORKSPACE.md` at every session start — no messy directories, no lost memory, no config conflicts.\r\n\r\n## How it compares\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| Directory structure | basic template | complete convention system (7 dirs + naming rules + behavior rules) |\r\n| Persistent rules | no WORKSPACE.md | ✅ WORKSPACE.md survives restarts |\r\n| Multi-agent config safety | ❌ | ✅ config.patch / no config.apply (learned from real incidents) |\r\n| Standalone templates | embedded | ✅ templates/ reusable separately |\r\n\r\n**Proven in production**: these conventions come from a real environment where 7 agents share a single `openclaw.json`; the `config.apply` overwrite incident (`openclaw.json.bak*` traces) was a costly lesson.\r\n\r\n## 💬 Join the community\r\n\r\nXiaoyao product family user group — feedback · exchange · suggestions:\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/community-qr.png\" width=\"280\" alt=\"XiaoyaoAI user group QR: scan to join, or add WeChat dtsola (note: 加群)\">\r\n</p>\r\n\r\n<p align=\"center\">Scan to join, or add WeChat <code>dtsola</code> (note: <b>加群</b>)</p>\r\n\r\n## Sister projects\r\n\r\n- 🧠 **xiaoyaoclaw-memory-distill** (memory distill): distill conversations into structured memory — root `MEMORY.md` + `memory/` daily logs, solving context overflow; auto-builds MEMORY.md from history logs when missing. <https://github.com/dtsola/xiaoyaoclaw-memory-distill>\r\n- 📚 **xiaoyaoclaw-kb-retriever** (knowledge base retriever): local KB retrieval — hierarchical data_structure.md index navigation + progressive retrieval over md/pdf/xlsx, zero dependencies, Windows & macOS ready. <https://github.com/dtsola/xiaoyaoclaw-kb-retriever>\r\n- 🩹 **xiaoyaoclaw-workspace-auditor**: read-only workspace health check — 5 categories, graded report with fix suggestions, zero-dependency, never modifies files. <https://github.com/dtsola/xiaoyaoclaw-workspace-auditor>\r\n- 🗂️ **xiaoyaoclaw-task-progress-tracker** (task progress tracker): directory as container, PROGRESS.md as progress — lifecycle management for tasks/ and projects/ (status + progress log + document index). <https://github.com/dtsola/xiaoyaoclaw-task-progress-tracker>\r\n- 📎 **xiaoyaoclaw-web-clipper**: save any web page as clean local Markdown with frontmatter — dual-engine extraction (readability + trafilatura fallback), Chinese-safe filenames, batch clipping with dedup; output lands in knowledge/clippings/ ready for kb-retriever indexing. <https://github.com/dtsola/xiaoyaoclaw-web-clipper>\r\n- 🤝 **xiaoyaoclaw-agent-orchestrator** (collaboration layer): on top of the ecosystem — split, dispatch, track, aggregate, retry.<https://github.com/dtsola/xiaoyaoclaw-agent-orchestrator>\r\n- 📊 **xiaoyaoclaw-usage-report**: parse session JSONL to answer how long each task took, which tools/skills/models were used, and how many tokens were consumed — zero dependency, local only, token is the primary metric. <https://github.com/dtsola/xiaoyaoclaw-usage-report>\r\n- 🎛️ **xiaoyaoclaw-commander** (cross-tool commander, **command layer**): command your XiaoyaoClaw/OpenClaw multi-agent system from any Agent Skills tool (Claude Code / Codex / OpenCode / Trae / DSH). <https://github.com/dtsola/xiaoyaoclaw-commander>\r\n- 🔍 **xiaoyaoclaw-seo-skill** (SEO skill): analyze & optimize website search visibility — audit (technical SEO) / page / content / schema / geo (AI search, AEO/GEO) workflows + zero-dependency audit script, cross-tool ready. <https://github.com/dtsola/xiaoyaoclaw-seo-skill>\r\n\r\n##\n\nFile v1.0.6:skill-card.md\n\n## Description:\n\nInitializes and standardizes OpenClaw workspaces by proposing reviewed directory creation, WORKSPACE.md rules, multi-agent configuration safety guidance, and a memory log.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nDevelopers and agent operators use this skill to initialize or repair a confirmed OpenClaw workspace root with a standard directory layout, persistent workspace rules, and safer multi-agent configuration practices.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workspace governance files such as WORKSPACE.md and AGENTS.md can affect future agent behavior.\n\nMitigation: Review the proposed WORKSPACE.md content and exact AGENTS.md diff before approving any write.\n\nRisk: Workspace initialization creates files and directories in the selected workspace.\n\nMitigation: Run the skill only in a workspace root the user has confirmed, create only missing items, and leave existing files untouched unless the user approves a shown diff.\n\nRisk: Configuration guidance for shared multi-agent setups can change how future config edits are performed.\n\nMitigation: Use the proposed config.patch guidance only after confirming it matches the workspace's shared configuration model.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Project documentation](https://github.com/dtsola/xiaoyaoclaw-workspace-initializer)\n- [XiaoyaoClaw guide](https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz)\n- [WORKSPACE.md template](templates/WORKSPACE.md)\n- [AGENTS config safety template](templates/AGENTS-config-safety.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown with proposed diffs, shell commands, workspace templates, and concise status messages]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Produces user-reviewed workspace file changes and guidance; it does not install persistent services or overwrite existing governance files without approval.]\n\n## Skill Version(s):\n\n1.0.6 (source: ClawHub release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.6:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\r\n\r\n> 本段是**待用户批准的提议文本**：把它写进 `AGENTS.md` 会改变未来会话的配置操作方式，因此需先给 diff、经用户同意再落地。\r\n\r\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\r\n\r\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\r\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\r\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\r\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.6:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\r\n\r\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\r\n\r\n> **本文件的归属与边界**：这是**用户维护**的工作区约定，智能体只能提议修改、不能擅自改写。\r\n> 它只决定**本工作区产出的文件放在哪里**，不是对其他技能的指令覆盖 —— 技能自身的安全规则、许可条款与既定流程一律优先；解决不了的冲突停下来问用户。\r\n\r\n## 目录结构\r\n\r\n| 目录 | 用途 | 生命周期 |\r\n|------|------|---------|\r\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\r\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\r\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\r\n| `knowledge/` | 知识库 | 永久 |\r\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\r\n| `memory/` | 日常日志 | 永久 |\r\n| `tmp/` | 临时缓存 | 手动清理 |\r\n| `.openclaw/`, `agent/`, `sessions/`, `.clawhub/` | 系统目录，不要手动修改或删除 | 永久 |\r\n\r\n## 命名规范\r\n\r\n| 场景 | 规则 | 例子 |\r\n|------|------|------|\r\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\r\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\r\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\r\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\r\n\r\n## 行为规则\r\n\r\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\r\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\r\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\r\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\r\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\r\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\r\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\r\n8. **tmp 清理** → 只在用户要求时手动清理\r\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/`、`.clawhub/` 不要手动修改或删除\r\n10. **文件放置约定** → 其他技能约定的**输出路径**与本文件冲突时，把产出位置映射到工作区并**注明差异**（技能原约定 X → 存到 Y）；\r\n    但技能的安全规则、许可条款、既定流程**优先于本文件**，不得以本文件为由要求技能绕过；技能必须在工作区外写入时以技能为准；无法靠换位置解决的冲突 → 问用户，不单方面决定\n\nFile v1.0.6:LICENSE\n\nMIT License\n\nCopyright (c) 2026 dtsola\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nArchive v1.0.5: 5 files, 6633 bytes\n\nFiles: skill-card.md (2177b), SKILL.md (6222b), templates/AGENTS-config-safety.md (609b), templates/WORKSPACE.md (2164b), _meta.json (152b)\n\nFile v1.0.5:SKILL.md\n\n---\nname: xiaoyaoclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n> 🚀 **小遥Claw：「把 AI 助手装进自己的电脑」：<https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz>**\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n> 🧩 **姊妹项目：** 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）——把对话蒸馏成结构化记忆（MEMORY.md + 每日日志），解决上下文溢出，缺失时自动首次建忆：<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\n\n## 工作流\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n- `.clawhub/`\n\n### Step 2: 创建缺失的目录结构\n\n逐项创建缺失目录：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md\n\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\n\n## 路径冲突仲裁（技能输出目录冲突）\n\n用户可能安装任意技能，部分技能自带输出路径约定（如 `~/Downloads/xxx/`）。当技能约定与 WORKSPACE.md 目录规范冲突时：\n\n**仲裁规则（优先级从高到低）：**\n\n1. **WORKSPACE.md 是唯一路径权威** — 冲突时一律以工作区目录规范为准\n2. **执行智能体负责路径翻译** — 将技能约定的外部路径映射到工作区（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`），不要求技能配合修改\n3. **汇报时注明差异** — 向用户汇报时说明「技能原约定 X，按工作区规范存到 Y」\n\n**设计原则：** 技能只负责「做什么」，路径归工作区管。自研技能不得硬编码工作目录，输出位置由 WORKSPACE.md 决定。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\n\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志\n\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\n\n> xiaoyaoclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v1.0.5:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.5\",\n  \"publishedAt\": 1788252977083\n}\n\nFile v1.0.5:skill-card.md\n\n## Description:\n\nOpenClaw Workspace Initializer creates and repairs a standardized OpenClaw workspace with required directories, WORKSPACE.md rules, multi-agent configuration safety guidance, and an initialization memory log.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use this skill when starting or repairing an OpenClaw workspace root so future agents share consistent file-placement rules and configuration-change safety practices.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can persistently change future agent behavior by adding or updating workspace governance files.\n\nMitigation: Review proposed WORKSPACE.md and AGENTS.md edits before accepting them, especially in existing repositories.\n\nRisk: The skill can override another skill's file-placement conventions.\n\nMitigation: Apply workspace path rules only after explicit approval when another skill or project already defines output locations.\n\n## Reference(s):\n\n- [ClawHub Skill Page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [OpenClaw Workspace Initializer Documentation](https://github.com/dtsola/xiaoyaoclaw-workspace-initializer)\n- [XiaoyaoClaw Guide](https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz)\n- [xiaoyaoclaw-memory-distill](https://github.com/dtsola/xiaoyaoclaw-memory-distill)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration]\n\n**Output Format:** [Markdown guidance with shell commands and workspace file templates]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create directories, WORKSPACE.md, AGENTS.md guidance, and memory log entries when an agent applies the skill.]\n\n## Skill Version(s):\n\n1.0.5 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.5:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\n\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\n\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.5:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\n\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\n\n## 目录结构\n\n| 目录 | 用途 | 生命周期 |\n|------|------|---------|\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\n| `knowledge/` | 知识库 | 永久 |\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\n| `memory/` | 日常日志 | 永久 |\n| `tmp/` | 临时缓存 | 手动清理 |\n| `.openclaw/`, `agent/`, `sessions/`, `.clawhub/` | 系统目录，不要手动修改或删除 | 永久 |\n\n## 命名规范\n\n| 场景 | 规则 | 例子 |\n|------|------|------|\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\n\n## 行为规则\n\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\n8. **tmp 清理** → 只在用户要求时手动清理\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/`、`.clawhub/` 不要手动修改或删除\n10. **技能路径冲突仲裁** → 其他技能约定的输出路径若与本文件冲突，一律以本文件为准，由执行智能体完成路径翻译，并向用户注明差异\n\nArchive v1.0.4: 5 files, 6383 bytes\n\nFiles: skill-card.md (1902b), SKILL.md (6068b), templates/AGENTS-config-safety.md (609b), templates/WORKSPACE.md (2137b), _meta.json (152b)\n\nFile v1.0.4:SKILL.md\n\n---\r\nname: xiaoyaoclaw-workspace-initializer\r\ndescription: >\r\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\r\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\r\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\r\n  never config.apply) + memory log. Use when an agent enters a new/empty\r\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\r\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\r\n---\r\n\r\n# OpenClaw Workspace Initializer（工作区初始化器）\r\n\r\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**\r\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\r\n> 🚀 **小遥Claw：「把 AI 助手装进自己的电脑」：<https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz>**\r\n\r\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\r\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\r\n\r\n## 工作流\r\n\r\n### Step 1: 检测当前状态\r\n\r\n检查工作区根目录是否存在以下内容：\r\n\r\n**必备子目录：**\r\n- `projects/` — 长期开发项目\r\n- `tasks/` — 一次性任务\r\n- `outputs/` — 生成物（图片、文档等）\r\n- `knowledge/` — 知识库\r\n- `scripts/` — 工具/一次性脚本\r\n- `memory/` — 日常日志\r\n- `tmp/` — 临时缓存\r\n\r\n**必备规范文件：**\r\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\r\n\r\n**系统目录（不要修改或删除）：**\r\n- `.openclaw/`\r\n- `agent/`\r\n- `sessions/`\r\n\r\n### Step 2: 创建缺失的目录结构\r\n\r\n逐项创建缺失目录：\r\n\r\n```bash\r\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\r\n```\r\n\r\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\r\n\r\n### Step 3: 写入 WORKSPACE.md\r\n\r\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\r\n\r\n## 路径冲突仲裁（技能输出目录冲突）\r\n\r\n用户可能安装任意技能，部分技能自带输出路径约定（如 `~/Downloads/xxx/`）。当技能约定与 WORKSPACE.md 目录规范冲突时：\r\n\r\n**仲裁规则（优先级从高到低）：**\r\n\r\n1. **WORKSPACE.md 是唯一路径权威** — 冲突时一律以工作区目录规范为准\r\n2. **执行智能体负责路径翻译** — 将技能约定的外部路径映射到工作区（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`），不要求技能配合修改\r\n3. **汇报时注明差异** — 向用户汇报时说明「技能原约定 X，按工作区规范存到 Y」\r\n\r\n**设计原则：** 技能只负责「做什么」，路径归工作区管。自研技能不得硬编码工作目录，输出位置由 WORKSPACE.md 决定。\r\n\r\n### Step 4: 引导新智能体\r\n\r\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\r\n\r\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\r\n>\r\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\r\n>\r\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\r\n\r\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\r\n\r\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\r\n\r\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\r\n\r\n> `Read WORKSPACE.md` — workspace directory rules\r\n\r\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\r\n\r\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\r\n\r\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\r\n\r\n### Step 5: 记录初始化日志\r\n\r\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\r\n\r\n> xiaoyaoclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\r\n\r\n## 完整示例\r\n\r\n### 首次进入空工作区\r\n\r\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\r\n\r\n**产出：**\r\n```\r\n根目录/\r\n├── projects/\r\n├── tasks/\r\n├── outputs/\r\n│   ├── images/\r\n│   └── docs/\r\n├── knowledge/\r\n├── scripts/\r\n├── memory/\r\n│   └── YYYY-MM-DD.md    ← 初始化日志\r\n├── tmp/\r\n├── WORKSPACE.md          ← 持久化规范文件\r\n├── SOUL.md\r\n├── USER.md\r\n└── ...其他系统配置\r\n```\r\n\r\n### 重启后新智能体进入同一工作区\r\n\r\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\r\n\r\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v1.0.4:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.4\",\n  \"publishedAt\": 1787639717812\n}\n\nFile v1.0.4:skill-card.md\n\n## Description:\n\nOpenClaw workspace initialization and standardization: creates standard workspace folders, writes WORKSPACE.md rules, adds multi-agent configuration safety guidance, and records an initialization log.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and OpenClaw users use this skill when entering a new or incomplete workspace to create the standard folder layout, persistent workspace rules, AGENTS.md startup and configuration safety guidance, and a memory log.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill creates and enforces persistent workspace guidance that can influence how later agents organize files and handle shared OpenClaw configuration.\n\nMitigation: Install only when the user wants this workspace structure, and review the bundled WORKSPACE.md and AGENTS.md guidance before use.\n\n## Reference(s):\n\n- [Openclaw Workspace Initializer on ClawHub](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [dtsola ClawHub publisher profile](https://clawhub.ai/user/dtsola)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with inline shell commands and generated workspace files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create workspace directories, WORKSPACE.md, AGENTS.md guidance, and memory log entries when executed by an agent.]\n\n## Skill Version(s):\n\n1.0.4 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.4:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\n\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\n\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.4:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\n\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\n\n## 目录结构\n\n| 目录 | 用途 | 生命周期 |\n|------|------|---------|\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\n| `knowledge/` | 知识库 | 永久 |\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\n| `memory/` | 日常日志 | 永久 |\n| `tmp/` | 临时缓存 | 手动清理 |\n| `.openclaw/`, `agent/`, `sessions/` | 系统目录，不要手动修改或删除 | 永久 |\n\n## 命名规范\n\n| 场景 | 规则 | 例子 |\n|------|------|------|\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\n\n## 行为规则\n\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\n8. **tmp 清理** → 只在用户要求时手动清理\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/` 不要手动修改或删除\n10. **技能路径冲突仲裁** → 其他技能约定的输出路径若与本文件冲突，一律以本文件为准，由执行智能体完成路径翻译，并向用户注明差异\n\nArchive v1.0.3: 5 files, 6508 bytes\n\nFiles: skill-card.md (2229b), SKILL.md (5930b), templates/AGENTS-config-safety.md (609b), templates/WORKSPACE.md (2137b), _meta.json (152b)\n\nFile v1.0.3:SKILL.md\n\n---\nname: openclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/openclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n> 🚀 **小遥Claw：「把 AI 助手装进自己的电脑」：<https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz>**\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n## 工作流\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n\n### Step 2: 创建缺失的目录结构\n\n逐项创建缺失目录：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md\n\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\n\n## 路径冲突仲裁（技能输出目录冲突）\n\n用户可能安装任意技能，部分技能自带输出路径约定（如 `~/Downloads/xxx/`）。当技能约定与 WORKSPACE.md 目录规范冲突时：\n\n**仲裁规则（优先级从高到低）：**\n\n1. **WORKSPACE.md 是唯一路径权威** — 冲突时一律以工作区目录规范为准\n2. **执行智能体负责路径翻译** — 将技能约定的外部路径映射到工作区（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`），不要求技能配合修改\n3. **汇报时注明差异** — 向用户汇报时说明「技能原约定 X，按工作区规范存到 Y」\n\n**设计原则：** 技能只负责「做什么」，路径归工作区管。自研技能不得硬编码工作目录，输出位置由 WORKSPACE.md 决定。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\n\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志\n\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\n\n> openclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v1.0.3:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.3\",\n  \"publishedAt\": 1787563531894\n}\n\nFile v1.0.3:skill-card.md\n\n## Description:\n\nInitializes and standardizes OpenClaw workspaces by creating the expected directory structure, writing persistent WORKSPACE.md rules, adding AGENTS.md configuration-safety guidance when present, and logging the setup.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, workspace maintainers, and agents use this skill to prepare or repair an OpenClaw workspace with standard folders, persistent workspace rules, safer shared-configuration guidance, and an initialization log.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill may write lasting workspace rules into WORKSPACE.md and shared-agent guidance into AGENTS.md.\n\nMitigation: Review WORKSPACE.md and AGENTS.md after running the skill, especially when persistent workspace rules are not desired.\n\nRisk: Shared OpenClaw configuration can be overwritten when agents use full replacement instead of partial updates.\n\nMitigation: Follow the skill's guidance to use config.patch for targeted updates and avoid config.apply except for initialization or migration scenarios.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Project documentation linked by the artifact](https://github.com/dtsola/openclaw-workspace-initializer)\n- [OpenClaw guide linked by the artifact](https://www.yuque.com/dtsola/igp1aa/adcicbai2zlem0bz)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown instructions with shell commands and persistent workspace files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Creates or updates workspace directories, WORKSPACE.md, optional AGENTS.md guidance, and a dated memory log entry.]\n\n## Skill Version(s):\n\n1.0.3 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.3:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\n\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\n\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.3:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\n\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\n\n## 目录结构\n\n| 目录 | 用途 | 生命周期 |\n|------|------|---------|\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\n| `knowledge/` | 知识库 | 永久 |\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\n| `memory/` | 日常日志 | 永久 |\n| `tmp/` | 临时缓存 | 手动清理 |\n| `.openclaw/`, `agent/`, `sessions/` | 系统目录，不要手动修改或删除 | 永久 |\n\n## 命名规范\n\n| 场景 | 规则 | 例子 |\n|------|------|------|\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\n\n## 行为规则\n\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\n8. **tmp 清理** → 只在用户要求时手动清理\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/` 不要手动修改或删除\n10. **技能路径冲突仲裁** → 其他技能约定的输出路径若与本文件冲突，一律以本文件为准，由执行智能体完成路径翻译，并向用户注明差异\n\nArchive v1.0.2: 5 files, 6450 bytes\n\nFiles: skill-card.md (2336b), SKILL.md (5808b), templates/AGENTS-config-safety.md (609b), templates/WORKSPACE.md (2137b), _meta.json (152b)\n\nFile v1.0.2:SKILL.md\n\n---\nname: openclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/openclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n## 工作流\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n\n### Step 2: 创建缺失的目录结构\n\n逐项创建缺失目录：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md\n\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\n\n## 路径冲突仲裁（技能输出目录冲突）\n\n用户可能安装任意技能，部分技能自带输出路径约定（如 `~/Downloads/xxx/`）。当技能约定与 WORKSPACE.md 目录规范冲突时：\n\n**仲裁规则（优先级从高到低）：**\n\n1. **WORKSPACE.md 是唯一路径权威** — 冲突时一律以工作区目录规范为准\n2. **执行智能体负责路径翻译** — 将技能约定的外部路径映射到工作区（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`），不要求技能配合修改\n3. **汇报时注明差异** — 向用户汇报时说明「技能原约定 X，按工作区规范存到 Y」\n\n**设计原则：** 技能只负责「做什么」，路径归工作区管。自研技能不得硬编码工作目录，输出位置由 WORKSPACE.md 决定。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\n\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志\n\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\n\n> openclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v1.0.2:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.2\",\n  \"publishedAt\": 1787284818273\n}\n\nFile v1.0.2:skill-card.md\n\n## Description:\n\nOpenClaw Workspace Initializer sets up and standardizes an OpenClaw agent workspace with required directories, WORKSPACE.md rules, multi-agent configuration safety guidance, and a memory log.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use this skill when entering a new or incomplete OpenClaw workspace to create standard workspace directories, persist workspace rules, add multi-agent configuration safety guidance, and record initialization activity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can add persistent workspace instructions and memory logs that affect future agent behavior.\n\nMitigation: Review WORKSPACE.md, AGENTS.md, and memory log changes after first use, especially in workspaces that already have local conventions.\n\nRisk: Workspace path rules may override output paths suggested by other skills.\n\nMitigation: Translate output locations to the workspace convention and report any path differences to the user.\n\nRisk: Multi-agent configuration edits can overwrite other agents' changes if applied as full replacements.\n\nMitigation: Use partial configuration patching for targeted changes and avoid full configuration replacement except during initialization or migration.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Project documentation](https://github.com/dtsola/openclaw-workspace-initializer)\n\n## Skill Output:\n\n**Output Type(s):** [Markdown, Shell commands, Configuration, Guidance, Files]\n\n**Output Format:** [Markdown with inline bash code blocks and workspace file templates]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Creates or updates workspace directories, WORKSPACE.md, AGENTS.md startup and configuration guidance, and memory logs when executed by an agent.]\n\n## Skill Version(s):\n\n1.0.2 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.2:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\n\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\n\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.2:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\n\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\n\n## 目录结构\n\n| 目录 | 用途 | 生命周期 |\n|------|------|---------|\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\n| `knowledge/` | 知识库 | 永久 |\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\n| `memory/` | 日常日志 | 永久 |\n| `tmp/` | 临时缓存 | 手动清理 |\n| `.openclaw/`, `agent/`, `sessions/` | 系统目录，不要手动修改或删除 | 永久 |\n\n## 命名规范\n\n| 场景 | 规则 | 例子 |\n|------|------|------|\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\n\n## 行为规则\n\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\n8. **tmp 清理** → 只在用户要求时手动清理\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/` 不要手动修改或删除\n10. **技能路径冲突仲裁** → 其他技能约定的输出路径若与本文件冲突，一律以本文件为准，由执行智能体完成路径翻译，并向用户注明差异\n\nArchive v1.0.1: 5 files, 5826 bytes\n\nFiles: skill-card.md (2060b), SKILL.md (5002b), templates/AGENTS-config-safety.md (609b), templates/WORKSPACE.md (1952b), _meta.json (152b)\n\nFile v1.0.1:SKILL.md\n\n---\nname: openclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/openclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n## 工作流\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n\n### Step 2: 创建缺失的目录结构\n\n逐项创建缺失目录：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md\n\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\n\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志\n\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\n\n> openclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v1.0.1:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.1\",\n  \"publishedAt\": 1787203618448\n}\n\nFile v1.0.1:skill-card.md\n\n## Description:\n\nOpenClaw workspace initialization and standardization skill that sets up a standard directory structure, WORKSPACE.md rules, multi-agent configuration safety guidance, and a memory log for new or incomplete OpenClaw workspaces.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and OpenClaw users use this skill to initialize or repair a workspace by creating standard folders, installing WORKSPACE.md guidance, adding multi-agent configuration safety notes to AGENTS.md when present, and recording an initialization log.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Persistent workspace guidance may conflict with existing AGENTS.md or WORKSPACE.md instructions in a workspace.\n\nMitigation: Install only where OpenClaw workspace rules are desired and review any AGENTS.md or WORKSPACE.md changes when the workspace already has agent instructions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [OpenClaw Workspace Initializer documentation](https://github.com/dtsola/openclaw-workspace-initializer)\n- [WORKSPACE.md template](templates/WORKSPACE.md)\n- [AGENTS config safety template](templates/AGENTS-config-safety.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown files, inline shell commands, and concise status guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create directories, WORKSPACE.md, AGENTS.md additions when present, and memory/YYYY-MM-DD.md log entries.]\n\n## Skill Version(s):\n\n1.0.1 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.1:templates/AGENTS-config-safety.md\n\n## 配置修改规范（多 agent 共享配置安全）\n\n多 agent 共享同一份 openclaw.json（所有 agent 定义都在 agents.list 里），互相覆盖风险高：\n\n- ✅ 改配置一律用 gateway `config.patch`（部分合并，只动指定字段）\n- ❌ 禁止使用 gateway `config.apply`（全量替换：会用自己会话的旧配置快照整份写回，抹掉其他 agent 的修改）\n- 背景：多个 agent 共享单份 openclaw.json，apply = 谁后写谁赢；openclaw.json.bak* 备份就是 apply 全量写入留下的痕迹\n- 例外：仅初始化 / 整体迁移等场景才考虑 apply\n\nFile v1.0.1:templates/WORKSPACE.md\n\n# WORKSPACE.md - 目录管理规则\n\n根目录不能乱扔文件！智能体每次启动时，请先阅读本文件。\n\n## 目录结构\n\n| 目录 | 用途 | 生命周期 |\n|------|------|---------|\n| `projects/` | 长期开发项目（有版本迭代） | 长期保留 |\n| `tasks/` | 一次性任务（PPT、调研、临时站点） | 完成后原地保留，日志记录 |\n| `outputs/` | 生成物（图片、文档等） | 按日期/主题分，定期清理 |\n| `knowledge/` | 知识库 | 永久 |\n| `scripts/` | 工具/一次性脚本 | 用完即删 |\n| `memory/` | 日常日志 | 永久 |\n| `tmp/` | 临时缓存 | 手动清理 |\n| `.openclaw/`, `agent/`, `sessions/` | 系统目录，不要手动修改或删除 | 永久 |\n\n## 命名规范\n\n| 场景 | 规则 | 例子 |\n|------|------|------|\n| 文件夹名 | kebab-case（小写+连字符） | `resume-site`, `ppt-anime-2026` |\n| Python 脚本 | snake_case | `create_ppt.py`, `parse_data.py` |\n| JS/TS 文件 | camelCase | `generateImage.js`, `fetchData.ts` |\n| Markdown 文件 | kebab-case | `WORKSPACE.md`, `project-overview.md` |\n\n## 行为规则\n\n1. **反馈至上** → 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n2. **新任务** → 先在 `tasks/` 或 `projects/` 建文件夹再干活\n3. **生成的图片** → 放到 `outputs/images/`，按日期分子目录\n4. **一次性脚本** → 放到对应 `tasks/xxx/` 目录下，不扔根目录\n5. **下载的文件** → 先到 `tmp/`，再移到对应目录\n6. **根目录** → 只放系统配置文件（*.md），不放任何项目文件\n7. **任务完结** → 用户确认后，在 `memory/` 日志记录一笔，文件夹原地保留\n8. **tmp 清理** → 只在用户要求时手动清理\n9. **系统目录** → `.openclaw/`、`agent/`、`sessions/` 不要手动修改或删除\n\nArchive v1.0.0: 3 files, 3970 bytes\n\nFiles: skill-card.md (1993b), SKILL.md (5002b), _meta.json (152b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: openclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/openclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n## 工作流\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n\n### Step 2: 创建缺失的目录结构\n\n逐项创建缺失目录：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md\n\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\n\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志\n\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\n\n> openclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1787053705147\n}\n\nFile v1.0.0:skill-card.md\n\n## Description:\n\nOpenClaw workspace initialization and standardization for agents, including a standard directory structure, WORKSPACE.md rules, multi-agent configuration safety guidance, and a memory log.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill when entering a new or incomplete OpenClaw workspace to create standard folders, persist workspace rules, and keep shared agent configuration changes safer.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill can create workspace folders and persist rules that affect future agent behavior.\n\nMitigation: Install it only in workspaces where this standard layout and persistent guidance are desired.\n\nRisk: AGENTS.md updates can influence startup behavior for later agents in shared workspaces.\n\nMitigation: Review any AGENTS.md changes after execution, especially in shared or multi-agent environments.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Publisher profile](https://clawhub.ai/user/dtsola)\n- [Project documentation](https://github.com/dtsola/openclaw-workspace-initializer)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown with inline shell commands and workspace file guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create workspace directories, WORKSPACE.md, AGENTS.md guidance, and a memory log when executed by an agent.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nArchive v0.1.1: 3 files, 3891 bytes\n\nFiles: skill-card.md (1822b), SKILL.md (5002b), _meta.json (152b)\n\nFile v0.1.1:SKILL.md\n\n---\nname: openclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. 中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/openclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n## 工作流\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n\n### Step 2: 创建缺失的目录结构\n\n逐项创建缺失目录：\n\n```bash\nmkdir -p projects tasks outputs/knowledge scripts memory tmp\n```\n\n`outputs/` 下按需创建 `images/` 和 `docs/` 子目录，不强制。\n\n### Step 3: 写入 WORKSPACE.md\n\n如果根目录没有 `WORKSPACE.md`，读取本 skill 的 `templates/WORKSPACE.md` 并写入根目录。\n\n### Step 4: 引导新智能体\n\n完成目录创建和 WORKSPACE.md 写入后，明确告知当前智能体：\n\n> **铁律 #1 — 反馈至上：** 无论任务成功还是失败，必须向用户报告结果。成功告知产出，失败告知原因和错误信息，由用户做下一步决策。智能体不得擅自决定下一步行动。\n>\n> **铁律 #2 — 遵守工作区规范：** 后续每次启动时，先读取根目录的 WORKSPACE.md，按照其中的目录结构和命名规范组织所有工作。根目录不应放置任何项目文件，只保留 *.md 配置文件。\n>\n> **铁律 #3 — 配置修改安全：** 改配置一律用 `config.patch`（部分合并，只动指定字段）；**禁止使用 `config.apply`**（全量替换：会用旧配置快照整份写回，抹掉其他 agent 的修改）。多 agent 共享同一份 openclaw.json，apply = 谁后写谁赢。\n\n### Step 4.5: 将工作区规范持久化到 AGENTS.md\n\n若根目录存在 `AGENTS.md`，执行以下两项持久化（若 AGENTS.md 不存在则跳过，或随工作区模板一并创建）：\n\n**① 启动读取规则（必写）：** 确保 AGENTS.md 的「Session Startup」章节（若没有该章节则新建）的启动必读列表中包含：\n\n> `Read WORKSPACE.md` — workspace directory rules\n\n即：agent 每次会话启动时，先读取 `WORKSPACE.md`（目录规则），再开始干活。\n\n**② 配置修改规范（多 agent 场景）：** 检查是否已包含「配置修改规范」；没有则追加 `templates/AGENTS-config-safety.md` 的内容。\n\n⚠️ **写入方式：** 必须用 Python 3 或文件编辑工具写入（UTF-8）；**不要用 PowerShell 5.1 内联脚本写中文**（按 GBK 解析无 BOM 的 UTF-8 脚本，中文会乱码）。\n\n### Step 5: 记录初始化日志\n\n在 `memory/` 下写入一条初始化记录（`memory/YYYY-MM-DD.md` 追加）：\n\n> openclaw-workspace-initializer 技能已执行，标准目录结构和 WORKSPACE.md 已就位；AGENTS.md 已写入「Read WORKSPACE.md — workspace directory rules」启动规则及配置修改规范。\n\n## 完整示例\n\n### 首次进入空工作区\n\n检测 → 发现缺失 → 创建目录 → 写入 WORKSPACE.md → 自我引导（铁律 #1/#2/#3）→ 持久化到 AGENTS.md → 记录日志\n\n**产出：**\n```\n根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置\n```\n\n### 重启后新智能体进入同一工作区\n\n新智能体 → 检测 → 发现 WORKSPACE.md 和所有目录已存在 → 跳过 Step 2-3 → 完成。\n\n**重启时依赖 WORKSPACE.md（目录规范）和 AGENTS.md（配置修改规范）作为持久化规范来源**，而不是依赖 SKILL.md（技能可能不在新智能体的技能列表中）。\n\nFile v0.1.1:_meta.json\n\n{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"0.1.1\",\n  \"publishedAt\": 1787053602352\n}\n\nFile v0.1.1:skill-card.md\n\n## Description:\n\nOpenClaw workspace initialization and standardization for creating a standard agent workspace structure, WORKSPACE.md rules, multi-agent configuration safety guidance, and a memory log.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agents use this skill when entering a new or incomplete OpenClaw workspace to create standard directories, add persistent workspace rules, preserve multi-agent configuration safety guidance, and record initialization activity.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Workspace guidance files such as AGENTS.md or WORKSPACE.md can affect future agent behavior in shared or already-customized workspaces.\n\nMitigation: Review proposed AGENTS.md and WORKSPACE.md changes before accepting them in shared or customized workspaces.\n\n## Reference(s):\n\n- [OpenClaw Workspace Initializer documentation](https://github.com/dtsola/openclaw-workspace-initializer)\n- [ClawHub skill page](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration, Guidance]\n\n**Output Format:** [Markdown with inline shell commands and configuration guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May create or update workspace guidance files and append an initialization log.]\n\n## Skill Version(s):\n\n0.1.1 (source: release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.","readmeExcerpt":"Skill: OpenClaw Workspace Initializer Owner: dtsola Summary: 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 WOR","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"检测结果（只读）\n  缺失目录：memory/  tmp/\n  缺失文件：WORKSPACE.md\n  将创建：  4 个目录 + 1 个文件（内容：标准目录规范模板）\n  不会触碰：已存在的 projects/ tasks/ knowledge/ scripts/ outputs/\n  需要单独批准：AGENTS.md 的启动读取规则（会改变未来会话的启动行为）"},{"language":"bash","snippet":"mkdir -p projects tasks outputs/knowledge scripts memory tmp"},{"language":"text","snippet":"根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置"},{"language":"text","snippet":"检测结果（只读）\n  缺失目录：memory/  tmp/\n  缺失文件：WORKSPACE.md\n  将创建：  4 个目录 + 1 个文件（内容：标准目录规范模板）\n  不会触碰：已存在的 projects/ tasks/ knowledge/ scripts/ outputs/\n  需要单独批准：AGENTS.md 的启动读取规则（会改变未来会话的启动行为）"},{"language":"bash","snippet":"mkdir -p projects tasks outputs/knowledge scripts memory tmp"},{"language":"text","snippet":"根目录/\n├── projects/\n├── tasks/\n├── outputs/\n│   ├── images/\n│   └── docs/\n├── knowledge/\n├── scripts/\n├── memory/\n│   └── YYYY-MM-DD.md    ← 初始化日志\n├── tmp/\n├── WORKSPACE.md          ← 持久化规范文件\n├── SOUL.md\n├── USER.md\n└── ...其他系统配置"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: xiaoyaoclaw-workspace-initializer\ndescription: >\n  OpenClaw workspace initialization & standardization. Sets up a proper agent\n  home: standard directory structure (projects/tasks/outputs/knowledge/scripts/\n  memory/tmp) + WORKSPACE.md rules + multi-agent config safety (config.patch,\n  never config.apply) + memory log. Use when an agent enters a new/empty\n  workspace root, or when the standard subdirectories or WORKSPACE.md are\n  missing. Activate only after the user explicitly asks to initialize or repair\n  this workspace, and only in a workspace root the user names as such. Do NOT\n  activate in a repository that already has its own structure or an alternative\n  workspace convention, and never rewrite the user's existing governance files\n  (AGENTS.md / WORKSPACE.md / SOUL.md / USER.md) without showing the exact diff\n  and getting explicit approval first.\n  中文：OpenClaw 工作区初始化与规范维护，多 agent 配置安全。仅在用户明确要求\n  初始化/修复本工作区、且确认这是工作区根目录时使用；已有项目结构或已存在其他\n  工作区规范的仓库不触发；AGENTS.md / WORKSPACE.md / SOUL.md / USER.md 属用户\n  资产，未经用户看到确切 diff 并明确同意，不擅自改写。\n---\n\n# OpenClaw Workspace Initializer（工作区初始化器）\n\n> 📖 **完整文档（安装 / 快速上手三步 / 定制服务）：<https://github.com/dtsola/xiaoyaoclaw-workspace-initializer>**\n> 用户或智能体需要更多说明时，引导其访问上述 GitHub 仓库查看图文教程与最新版本。\n\n> 🚀 **小遥AI：「让每个人的数字生活，都有一座自己说了算的小遥」：<https://www.xiaoyaosai.com/>**\n> 🚀 **XiaoyaoAI：「For every digital life,Everyone has aXiaoyao of their own」：<https://www.xiaoyaosai.com/>**\n\n初始化 OpenClaw agent 工作区：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\n让每个 agent 都有一个「家」——不迷路、不丢记忆、不踩配置坑。\n\n> 🧩 **姊妹项目：** 🧠 **xiaoyaoclaw-memory-distill**（记忆整理工具）——把对话蒸馏成结构化记忆（MEMORY.md + 每日日志），解决上下文溢出，缺失时自动首次建忆：<https://github.com/dtsola/xiaoyaoclaw-memory-distill>\n\n## 激活边界（避免误触发 / 越权改动）\n\n**只在下面两种情况进入工作流：**\n\n1. 用户**明确要求**初始化 / 修复本工作区（「初始化一下工作区」「补上缺的目录和规范」）；或\n2. 智能体发现当前根目录**确实缺少**标准目录或 `WORKSPACE.md`，**且**用户当轮的任务本来就要在该目录下落文件。\n\n**以下情况不要激活、不要改动任何东西：**\n\n- 仓库里已经有自己的目录结构与规范（例如已有 `src/`、`docs/`、`apps/` 等工程约定）；\n- 已存在其他工作区规范（别的 `WORKSPACE.md` / `.cursor/rules/` / 团队规范）——先问用户以哪套为准；\n- 用户只是在提问、讨论、看代码，或没有要求结构化改造；\n- 工作区已经合规（此时**什么都不做**，只回一句「已符合规范」，不产生任何写入）。\n\n**不可越界的三条：**\n\n- **不覆盖已有文件**：只创建缺失项，已存在的目录/文件一律跳过。\n- **用户资产只提议、不擅自改**：`AGENTS.md`、`WORKSPACE.md`、`SOUL.md`、`USER.md` 等治理与配置类文件，改前必须展示**确切 diff** 并取得用户明确同意。\n- **不装常驻机制**：不建 cron、不起守护进程、不写启动脚本、不写跨会话状态文件；本技能只在用户批准的那一轮里做文件改动。\n\n## 工作流\n\n### Step 0: 先出差异清单，默认 dry-run（改动前必须过的闸门）\n\n在任何写入之前，先给用户一份**差异清单**，并停下来等确认：\n\n```text\n检测结果（只读）\n  缺失目录：memory/  tmp/\n  缺失文件：WORKSPACE.md\n  将创建：  4 个目录 + 1 个文件（内容：标准目录规范模板）\n  不会触碰：已存在的 projects/ tasks/ knowledge/ scripts/ outputs/\n  需要单独批准：AGENTS.md 的启动读取规则（会改变未来会话的启动行为）\n```\n\n用户确认后再进入 Step 2；用户没确认就**不改任何东西**。\n\n### Step 1: 检测当前状态\n\n检查工作区根目录是否存在以下内容：\n\n**必备子目录：**\n- `projects/` — 长期开发项目\n- `tasks/` — 一次性任务\n- `outputs/` — 生成物（图片、文档等）\n- `knowledge/` — 知识库\n- `scripts/` — 工具/一次性脚本\n- `memory/` — 日常日志\n- `tmp/` — 临时缓存\n\n**必备规范文件：**\n- `WORKSPACE.md` — 目录管理规则（持久化规范，重启后依然生效）\n\n**系统目录（不要修改或删除）：**\n- `.openclaw/`\n- `agent/`\n- `sessions/`\n- `.clawhub/`\n\n### Step 2: 创建缺失的目录结构（用户确认后执行）\n\n逐项创建**缺失**目录（已存在的一律跳过，绝"},{"path":"README.md","content":"# OpenClaw Workspace Initializer 🏠\r\n\r\n<div align=\"center\">\r\n  <strong>🇨🇳 中文</strong> | <a href=\"README.en.md\">🌐 English</a>\r\n</div>\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> 给每个 OpenClaw agent 一个「家」：标准目录结构 + WORKSPACE.md 规范 + 多 agent 配置安全。\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## 为什么需要它\r\n\r\nOpenClaw agent 每次会话都是全新启动。没有工作区规范，你的 agent 会：\r\n- ❌ 把文件乱扔在根目录，越攒越乱\r\n- ❌ 忘记自己的记忆系统（`memory/`），每次醒来都失忆\r\n- ❌ 在多 agent 共享配置时，用 `config.apply` 整份覆盖 openclaw.json，**抹掉其他 agent 的修改**\r\n\r\n这个 skill 一次性解决：**目录结构 + 持久化规范 + 配置安全**。\r\n\r\n## 特性\r\n\r\n- 🗂️ 标准目录结构：`projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md 规范：重启后依然生效的目录管理规则（**用户资产** —— 内容先给你过目，已存在则不覆盖）\r\n- 🛡️ 多 agent 配置安全：只用 `config.patch`，禁止 `config.apply` 覆盖他人修改\r\n- ⚖️ **文件放置统一**：其他技能约定与 WORKSPACE.md 冲突的**输出路径**，由执行 agent 映射进工作区并注明差异（如 `~/Downloads/research/<topic>` → `tasks/<topic>/`）——但技能自身的安全规则、许可与流程优先，不覆盖、不要求技能绕过；换位置解决不了的冲突会先问你\r\n\r\n## 安装\r\n\r\n```bash\r\n# ClawHub（推荐）\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# 或从 GitHub 手动安装\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# 把 SKILL.md 和 templates/ 放到你的 skills 目录\r\n```\r\n\r\n## 使用\r\n\r\n1. 把 skill 放到 OpenClaw 的 skills 目录\r\n2. 首次进入（或重置）一个工作区时，agent 会自动：\r\n   - 创建 `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - 写入 `WORKSPACE.md` 目录规范（重启后依然生效）\r\n   - 检测多 agent 场景，把「config.patch ✅ / config.apply ❌」安全规范持久化进 `AGENTS.md`\r\n   - 在 `memory/` 记录初始化日志\r\n\r\n## 🚀 快速上手（三步，10 分钟）\r\n\r\n以飞书 Bot 接入为例，三步让你的 agent 拥有一个规范的家：\r\n\r\n### Step 1：接入你的 agent\r\n\r\n新建一个智能体并接入（飞书 Bot / 微信 / Telegram 等均可），和它完成身份确认——起名字、确定称呼、划定职责范围：\r\n\r\n![Step 1 - 全新 agent 接入](assets/quickstart-step1-new-agent.png)\r\n\r\n### Step 2：一句话触发初始化\r\n\r\n对你的 agent 说：\r\n\r\n> 初始化你的工作目录，使用 xiaoyaoclaw-workspace-initializer\r\n\r\nagent 会**先给差异清单等你确认**（将创建什么 / 不会动什么），确认后再执行：建缺失目录 → 写入 `WORKSPACE.md` → 把「Read WORKSPACE.md」启动规则与配置安全规范作为**建议补丁**给你过目（`AGENTS.md` 影响未来每次会话启动，需单独同意）→ 记录初始化日志：\r\n\r\n![Step 2 - 执行初始化](assets/quickstart-step2-init-workspace.png)\r\n\r\n### Step 3：验收成果\r\n\r\n打开 agent 的工作区目录（Windows 资源管理器示例），标准结构已就位：\r\n\r\n![Step 3 - 初始化完成](assets/quickstart-step3-workspace-ready.png)\r\n\r\n> 💡 之后每次会话，agent 都会先读 `WORKSPACE.md` 再干活——目录不乱、记忆不丢、配置不打架。\r\n\r\n## 与其他方案的区别\r\n\r\n| | openclaw-workspace-starter | **xiaoyaoclaw-workspace-initializer** |\r\n|---|---|---|\r\n| 目录结构 | 基础模板 | 完整规范体系（7 目录 + 命名规范 + 行为规则） |\r\n| 持久化规范 | 无 WORKSPACE.md 规范 | ✅ WORKSPACE.md 重启后持续生效 |\r\n| 多 agent 配置安全 | ❌ | ✅ config.patch / 禁"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn792btccw444kydadc12dd0jd8afqyw\",\n  \"slug\": \"xiaoyaoclaw-workspace-initializer\",\n  \"version\": \"1.0.8\",\n  \"publishedAt\": 1790589905700\n}"},{"path":"README.en.md","content":"# OpenClaw Workspace Initializer 🏠\r\n\r\n> Give every OpenClaw agent a home: standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n\r\n<p align=\"center\">\r\n  <img src=\"./assets/readme/hero.svg\" width=\"100%\" alt=\"OpenClaw Workspace Initializer — give every OpenClaw agent a home: standard directory structure, WORKSPACE.md rules, multi-agent config safety\">\r\n</p>\r\n\r\n> Give every OpenClaw agent a \"home\": standard directory structure + WORKSPACE.md rules + multi-agent config safety.\r\n> OpenClaw workspace initialization & standardization — the agent home your agents deserve.\r\n\r\n![license](https://img.shields.io/badge/license-MIT-green)\r\n[![ClawHub downloads](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fclawhub.ai%2Fapi%2Fv1%2Fskills%2Fxiaoyaoclaw-workspace-initializer&query=skill.stats.downloads&label=ClawHub%20downloads&color=blue)](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\r\n\r\n## Why you need it\r\n\r\nEvery OpenClaw agent session starts fresh. Without workspace conventions, your agent will:\r\n- ❌ Scatter files around the root directory, messier every day\r\n- ❌ Forget its own memory system (`memory/`), waking up amnesiac every session\r\n- ❌ In multi-agent shared config setups, use `config.apply` to overwrite the whole `openclaw.json`, **wiping out other agents' changes**\r\n\r\nThis skill solves it all in one go: **directory structure + persistent rules + config safety**.\r\n\r\n## Features\r\n\r\n- 🗂️ Standard directory structure: `projects/` `tasks/` `outputs/` `knowledge/` `scripts/` `memory/` `tmp/`\r\n- 📜 WORKSPACE.md rules: directory conventions that survive restarts — **yours to own**; the skill shows the content first and never overwrites an existing file\r\n- 🛡️ Multi-agent config safety: `config.patch` only — `config.apply` is forbidden to avoid overwriting others' changes\r\n- ⚖️ **Unified file placement**: when another skill's output path clashes with WORKSPACE.md, the executing agent maps the output into the workspace and notes the difference (e.g. `~/Downloads/research/<topic>` → `tasks/<topic>/`) — while the skill's own safety rules, licence and workflow stay authoritative, and unresolvable conflicts go back to you.\r\n\r\n## Install\r\n\r\n```bash\r\n# From ClawHub (recommended)\r\nclawhub install xiaoyaoclaw-workspace-initializer\r\n\r\n# Or manually from GitHub\r\ngit clone https://github.com/dtsola/xiaoyaoclaw-workspace-initializer\r\n# Put SKILL.md and templates/ into your skills directory\r\n```\r\n\r\n## Usage\r\n\r\n1. Put the skill in your OpenClaw skills directory\r\n2. When entering (or resetting) a workspace, your agent will automatically:\r\n   - Create `projects/ tasks/ outputs/ knowledge/ scripts/ memory/ tmp/`\r\n   - Write the `WORKSPACE.md` directory rules (only if missing; you approve the content first)\r\n   - Detect multi-agent setups and propose the \"config.patch ✅ / config.apply ❌\" rules for `AGENTS.md` (diff first, written only with your approval)\r\n   - Log the initialization into `memory/`\r\n\r\n## 🚀 Quick Start"},{"path":"skill-card.md","content":"## Description:\n\nInitializes an approved OpenClaw workspace with standard directories, workspace rules, and guidance for safe multi-agent configuration changes.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[dtsola](https://clawhub.ai/user/dtsola)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nOpenClaw users and agent developers use this skill to organize a user-approved workspace, add persistent directory conventions, and propose safe configuration rules without overwriting existing governance files.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Changes to WORKSPACE.md or AGENTS.md can steer future agent behavior in the workspace.\n\nMitigation: Review the dry-run and exact file diffs before approval; do not change existing governance files without explicit consent.\n\n## Reference(s):\n\n- [ClawHub skill release](https://clawhub.ai/dtsola/skills/xiaoyaoclaw-workspace-initializer)\n- [Workspace rules template](templates/WORKSPACE.md)\n- [Agent configuration safety template](templates/AGENTS-config-safety.md)\n\n## Skill Output:\n\n**Output Type(s):** [Text, Markdown, Shell commands, Configuration guidance, Files]\n\n**Output Format:** [Markdown guidance, proposed diffs, and approved local workspace files]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Presents a dry-run before changes and requires explicit approval for workspace rules or agent startup instructions.]\n\n## Skill Version(s):\n\n1.0.8 (source: server-resolved ClawHub release)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1832,"uniquenessScore":36,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T18:39:20.915Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T18:39:20.915Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T22:56:55.701Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}