返回顶部
b

baoyu-post-to-x发布到X

Posts content and articles to X (Twitter). Supports regular posts with images/videos and X Articles (long-form Markdown). Uses real Chrome with CDP to bypass anti-automation. Use when user asks to "post to X", "tweet", "publish to Twitter", or "share on X".

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
2,213
下载量
免费
免费
3
收藏
概述
安装方式
版本历史

baoyu-post-to-x

发布到 X (Twitter)

通过真实的 Chrome 浏览器发布文本、图片、视频和长文到 X(绕过反机器人检测)。

脚本目录

重要提示:所有脚本均位于此技能的 scripts/ 子目录中。

代理执行说明

  1. 1. 确定此 SKILL.md 文件的目录路径为 SKILLDIR
  2. 脚本路径 = ${SKILLDIR}/scripts/<脚本名称>.ts
  3. 将本文档中的所有 ${SKILL_DIR} 替换为实际路径

脚本参考

脚本用途
scripts/x-browser.ts常规帖子(文本 + 图片)
scripts/x-video.ts
视频帖子(文本 + 视频) |
| scripts/x-quote.ts | 带评论的引用推文 |
| scripts/x-article.ts | 长文发布(Markdown) |
| scripts/md-to-html.ts | Markdown → HTML 转换 |
| scripts/copy-to-clipboard.ts | 复制内容到剪贴板 |
| scripts/paste-from-clipboard.ts | 发送真实粘贴按键 |

偏好设置 (EXTEND.md)

使用 Bash 检查 EXTEND.md 是否存在(优先级顺序):

bash

首先检查项目级别


test -f .baoyu-skills/baoyu-post-to-x/EXTEND.md && echo project

然后检查用户级别(跨平台:$HOME 在 macOS/Linux/WSL 上均有效)

test -f $HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md && echo user

┌──────────────────────────────────────────────────┬───────────────────┐
│ 路径 │ 位置 │
├──────────────────────────────────────────────────┼───────────────────┤
│ .baoyu-skills/baoyu-post-to-x/EXTEND.md │ 项目目录 │
├──────────────────────────────────────────────────┼───────────────────┤
│ $HOME/.baoyu-skills/baoyu-post-to-x/EXTEND.md │ 用户主目录 │
└──────────────────────────────────────────────────┴───────────────────┘

┌───────────┬───────────────────────────────────────────────────────────────────────────┐
│ 结果 │ 操作 │
├───────────┼───────────────────────────────────────────────────────────────────────────┤
│ 找到 │ 读取、解析、应用设置 │
├───────────┼───────────────────────────────────────────────────────────────────────────┤
│ 未找到 │ 使用默认设置 │
└───────────┴───────────────────────────────────────────────────────────────────────────┘

EXTEND.md 支持:默认 Chrome 配置文件 | 自动提交偏好

前提条件

  • - Google Chrome 或 Chromium
  • bun 运行时
  • 首次运行:手动登录 X(会话会保存)

参考

  • - 常规帖子:参见 references/regular-posts.md 了解手动工作流程、故障排除和技术细节
  • X 文章:参见 references/articles.md 了解长文发布指南

常规帖子

文本 + 最多 4 张图片。

bash
npx -y bun ${SKILL_DIR}/scripts/x-browser.ts 你好! --image ./photo.png # 预览
npx -y bun ${SKILL_DIR}/scripts/x-browser.ts 你好! --image ./photo.png --submit # 发布

参数

参数描述
<文本>帖子内容(位置参数)
--image <路径>
图片文件(可重复,最多 4 个) |
| --submit | 发布(默认:预览) |
| --profile <目录> | 自定义 Chrome 配置文件 |


视频帖子

文本 + 视频文件。

bash
npx -y bun ${SKILL_DIR}/scripts/x-video.ts 看看这个! --video ./clip.mp4 # 预览
npx -y bun ${SKILL_DIR}/scripts/x-video.ts 精彩内容 --video ./demo.mp4 --submit # 发布

参数

参数描述
<文本>帖子内容(位置参数)
--video <路径>
视频文件(MP4、MOV、WebM) |
| --submit | 发布(默认:预览) |
| --profile <目录> | 自定义 Chrome 配置文件 |

限制:普通用户最长 140 秒,高级用户最长 60 分钟。处理时间:30-60 秒。



引用推文

引用现有推文并添加评论。

bash
npx -y bun ${SKILL_DIR}/scripts/x-quote.ts https://x.com/user/status/123 很有见地! # 预览
npx -y bun ${SKILL_DIR}/scripts/x-quote.ts https://x.com/user/status/123 我同意! --submit # 发布

参数

参数描述
<推文-URL>要引用的 URL(位置参数)
<评论>
评论文本(位置参数,可选) |
| --submit | 发布(默认:预览) |
| --profile <目录> | 自定义 Chrome 配置文件 |


X 文章

长文 Markdown 文章(需要 X Premium)。

bash
npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md # 预览
npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md --cover ./cover.jpg # 带封面
npx -y bun ${SKILL_DIR}/scripts/x-article.ts article.md --submit # 发布

参数

参数描述
<markdown>Markdown 文件(位置参数)
--cover <路径>
封面图片 |
| --title <文本> | 覆盖标题 |
| --submit | 发布(默认:预览) |

前置元数据:支持 YAML 前置元数据中的 title、cover_image。



注意事项

  • - 首次运行:需要手动登录(会话会持久保存)
  • 始终在 --submit 前预览
  • 跨平台:macOS、Linux、Windows

扩展支持

通过 EXTEND.md 进行自定义配置。参见偏好设置部分了解路径和支持的选项。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 baoyu-post-to-x-1776361742 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 baoyu-post-to-x-1776361742 技能

通过命令行安装

skillhub install baoyu-post-to-x-1776361742

下载

⬇ 下载 baoyu-post-to-x v0.1.0(免费)

文件大小: 34.49 KB | 发布时间: 2026-4-17 15:37

v0.1.0 最新 2026-4-17 15:37
Initial release of baoyu-post-to-x – post content, images, videos, and articles to X (Twitter) using real Chrome automation.

- Supports regular posts (text + up to 4 images), video uploads, quote tweets, and X Articles (Markdown long-form, for Premium users).
- Uses Chrome CDP to bypass anti-automation measures.
- Includes script directory layout and agent execution instructions.
- Preferences and custom settings supported via EXTEND.md at project or user level.
- First-time login to X is interactive and session persists for later use.
- Reference guides provided for troubleshooting and article workflow.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部