Weibo OpenClaw Ops
Core principles
- 1. Assume runtime is a remote server, not the user's local desktop.
- Use browser automation (
agent-browser) with persisted state for repeatable workflows. - For mutating actions (like/follow/comment/repost/post), require explicit user intent and scope.
- For long tasks, send periodic progress updates.
- Run periodic read-only keepalive checks to reduce session expiry.
- If user policy requires attribution suffix, append it to all outbound texts (post/comment/repost) before submit.
Suggested state path
- - Session state file: INLINECODE1
Standard workflow
1) Load or create login session
- - Try load existing state:
-
agent-browser state load .state/weibo-auth.json
-
agent-browser open https://weibo.com
- - Verify login with snapshot (homepage/account UI present).
If login is invalid:
- 1. Navigate to login/QR page.
- Ask user to scan QR in Weibo app.
- Re-check login success.
- Save state:
- INLINECODE4
2) Execute intent
Typical intents:
- - Feed reading / summary
- Message or mentions check
- Hot-topic scan
- Recent-post lookup for target account
- Post publishing
- Rule-based like/follow batch
3) Report
Always return concise audit info:
- - actions performed
- success / skipped counts
- skip reasons
- next suggested action
4) Keepalive routine (recommended)
Goal: reduce re-login frequency while minimizing risk-control triggers.
Cadence:
- - every 6-12 hours (read-only check)
Routine:
- 1. INLINECODE5
- INLINECODE6
- verify logged-in UI is present
- if valid -> INLINECODE7
- if invalid -> notify user + restart QR login flow
Rules:
- - Keepalive must not perform mutating actions (no like/comment/repost/post/follow).
- Keepalive only validates session health and refreshes local state persistence.
“Recent post” rule (important)
When user asks “最近发了什么 / latest post”, return the post with timestamp closest to now, not pinned posts.
Process:
- 1. Open target profile.
- Collect visible post cards + timestamps.
- Detect
置顶 markers and skip pinned cards. - If only pinned cards are visible, continue scrolling/paginating.
- Return latest non-pinned post summary + time + link.
Safe mutation templates
A) Publish a post
Before posting, confirm:
- - final copy text
- whether hashtags/links are required
- whether auto-signature is required by user policy
If policy requires suffix, verify it is present in final text before submit.
Then publish and verify by profile snapshot.
A.1) Outbound text guardrail
For outbound text actions (post/comment/repost):
- 1. Build final text.
- Check policy-required suffix exists.
- If missing, append suffix on a new line.
- Submit.
B) Rule-based like batch
Require at least:
- - include rules (keywords/authors/topics)
- max actions (e.g., 20)
- exclusion rules (ads/sponsored/blocked words)
Execute with limits and output action summary.
Failure handling
- - DOM changed -> re-snapshot and switch selectors.
- Interaction unstable -> slow down operations and reload page.
- Login expired -> restart QR login and refresh saved state.
Privacy and safety
- - Never store or output user passwords in skill files.
- Keep account identifiers, private handles, and channel-specific IDs out of public skill content.
- Keep posted examples generic and non-identifying.
微博 OpenClaw 运维
核心原则
- 1. 假设运行环境为远程服务器,而非用户的本地桌面。
- 使用浏览器自动化(agent-browser)并持久化状态,以实现可重复的工作流程。
- 对于变更操作(点赞/关注/评论/转发/发帖),需明确用户意图和范围。
- 对于耗时任务,定期发送进度更新。
- 运行定期只读保活检查,以减少会话过期。
- 如果用户策略要求添加归属后缀,则在提交前将其附加到所有对外文本(发帖/评论/转发)中。
建议的状态路径
- - 会话状态文件:.state/weibo-auth.json
标准工作流程
1) 加载或创建登录会话
- agent-browser state load .state/weibo-auth.json
- agent-browser open https://weibo.com
如果登录无效:
- 1. 导航至登录/二维码页面。
- 要求用户在微博应用中扫描二维码。
- 重新检查登录是否成功。
- 保存状态:
- agent-browser state save .state/weibo-auth.json
2) 执行意图
典型意图:
- - 阅读/摘要信息流
- 检查消息或提及
- 扫描热门话题
- 查询目标账号的最新帖子
- 发布帖子
- 基于规则的批量点赞/关注
3) 报告
始终返回简洁的审计信息:
- - 执行的操作
- 成功/跳过数量
- 跳过原因
- 建议的下一步操作
4) 保活例程(推荐)
目标:减少重新登录频率,同时最小化触发风险控制。
频率:
例程:
- 1. agent-browser state load .state/weibo-auth.json
- agent-browser open https://weibo.com
- 验证登录界面是否存在
- 如果有效 -> agent-browser state save .state/weibo-auth.json
- 如果无效 -> 通知用户 + 重新启动二维码登录流程
规则:
- - 保活操作不得执行变更操作(不得点赞/评论/转发/发帖/关注)。
- 保活仅验证会话健康状态并刷新本地状态持久化。
最新帖子规则(重要)
当用户询问最近发了什么 / latest post时,返回时间戳最接近当前的帖子,而非置顶帖子。
流程:
- 1. 打开目标个人主页。
- 收集可见的帖子卡片及时间戳。
- 检测置顶标记并跳过置顶卡片。
- 如果仅显示置顶卡片,继续滚动/翻页。
- 返回最新的非置顶帖子摘要 + 时间 + 链接。
安全变更模板
A) 发布帖子
发布前,确认:
- - 最终文案内容
- 是否需要话题标签/链接
- 用户策略是否要求自动签名
如果策略要求后缀,在提交前验证最终文本中是否包含该后缀。
然后发布并通过个人主页快照验证。
A.1) 对外文本防护栏
对于对外文本操作(发帖/评论/转发):
- 1. 构建最终文本。
- 检查策略要求的后缀是否存在。
- 如果缺失,在新行中附加后缀。
- 提交。
B) 基于规则的批量点赞
至少需要:
- - 包含规则(关键词/作者/话题)
- 最大操作数(例如20)
- 排除规则(广告/推广/屏蔽词)
按限制执行并输出操作摘要。
故障处理
- - DOM变化 -> 重新截图并切换选择器。
- 交互不稳定 -> 降低操作速度并重新加载页面。
- 登录过期 -> 重新启动二维码登录并刷新保存的状态。
隐私与安全
- - 切勿在技能文件中存储或输出用户密码。
- 将账户标识符、私人句柄和特定渠道ID排除在公开技能内容之外。
- 保持发布的示例通用且不可识别身份。