[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77S41QTB9EG5JMKKMBKFZSH":3,"skill-same:01M77S41QTB9EG5JMKKMBKFZSH":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77S41QTB9EG5JMKKMBKFZSH","project-factory",null,"Bootstrap a new OpenClaw automation project using a four-phase workflow: Phase 0 — LLM reasoning: infer project type, flowchart structure, and node draft from a plain-language description, Phase 1 — confirm or edit the flowchart from Phase 0, Phase 2 — configure each node (skill, cron, credentials), Phase 3 — generate the full project scaffold in one pass. Phase 0 model is configurable: defaults to MiniMax-M2.5 (FAST), upgrade to GPT-4.1 (SMART) for complex projects. Use when the user says \"创建新项目\", \"new project\", \"新建项目\", \"项目初始化\", \"设计一个新流程\", \"帮我画个流程\", or asks to automate a new workflow. Triggers whenever a new project, new automation, or new content pipeline is discussed.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fp\u002Fproject-factory\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: project-factory\ndescription: >\n  Bootstrap a new OpenClaw automation project using a four-phase workflow:\n  Phase 0 — LLM reasoning: infer project type, flowchart structure, and node draft from a plain-language description,\n  Phase 1 — confirm or edit the flowchart from Phase 0,\n  Phase 2 — configure each node (skill, cron, credentials),\n  Phase 3 — generate the full project scaffold in one pass.\n  Phase 0 model is configurable: defaults to MiniMax-M2.5 (FAST), upgrade to GPT-4.1 (SMART) for complex projects.\n  Use when the user says \"创建新项目\", \"new project\", \"新建项目\", \"项目初始化\",\n  \"设计一个新流程\", \"帮我画个流程\", or asks to automate a new workflow.\n  Triggers whenever a new project, new automation, or new content pipeline is discussed.\n---\n\n# Project Scaffold Skill v2\n\n## Core Philosophy\n\n**Flow first, scaffold second.** Before touching any technical parameter, the project must be understood as a process. The flowchart is the source of truth — all config (cron, skills, routing, state files) is derived from it.\n\n---\n\n## How It Works — Four Phases\n\n```\n用户触发 → 阶段零：LLM推理 → 阶段一：确认流程图 → 阶段二：节点配置 → 阶段三：技术初始化 → 生成项目\n```\n\n---\n\n## Phase 0: LLM Reasoning (Automatic)\n\nTriggered as soon as the user describes a project in plain language.\n\n### Step 0.1 — Infer Project Structure\n\nSynthesize a project structure from the user's plain-language description using the LLM's own reasoning, guided by the flow_design_language node vocabulary.\n\n**Model selection:**\n- Default: `MiniMax-M2.5` (FAST tier, cost-efficient)\n- Upgrade to `GPT-4.1` (SMART tier) when: the project involves 5+ nodes, multiple conditions\u002Fbranches, or non-standard sources\n- Upgrade to `POWER\u002FMAX` only when the user explicitly requests it or the project involves mission-critical logic\n\n**Reasoning process (not an external API call):**\n\nPhase 0 does not call another model or external API. The LLM synthesizes the structure internally by applying the following reasoning steps to the user's plain-language description:\n\n1. Classify project type (content monitoring \u002F auto-publish \u002F data collection \u002F hybrid)\n2. Determine trigger type (cron \u002F event \u002F manual)\n3. Map the core flow: which nodes are required from trigger to end\n4. Assign a skill recommendation to each node\n5. Identify whether conditions or wait nodes are needed\n\nOutput fields:\n```json\n{\n  \"project_type\": \"...\",\n  \"trigger_type\": \"cron | event | manual\",\n  \"flowchart\": \"\u003Csingle-line Mermaid, flowchart LR>\",\n  \"nodes\": [{\"id\": \"FETCH\", \"label\": \"抓取内容\", \"type\": \"fetch\", \"skill\": \"...\", \"config\": {}}],\n  \"complexity\": \"low | medium | high\",\n  \"recommended_model\": \"minimax | gpt-4.1 | power | max\"\n}\n```\n\nPresent the result to the user as a draft:\n\n> **LLM 推理结果**（模型：`MiniMax-M2.5`）\n> 项目类型：内容监控\n> 推荐流程：trigger → fetch → filter → rewrite → publish → report → end\n> \n> ```mermaid\n> flowchart LR\n>     START([开始]) --> TRIGGER{{定时触发}}\n>     ...\n> ```\n> \n> 模型推荐：`GPT-4.1`（项目较复杂）— 如需调整请说\"用 GPT-4.1\"或\"切换到快速模式\"\n\n**Model switch trigger:** if the user's description mentions \"复杂\"、\"高要求\"、\"多条件\"，auto-escalate model to GPT-4.1 and confirm.\n\n### Step 0.2 — User Confirms or Adjusts\n\nThe user may:\n- Confirm: \"没问题，继续\"\n- Adjust: \"把 X 改成 Y\" → regenerate with adjusted nodes\n- Switch model: \"用 GPT-4.1 重来\" or \"快速模式就够了\"\n- Skip reasoning: \"直接告诉我流程，我自己调整\"\n\nOnce confirmed → proceed to Phase 1.\n\n**JSON validation sanity check (do not skip):** Before presenting Phase 0 output, verify the `flowchart` Mermaid syntax is valid (all nodes use correct `{{ }}` for conditions, `[ ]` for processes, matching brackets). If malformed, regenerate rather than present broken diagrams to the user.\n\n---\n\n## Phase 1: Design the Flowchart\n\n### Step 1.0 — Model Declaration (from Phase 0)\n\nAt the start of Phase 1, state the active model based on Phase 0 output:\n\n> **Phase 1 模型：`GPT-4.1`**（Phase 0 推荐：项目涉及多条件分支）\n> 如需切换，请说\"切换到 MiniMax\"或\"用 POWER\"\n\nIf Phase 0 was skipped, infer model from the confirmed flowchart: low complexity (≤4 nodes, no conditions) → MiniMax-M2.5; medium\u002Fhigher → GPT-4.1.\n\n### Step 1.1 — Confirm or Edit Flowchart\n\nThe Phase 0 LLM reasoning output becomes the starting point. Ask:\n\n> **\"以上流程图是否准确？需要调整吗？\"**\n\nIf the user made no prior description (Phase 0 skipped), fall back to the original Step 1.1: ask \"这个项目要自动化什么？最终产出是什么？谁会用到它？\"\n\n**Supported node types:**\n\n| Node Type | Meaning | Recommended Skill |\n|-----------|---------|-------------------|\n| `trigger` | 触发源（定时、手动、事件） | cron \u002F manual |\n| `fetch` | 抓取数据（网页、API、RSS、视频） | summarize \u002F agent-reach \u002F yt-dlp |\n| `filter` | 按条件过滤内容 | regex \u002F keyword \u002F LLM |\n| `rewrite` | 改写\u002F加工内容（翻译、摘要、风格调整） | LLM (MiniMax\u002FGPT) |\n| `generate` | 生成新内容（图、文、视频） | image_generate \u002F tts \u002F video_generate |\n| `publish` | 发布到外部平台 | wechat-api \u002F telegram \u002F email |\n| `wait` | 等待\u002F延迟 | sleep \u002F cron |\n| `condition` | 条件分支 | LLM (router) |\n| `report` | 向项目群汇报状态 | pipeline_reporter |\n| `end` | 流程结束 | — |\n\n### Step 1.2 — Edit if Needed\n\nIf the user requests changes, update the Mermaid diagram directly. Use the same syntax rules from Phase 0.\n\n**Mermaid syntax rules (for edits):**\n- Use `{{ }}` for conditions\u002Fdecision nodes\n- Use `[ ]` for process nodes\n- Use `(-->)` for main flow arrows\n- Use `-->|` for conditional arrows with label\n- Use `(|label|)` for conditional branches\n\n### Step 1.3 — Iterative Refinement\n\nAsk the user if the flowchart is correct. Allow edits:\n- User says \"把 X 和 Y 合并成一个节点\" → regenerate\n- User says \"在 A 和 B 之间加一个过滤节点\" → insert node\n- User says \"X 之后要等 10 分钟再发布\" → add `wait` node\n- User says \"改写之前还要翻译成英文\" → insert `translate` node\n\nRepeat until the user confirms: **\"没问题，继续\"** or **\"可以了\"**.\n\n---\n\n## Phase 2: Configure Each Node\n\nAfter flowchart is confirmed, go through each node (except `START`\u002F`END`) and ask. Use the `nodes` array from Phase 0 as the starting config draft for each node — pre-fill known fields (type, skill) and confirm or override.\n\n> **\"节点 [X] 需要配置什么？\"**\n\nFor each node, derive and confirm:\n\n| Node | Derived Config |\n|------|----------------|\n| `trigger` | cron expression (e.g. `0 9 * * *`) |\n| `fetch` | source URL \u002F API \u002F RSS feed |\n| `filter` | filter criteria (keywords, regex, or LLM prompt) |\n| `rewrite` | rewrite instructions \u002F target language \u002F style |\n| `generate` | generation prompt \u002F media type |\n| `publish` | platform (wechat \u002F telegram \u002F email) + account |\n| `wait` | delay duration |\n| `condition` | condition logic |\n| `report` | which thread to report to (report \u002F chat) |\n\n**Skill auto-recommendation logic:**\n\n```\nnode.type = \"fetch\" + source contains \"youtube\" → recommend \"yt-dlp \u002F summarize\"\nnode.type = \"fetch\" + source contains \"rss\" → recommend \"summarize\"\nnode.type = \"fetch\" + source is \"webpage\" → recommend \"summarize \u002F browser-use\"\nnode.type = \"rewrite\" → recommend MiniMax-M2.5 by default\nnode.type = \"generate\" + \"image\" → recommend image_generate (gemini\u002Fgpt-image-2)\nnode.type = \"generate\" + \"video\" → recommend video_generate\nnode.type = \"publish\" + \"wechat\" → recommend wechat-api (agent-reach)\nnode.type = \"publish\" + \"telegram\" → recommend telegram bot\nnode.type = \"filter\" → recommend regex \u002F keyword \u002F LLM\nnode.type = \"report\" → always available (pipeline_reporter)\n```\n\nFor each node, confirm:\n1. The recommended skill(s)\n2. Any required credentials or tokens (e.g. WeChat API key, bot token)\n\n### Step 2.1 — Compile Final `nodes_json`\n\nAfter all nodes are configured, serialize the final node list as a JSON array. This becomes `--nodes-json` for `bootstrap_project.py`:\n\n```bash\nnodes_json='[\n  {\"id\": \"FETCH\", \"label\": \"抓取内容\", \"type\": \"fetch\", \"skill\": \"summarize\", \"config\": {\"source\": \"...\"}},\n  {\"id\": \"FILTER\", \"label\": \"过滤\", \"type\": \"filter\", \"skill\": \"regex\", \"config\": {\"keywords\": \"...\"}}\n]'\n```\n\n**Verify before proceeding:** JSON validation runs automatically during `--interactive` bootstrap via the script layer. If running manual invocation, verify with `echo $nodes_json | python3 -m json.tool > \u002Fdev\u002Fnull` before passing to `--nodes-json`.\n\n---\n\n## Phase 3: Technical Initialization\n\nAfter all nodes are configured, collect the remaining technical parameters:\n\n### Required (*)\n\n| Parameter | Question |\n|-----------|----------|\n| `project_key` * | 项目英文标识（slug，英文+短横线，如 `fashion-monitor`）|\n| `project_name` * | 项目中文名称，如 `时尚监控 Pipeline` |\n| `bot_token` * | Telegram Bot Token（已有项目可复用）|\n| `chat_id` * | 项目群 Chat ID（数字形式，如 `-1001234567890`）|\n| `thread_ids` * | 线程映射（默认：`general=1,report=2,chat=3`）|\n\n### Optional\n\n| Parameter | Default |\n|-----------|---------|\n| `cron_timeout_seconds` | `1200` |\n| `routing_group` | `new`（新组）或现有组名 |\n| `wechat_publish` | `no` |\n| `wechat_clash_selector` | `GLOBAL`（如需切换节点）|\n| `wechat_clash_unix` | `\u002Ftmp\u002Fverge\u002Fverge-mihomo.sock` |\n\n---\n\n## Step 4: Generate Project\n\nAfter all parameters confirmed, run the bootstrap script:\n\n```bash\npython3 skills\u002Fproject-scaffold\u002Fscripts\u002Fbootstrap_project.py \\\n  --project-key \"\u003Cproject_key>\" \\\n  --project-name \"\u003Cproject_name>\" \\\n  --description \"\u003Cdescription>\" \\\n  --flowchart \"\u003Cmermaid_flowchart_as_single_line>\" \\\n  --bot-token \"\u003Cbot_token>\" \\\n  --chat-id \"\u003Cchat_id>\" \\\n  --thread-ids \"\u003Cthread_ids>\" \\\n  --cron-schedule \"\u003Ccron_schedule>\" \\\n  --cron-timeout \"\u003Ccron_timeout_seconds>\" \\\n  --nodes-json '\u003Cnodes_json>'\n```\n\nThe script generates:\n- All identity\u002Fproject\u002Fworkflow files\n- `config\u002Fruntime.env` with skill deps\n- `WORKFLOW.md` with the Mermaid flowchart embedded\n- `scripts\u002Frun_pipeline.sh` with nodes wired as pipeline stages\n- `scripts\u002F\u003Cproject>_bot.py` as a **stub placeholder** — node logic is commented, requires manual implementation per node after scaffold\n- Telegram routing + Cron registration\n\n**Stub bot note:** `\u003Cproject>_bot.py` is generated as a bare placeholder. The `nodes_json` config is written to `WORKFLOW.md` for reference, but the stub does not auto-wire skills or credentials. After scaffold, implement each node handler in the stub using the skill calls documented in `WORKFLOW.md`.\n\n---\n\n## Bootstrap Flags\n\n| Flag | Purpose |\n|------|---------|\n| `--plan` | **新项目首选**。不写文件、不做验证，只预览完整影响面（30个文件 + config写入 + cron注册 + agent注册），然后 exit 0。 |\n| `--dry-run` | 创建所有文件 → 运行自动体验(G) → 若 FAIL 则 abort，不写 config；若 OK 则 exit 0（不写 config）。 |\n| `--validate-only \u003Cpath>` | 对已有项目做 8 项体检。不修改任何文件。 |\n| `--fix-suggestions` | 随 `--validate-only` 使用，输出每个 FAIL\u002FWARN 的可粘贴修复代码块。 |\n| `--fix-dry-run` | 随 `--validate-only` 使用，预览 `--fix` 的实际写入操作（带 backup 计划）。 |\n| `--fix` | 对已有项目应用所有自动安全修复（创建缺失文件、补充 runtime.env 变量），exit 0 即成功。 |\n| `--continue-from-fix \u003Cpath>` | 在 `--fix` 成功后，补跑被 G-abort 跳过的 config 写入（routing、agent 注册、telegram 配置、cron 注册）。从项目目录读取配置，不需要完整参数。 |\n| `--fix-and-continue \u003Cpath>` | **推荐合并命令**。等于 `--fix` + `--continue-from-fix` 一次性完成：体检 → 自动修复 → 重体验 → 补跑 config 写入。FAIL 时中途 abort，不会污染 config。 |\n| `--interactive` | **交互式引导**：分步收集所有参数，每步带验证（project_key 格式、chat_id 格式、cron 表达式等），收集完成后直接进入 bootstrap 流程（等同于 `--fix-and-continue`）。 |\n| `--all-projects` | 对 `projects\u002F` 下所有项目跑快速体检，输出汇总表（FAIL数\u002FWARN数\u002F状态），exit 0 即全部健康。 |\n| `--cron-list` | 从 openclaw cron 读取所有 job（JSON 格式），输出格式化表格，包含状态\u002FID\u002FSchedule\u002F所属项目。 |\n| `--cron-remove \u003Cjob-id>` | 删除指定 cron job（需先 `--cron-list` 查到 ID）。 |\n\n**交互式引导步骤：**\n1. `project_key` — 英文小写+短横线，自动验证格式\n2. `project_name` — 中文名\n3. `description` — 项目描述\n4. `chat_id` — 格式验证\n5. `bot_token` — 长度验证\n6. `routing_group` — 默认 new\n7. `cron_schedule` — 5位 cron 验证\n8. 线程 ID — general\u002Freport\u002Fchat 默认 1\u002F2\u002F3\n9. 确认后自动进入 `--fix-and-continue` 流程 |\n\n**推荐工作流（简化版）：**\n1. `bootstrap_project.py --interactive` → 交互式引导，参数自动验证，一步完成 bootstrap\n2. 或分步：`bootstrap_project.py --plan ...` → `bootstrap_project.py --fix-and-continue --validate-only \u003Cpath>`\n3. 定期：`bootstrap_project.py --all-projects` → 全项目体检，优先修复 FAIL 数量最多的项目\n\n**完整五步（当需要细粒度控制时）：**\n1. `bootstrap_project.py --plan ...`\n2. `bootstrap_project.py --dry-run ...`\n3. `bootstrap_project.py --fix-dry-run --validate-only \u003Cpath>`\n4. `bootstrap_project.py --fix --validate-only \u003Cpath>`\n5. `bootstrap_project.py --continue-from-fix \u003Cpath>`\n\n---\n\n## Required References\n\nBefore running, read:\n- `references\u002Farchitecture.md` — shared pipeline pattern (unchanged, still valid)\n- `references\u002Fflow_design_language.md` — node type definitions, Mermaid syntax guide, and skill recommendation rules\n- `references\u002Fonboarding_checklist.md` — project setup checklist\n- `references\u002Fshared_routing_group_schema.md` — shared routing group schema\n\n---\n\n## Constraints\n\n- **Never start with technical parameters.** Flowchart must be confirmed before asking for `bot_token` \u002F `chat_id` \u002F `cron_schedule`.\n- **Every non-START\u002FEND node must have a skill assignment** before generation.\n- **WeChat publish is optional.** Only include WeChat config if a `publish` node targets WeChat.\n- **Cron delivery is always `mode=none`.** Reporter controls delivery to prevent dual-reporting.\n- **Mermaid is primary; ASCII is fallback** if Telegram cannot render the code block.\n- **If user is unsure about a node**, ask a clarifying question rather than guessing. A vague flow is better than a wrong one — the flowchart is a thinking tool, not a constraint.\n- **Report nodes are mandatory** for automated pipelines. Human-in-the-loop approval steps should also appear as report nodes.\n\n---\n\n## Example Conversation Flow\n\n```\n用户: 创建一个新的内容监控项目\nAK:    收到，正在推理项目结构...\n\n  LLM 推理结果（模型：MiniMax-M2.5）\n  项目类型：内容监控 + 自动发布\n  推荐流程：trigger → fetch → filter → rewrite → publish → report → end\n\n  ```mermaid\n  flowchart LR\n      START([开始]) --> TRIGGER{{定时触发}}\n      TRIGGER --> FETCH[抓取油管频道]\n      FETCH --> FILTER{新视频?}\n      FILTER -->|是| REWRITE[改写为公众号风格]\n      FILTER -->|否| END1([结束])\n      REWRITE --> PUBLISH[发布到微信公众号]\n      PUBLISH --> REPORT[汇报结果]\n      REPORT --> END2([结束])\n  ```\n\n  模型推荐：GPT-4.1（涉及多平台判断）— 如需调整请说\"用 GPT-4.1\"\n\n  确认这个流程？\n用户: 可以，但我想在改写之前先加一个质量判断\nAK:    收到，更新后的图：\n\n  ```mermaid\n  flowchart LR\n      START --> TRIGGER{{定时触发}}\n      TRIGGER --> FETCH[抓取油管频道]\n      FETCH --> FILTER{新视频?}\n      FILTER -->|否| END1\n      FILTER -->|是| QUALITY{内容质量够高?}\n      QUALITY -->|否| END2\n      QUALITY -->|是| REWRITE[改写为公众号风格]\n      REWRITE --> PUBLISH[发布到微信公众号]\n      PUBLISH --> REPORT --> END3\n  ```\n\n  这样可以吗？\n用户: 没问题，继续\nAK:    好，现在配置每个节点：\n\n  节点 [定时触发] — cron 表达式是什么？比如每天早上 9 点：`0 9 * * *`\n用户: 每天早上9点\nAK:    收到。节点 [抓取油管频道] — 频道 RSS 或 URL 是什么？\n用户: 有三个频道...\n  （继续逐节点配置...）\n```\n","# Project Scaffold Skill v2\n\n## Core Philosophy\n\n**Flow first, scaffold second.** Before touching any technical parameter, the project must be understood as a process. The flowchart is the source of truth — all config (cron, skills, routing, state files) is derived from it.\n\n---\n\n## How It Works — Four Phases\n\n```\n用户触发 → 阶段零：LLM推理 → 阶段一：确认流程图 → 阶段二：节点配置 → 阶段三：技术初始化 → 生成项目\n```\n\n---\n\n## Phase 0: LLM Reasoning (Automatic)\n\nTriggered as soon as the user describes a project in plain language.\n\n### Step 0.1 — Infer Project Structure\n\nSynthesize a project structure from the user's plain-language description using the LLM's own reasoning, guided by the flow_design_language node vocabulary.\n\n**Model selection:**\n- Default: `MiniMax-M2.5` (FAST tier, cost-efficient)\n- Upgrade to `GPT-4.1` (SMART tier) when: the project involves 5+ nodes, multiple conditions\u002Fbranches, or non-standard sources\n- Upgrade to `POWER\u002FMAX` only when the user explicitly requests it or the project involves mission-critical logic\n\n**Reasoning process (not an external API call):**\n\nPhase 0 does not call another model or external API. The LLM synthesizes the structure internally by applying the following reasoning steps to the user's plain-language description:\n\n1. Classify project type (content monitoring \u002F auto-publish \u002F data collection \u002F hybrid)\n2. Determine trigger type (cron \u002F event \u002F manual)\n3. Map the core flow: which nodes are required from trigger to end\n4. Assign a skill recommendation to each node\n5. Identify whether conditions or wait nodes are needed\n\nOutput fields:\n```json\n{\n  \"project_type\": \"...\",\n  \"trigger_type\": \"cron | event | manual\",\n  \"flowchart\": \"\u003Csingle-line Mermaid, flowchart LR>\",\n  \"nodes\": [{\"id\": \"FETCH\", \"label\": \"抓取内容\", \"type\": \"fetch\", \"skill\": \"...\", \"config\": {}}],\n  \"complexity\": \"low | medium | high\",\n  \"recommended_model\": \"minimax | gpt-4.1 | power | max\"\n}\n```\n\nPresent the result to the user as a draft:\n\n> **LLM 推理结果**（模型：`MiniMax-M2.5`）\n> 项目类型：内容监控\n> 推荐流程：trigger → fetch → filter → rewrite → publish → report → end\n> \n> ```mermaid\n> flowchart LR\n>     START([开始]) --> TRIGGER{{定时触发}}\n>     ...\n> ```\n> \n> 模型推荐：`GPT-4.1`（项目较复杂）— 如需调整请说\"用 GPT-4.1\"或\"切换到快速模式\"\n\n**Model switch trigger:** if the user's description mentions \"复杂\"、\"高要求\"、\"多条件\"，auto-escalate model to GPT-4.1 and confirm.\n\n### Step 0.2 — User Confirms or Adjusts\n\nThe user may:\n- Confirm: \"没问题，继续\"\n- Adjust: \"把 X 改成 Y\" → regenerate with adjusted nodes\n- Switch model: \"用 GPT-4.1 重来\" or \"快速模式就够了\"\n- Skip reasoning: \"直接告诉我流程，我自己调整\"\n\nOnce confirmed → proceed to Phase 1.\n\n**JSON validation sanity check (do not skip):** Before presenting Phase 0 output, verify the `flowchart` Mermaid syntax is valid (all nodes use correct `{{ }}` for conditions, `[ ]` for processes, matching brackets). If malformed, regenerate rather than present broken diagrams to the user.\n\n---\n\n## Phase 1: Design the Flowchart\n\n### Step 1.0 — Model Declaration (from Phase 0)\n\nAt the start of Phase 1, state the active model based on Phase 0 output:\n\n> **Phase 1 模型：`GPT-4.1`**（Phase 0 推荐：项目涉及多条件分支）\n> 如需切换，请说\"切换到 MiniMax\"或\"用 POWER\"\n\nIf Phase 0 was skipped, infer model from the confirmed flowchart: low complexity (≤4 nodes, no conditions) → MiniMax-M2.5; medium\u002Fhigher → GPT-4.1.\n\n### Step 1.1 — Confirm or Edit Flowchart\n\nThe Phase 0 LLM reasoning output becomes the starting point. Ask:\n\n> **\"以上流程图是否准确？需要调整吗？\"**\n\nIf the user made no prior description (Phase 0 skipped), fall back to the original Step 1.1: ask \"这个项目要自动化什么？最终产出是什么？谁会用到它？\"\n\n**Supported node types:**\n\n| Node Type | Meaning | Recommended Skill |\n|-----------|---------|-------------------|\n| `trigger` | 触发源（定时、手动、事件） | cron \u002F manual |\n| `fetch` | 抓取数据（网页、API、RSS、视频） | summarize \u002F agent-reach \u002F yt-dlp |\n| `filter` | 按条件过滤内容 | regex \u002F keyword \u002F LLM |\n| `rewrite` | 改写\u002F加工内容（翻译、摘要、风格调整） | LLM (MiniMax\u002FGPT) |\n| `generate` | 生成新内容（图、文、视频） | image_generate \u002F tts \u002F video_generate |\n| `publish` | 发布到外部平台 | wechat-api \u002F telegram \u002F email |\n| `wait` | 等待\u002F延迟 | sleep \u002F cron |\n| `condition` | 条件分支 | LLM (router) |\n| `report` | 向项目群汇报状态 | pipeline_reporter |\n| `end` | 流程结束 | — |\n\n### Step 1.2 — Edit if Needed\n\nIf the user requests changes, update the Mermaid diagram directly. Use the same syntax rules from Phase 0.\n\n**Mermaid syntax rules (for edits):**\n- Use `{{ }}` for conditions\u002Fdecision nodes\n- Use `[ ]` for process nodes\n- Use `(-->)` for main flow arrows\n- Use `-->|` for conditional arrows with label\n- Use `(|label|)` for conditional branches\n\n### Step 1.3 — Iterative Refinement\n\nAsk the user if the flowchart is correct. Allow edits:\n- User says \"把 X 和 Y 合并成一个节点\" → regenerate\n- User says \"在 A 和 B 之间加一个过滤节点\" → insert node\n- User says \"X 之后要等 10 分钟再发布\" → add `wait` node\n- User says \"改写之前还要翻译成英文\" → insert `translate` node\n\nRepeat until the user confirms: **\"没问题，继续\"** or **\"可以了\"**.\n\n---\n\n## Phase 2: Configure Each Node\n\nAfter flowchart is confirmed, go through each node (except `START`\u002F`END`) and ask. Use the `nodes` array from Phase 0 as the starting config draft for each node — pre-fill known fields (type, skill) and confirm or override.\n\n> **\"节点 [X] 需要配置什么？\"**\n\nFor each node, derive and confirm:\n\n| Node | Derived Config |\n|------|----------------|\n| `trigger` | cron expression (e.g. `0 9 * * *`) |\n| `fetch` | source URL \u002F API \u002F RSS feed |\n| `filter` | filter criteria (keywords, regex, or LLM prompt) |\n| `rewrite` | rewrite instructions \u002F target language \u002F style |\n| `generate` | generation prompt \u002F media type |\n| `publish` | platform (wechat \u002F telegram \u002F email) + account |\n| `wait` | delay duration |\n| `condition` | condition logic |\n| `report` | which thread to report to (report \u002F chat) |\n\n**Skill auto-recommendation logic:**\n\n```\nnode.type = \"fetch\" + source contains \"youtube\" → recommend \"yt-dlp \u002F summarize\"\nnode.type = \"fetch\" + source contains \"rss\" → recommend \"summarize\"\nnode.type = \"fetch\" + source is \"webpage\" → recommend \"summarize \u002F browser-use\"\nnode.type = \"rewrite\" → recommend MiniMax-M2.5 by default\nnode.type = \"generate\" + \"image\" → recommend image_generate (gemini\u002Fgpt-image-2)\nnode.type = \"generate\" + \"video\" → recommend video_generate\nnode.type = \"publish\" + \"wechat\" → recommend wechat-api (agent-reach)\nnode.type = \"publish\" + \"telegram\" → recommend telegram bot\nnode.type = \"filter\" → recommend regex \u002F keyword \u002F LLM\nnode.type = \"report\" → always available (pipeline_reporter)\n```\n\nFor each node, confirm:\n1. The recommended skill(s)\n2. Any required credentials or tokens (e.g. WeChat API key, bot token)\n\n### Step 2.1 — Compile Final `nodes_json`\n\nAfter all nodes are configured, serialize the final node list as a JSON array. This becomes `--nodes-json` for `bootstrap_project.py`:\n\n```bash\nnodes_json='[\n  {\"id\": \"FETCH\", \"label\": \"抓取内容\", \"type\": \"fetch\", \"skill\": \"summarize\", \"config\": {\"source\": \"...\"}},\n  {\"id\": \"FILTER\", \"label\": \"过滤\", \"type\": \"filter\", \"skill\": \"regex\", \"config\": {\"keywords\": \"...\"}}\n]'\n```\n\n**Verify before proceeding:** JSON validation runs automatically during `--interactive` bootstrap via the script layer. If running manual invocation, verify with `echo $nodes_json | python3 -m json.tool > \u002Fdev\u002Fnull` before passing to `--nodes-json`.\n\n---\n\n## Phase 3: Technical Initialization\n\nAfter all nodes are configured, collect the remaining technical parameters:\n\n### Required (*)\n\n| Parameter | Question |\n|-----------|----------|\n| `project_key` * | 项目英文标识（slug，英文+短横线，如 `fashion-monitor`）|\n| `project_name` * | 项目中文名称，如 `时尚监控 Pipeline` |\n| `bot_token` * | Telegram Bot Token（已有项目可复用）|\n| `chat_id` * | 项目群 Chat ID（数字形式，如 `-1001234567890`）|\n| `thread_ids` * | 线程映射（默认：`general=1,report=2,chat=3`）|\n\n### Optional\n\n| Parameter | Default |\n|-----------|---------|\n| `cron_timeout_seconds` | `1200` |\n| `routing_group` | `new`（新组）或现有组名 |\n| `wechat_publish` | `no` |\n| `wechat_clash_selector` | `GLOBAL`（如需切换节点）|\n| `wechat_clash_unix` | `\u002Ftmp\u002Fverge\u002Fverge-mihomo.sock` |\n\n---\n\n## Step 4: Generate Project\n\nAfter all parameters confirmed, run the bootstrap script:\n\n```bash\npython3 skills\u002Fproject-scaffold\u002Fscripts\u002Fbootstrap_project.py \\\n  --project-key \"\u003Cproject_key>\" \\\n  --project-name \"\u003Cproject_name>\" \\\n  --description \"\u003Cdescription>\" \\\n  --flowchart \"\u003Cmermaid_flowchart_as_single_line>\" \\\n  --bot-token \"\u003Cbot_token>\" \\\n  --chat-id \"\u003Cchat_id>\" \\\n  --thread-ids \"\u003Cthread_ids>\" \\\n  --cron-schedule \"\u003Ccron_schedule>\" \\\n  --cron-timeout \"\u003Ccron_timeout_seconds>\" \\\n  --nodes-json '\u003Cnodes_json>'\n```\n\nThe script generates:\n- All identity\u002Fproject\u002Fworkflow files\n- `config\u002Fruntime.env` with skill deps\n- `WORKFLOW.md` with the Mermaid flowchart embedded\n- `scripts\u002Frun_pipeline.sh` with nodes wired as pipeline stages\n- `scripts\u002F\u003Cproject>_bot.py` as a **stub placeholder** — node logic is commented, requires manual implementation per node after scaffold\n- Telegram routing + Cron registration\n\n**Stub bot note:** `\u003Cproject>_bot.py` is generated as a bare placeholder. The `nodes_json` config is written to `WORKFLOW.md` for reference, but the stub does not auto-wire skills or credentials. After scaffold, implement each node handler in the stub using the skill calls documented in `WORKFLOW.md`.\n\n---\n\n## Bootstrap Flags\n\n| Flag | Purpose |\n|------|---------|\n| `--plan` | **新项目首选**。不写文件、不做验证，只预览完整影响面（30个文件 + config写入 + cron注册 + agent注册），然后 exit 0。 |\n| `--dry-run` | 创建所有文件 → 运行自动体验(G) → 若 FAIL 则 abort，不写 config；若 OK 则 exit 0（不写 config）。 |\n| `--validate-only \u003Cpath>` | 对已有项目做 8 项体检。不修改任何文件。 |\n| `--fix-suggestions` | 随 `--validate-only` 使用，输出每个 FAIL\u002FWARN 的可粘贴修复代码块。 |\n| `--fix-dry-run` | 随 `--validate-only` 使用，预览 `--fix` 的实际写入操作（带 backup 计划）。 |\n| `--fix` | 对已有项目应用所有自动安全修复（创建缺失文件、补充 runtime.env 变量），exit 0 即成功。 |\n| `--continue-from-fix \u003Cpath>` | 在 `--fix` 成功后，补跑被 G-abort 跳过的 config 写入（routing、agent 注册、telegram 配置、cron 注册）。从项目目录读取配置，不需要完整参数。 |\n| `--fix-and-continue \u003Cpath>` | **推荐合并命令**。等于 `--fix` + `--continue-from-fix` 一次性完成：体检 → 自动修复 → 重体验 → 补跑 config 写入。FAIL 时中途 abort，不会污染 config。 |\n| `--interactive` | **交互式引导**：分步收集所有参数，每步带验证（project_key 格式、chat_id 格式、cron 表达式等），收集完成后直接进入 bootstrap 流程（等同于 `--fix-and-continue`）。 |\n| `--all-projects` | 对 `projects\u002F` 下所有项目跑快速体检，输出汇总表（FAIL数\u002FWARN数\u002F状态），exit 0 即全部健康。 |\n| `--cron-list` | 从 openclaw cron 读取所有 job（JSON 格式），输出格式化表格，包含状态\u002FID\u002FSchedule\u002F所属项目。 |\n| `--cron-remove \u003Cjob-id>` | 删除指定 cron job（需先 `--cron-list` 查到 ID）。 |\n\n**交互式引导步骤：**\n1. `project_key` — 英文小写+短横线，自动验证格式\n2. `project_name` — 中文名\n3. `description` — 项目描述\n4. `chat_id` — 格式验证\n5. `bot_token` — 长度验证\n6. `routing_group` — 默认 new\n7. `cron_schedule` — 5位 cron 验证\n8. 线程 ID — general\u002Freport\u002Fchat 默认 1\u002F2\u002F3\n9. 确认后自动进入 `--fix-and-continue` 流程 |\n\n**推荐工作流（简化版）：**\n1. `bootstrap_project.py --interactive` → 交互式引导，参数自动验证，一步完成 bootstrap\n2. 或分步：`bootstrap_project.py --plan ...` → `bootstrap_project.py --fix-and-continue --validate-only \u003Cpath>`\n3. 定期：`bootstrap_project.py --all-projects` → 全项目体检，优先修复 FAIL 数量最多的项目\n\n**完整五步（当需要细粒度控制时）：**\n1. `bootstrap_project.py --plan ...`\n2. `bootstrap_project.py --dry-run ...`\n3. `bootstrap_project.py --fix-dry-run --validate-only \u003Cpath>`\n4. `bootstrap_project.py --fix --validate-only \u003Cpath>`\n5. `bootstrap_project.py --continue-from-fix \u003Cpath>`\n\n---\n\n## Required References\n\nBefore running, read:\n- `references\u002Farchitecture.md` — shared pipeline pattern (unchanged, still valid)\n- `references\u002Fflow_design_language.md` — node type definitions, Mermaid syntax guide, and skill recommendation rules\n- `references\u002Fonboarding_checklist.md` — project setup checklist\n- `references\u002Fshared_routing_group_schema.md` — shared routing group schema\n\n---\n\n## Constraints\n\n- **Never start with technical parameters.** Flowchart must be confirmed before asking for `bot_token` \u002F `chat_id` \u002F `cron_schedule`.\n- **Every non-START\u002FEND node must have a skill assignment** before generation.\n- **WeChat publish is optional.** Only include WeChat config if a `publish` node targets WeChat.\n- **Cron delivery is always `mode=none`.** Reporter controls delivery to prevent dual-reporting.\n- **Mermaid is primary; ASCII is fallback** if Telegram cannot render the code block.\n- **If user is unsure about a node**, ask a clarifying question rather than guessing. A vague flow is better than a wrong one — the flowchart is a thinking tool, not a constraint.\n- **Report nodes are mandatory** for automated pipelines. Human-in-the-loop approval steps should also appear as report nodes.\n\n---\n\n## Example Conversation Flow\n\n```\n用户: 创建一个新的内容监控项目\nAK:    收到，正在推理项目结构...\n\n  LLM 推理结果（模型：MiniMax-M2.5）\n  项目类型：内容监控 + 自动发布\n  推荐流程：trigger → fetch → filter → rewrite → publish → report → end\n\n  ```mermaid\n  flowchart LR\n      START([开始]) --> TRIGGER{{定时触发}}\n      TRIGGER --> FETCH[抓取油管频道]\n      FETCH --> FILTER{新视频?}\n      FILTER -->|是| REWRITE[改写为公众号风格]\n      FILTER -->|否| END1([结束])\n      REWRITE --> PUBLISH[发布到微信公众号]\n      PUBLISH --> REPORT[汇报结果]\n      REPORT --> END2([结束])\n  ```\n\n  模型推荐：GPT-4.1（涉及多平台判断）— 如需调整请说\"用 GPT-4.1\"\n\n  确认这个流程？\n用户: 可以，但我想在改写之前先加一个质量判断\nAK:    收到，更新后的图：\n\n  ```mermaid\n  flowchart LR\n      START --> TRIGGER{{定时触发}}\n      TRIGGER --> FETCH[抓取油管频道]\n      FETCH --> FILTER{新视频?}\n      FILTER -->|否| END1\n      FILTER -->|是| QUALITY{内容质量够高?}\n      QUALITY -->|否| END2\n      QUALITY -->|是| REWRITE[改写为公众号风格]\n      REWRITE --> PUBLISH[发布到微信公众号]\n      PUBLISH --> REPORT --> END3\n  ```\n\n  这样可以吗？\n用户: 没问题，继续\nAK:    好，现在配置每个节点：\n\n  节点 [定时触发] — cron 表达式是什么？比如每天早上 9 点：`0 9 * * *`\n用户: 每天早上9点\nAK:    收到。节点 [抓取油管频道] — 频道 RSS 或 URL 是什么？\n用户: 有三个频道...\n  （继续逐节点配置...）\n```\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fp\u002Fproject-factory",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill project-factory",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill project-factory",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill project-factory","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fp\u002Fproject-factory\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]