GEO 智能优化任务 OpenClaw 协同 — 拉取 OPT 周期状态,分发深度仿写与 sau 群发。
---
name: geo-opt-coordinator
description: GEO 智能优化任务 OpenClaw 协同 — 拉取 OPT 周期状态,分发深度仿写与 sau 群发。
---
# GEO 智能优化协同(Coordinator)
轮询 SaaS 已开启 **OpenClaw 协同** 的 `OPT-*` 任务,按服务端返回的 `openclawActions` 执行子流程。
## 前置
- `~/.qclaw/geo-api-key`(QClaw;Windows `%USERPROFILE%\.qclaw\geo-api-key`),或兼容路径 `~/.openclaw/geo-api-key`(商户 API Key,在 SaaS **账户设置 → 龙虾密钥** 自助签发)
- SaaS 创建优化任务时勾选 **深度仿写** 和/或 **sau 平台**(会自动 `openclawCoordinatorEnabled=true`)
- Celery 已跑完当轮诊断(`needsDeepImitate` 依赖 `diagnosis_report_id`)
- 深度仿写:本机 `FIRECRAWL_API_KEY` + `firecrawl_scrape` 工具
- sau 发布:本机安装 social-auto-upload,完成各平台 Cookie 登录
## 启动后自动轮询
OpenClaw 启动后,建议使用 **loop** 定时执行本 skill 完整循环(无需 SaaS Webhook):
```
/loop 60s 执行 geo-opt-coordinator 推荐循环:拉取 OPT 任务,处理 needsDeepImitate 与 needsSauPublish
```
或将以下流程写入 Agent 系统提示词 / heartbeat,每 60s 执行一次。
## API
- 基础地址:`https://ai.gaobobo.cn`(本地 `http://127.0.0.1:8002`)
- 鉴权:`Authorization: Bearer $GEO_KEY`
### 拉取任务列表
```bash
GEO_KEY=$(cat ~/.qclaw/geo-api-key 2>/dev/null || cat ~/.openclaw/geo-api-key 2>/dev/null)
curl -s "https://ai.gaobobo.cn/api/geo/optimization/tasks" \
-H "Authorization: Bearer $GEO_KEY"
```
响应每项含:
- `task`:品牌、关键词、开关
- `latestCycle`:本轮 `contentTaskIds`、`cycleStepResults`
- `openclawActions`:
- `needsDeepImitate` → 使用 skill **geo-deep-imitate**
- `needsSauPublish` + `pendingSauPlatforms` → 使用 skill **geo-social-publish**
- `publishableContentTaskIds`:可 sau 分发的 `CG-*`
### 单任务详情
```bash
curl -s "https://ai.gaobobo.cn/api/geo/optimization/OPT-XXXXXXXXXXXX" \
-H "Authorization: Bearer $GEO_KEY"
```
### 最新周期
```bash
curl -s "https://ai.gaobobo.cn/api/geo/optimization/OPT-XXXXXXXXXXXX/cycles/latest" \
-H "Authorization: Bearer $GEO_KEY"
```
## 推荐循环
1. `GET /optimization/tasks`
2. 对 `needsDeepImitate=true` 的任务执行 **geo-deep-imitate**(同一 `taskId` + `latestCycle.cycleNumber`)
3. 对 `needsSauPublish=true` 的任务,对每个 `publishableContentTaskIds` × `pendingSauPlatforms` 执行 **geo-social-publish**
4. 间隔 ≥ 60s 再次拉取(文章轮询仍须 ≥30s)
## 回写与 SaaS 可见性
- 深度仿写完成后 Backend 写入 `latestCycle.cycleStepResults.deepImitate`(status、taskIds、usedSources)
- sau 发布回写 `cycleStepResults.sauPublish.platforms.{slug}` 与发稿记录
- SaaS 优化任务监控 / 周期日志中展示 **OpenClaw 协同** 区块
## 注意
- 不替代 SaaS Celery 优化周期;不调用网易 OAuth 发稿
- 遗留全局 Key 无法使用协同接口,须商户 Key
don't have the plugin yet? install it then click "run inline in claude" again.