tuzi-post-to-x by tuziapi/tuzi-skills
npx skills add https://github.com/tuziapi/tuzi-skills --skill tuzi-post-to-x通过真实的 Chrome 浏览器发布文本、图片、视频和长篇文章到 X(绕过反机器人检测)。
重要提示:所有脚本都位于此技能的 scripts/ 子目录中。
代理执行指令:
SKILL_DIR${SKILL_DIR}/scripts/<script-name>.ts${SKILL_DIR} 替换为实际路径脚本参考:
| 脚本 | 用途 |
|---|---|
scripts/x-browser.ts | 常规帖子(文本 + 图片) |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
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 | 发送真实的粘贴按键 |
scripts/check-paste-permissions.ts | 验证环境与权限 |
使用 Bash 检查 EXTEND.md 是否存在(优先级顺序):
# 首先检查项目级别
test -f .tuzi-skills/tuzi-post-to-x/EXTEND.md && echo "project"
# 然后检查用户级别(跨平台:$HOME 在 macOS/Linux/WSL 上有效)
test -f "$HOME/.tuzi-skills/tuzi-post-to-x/EXTEND.md" && echo "user"
┌──────────────────────────────────────────────────┬───────────────────┐ │ 路径 │ 位置 │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .tuzi-skills/tuzi-post-to-x/EXTEND.md │ 项目目录 │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.tuzi-skills/tuzi-post-to-x/EXTEND.md │ 用户主目录 │ └──────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ 结果 │ 操作 │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 找到 │ 读取、解析、应用设置 │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ 未找到 │ 使用默认值 │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md 支持:默认 Chrome 配置文件
bun 运行时首次使用前,建议运行环境检查。用户可以选择跳过。
npx -y bun ${SKILL_DIR}/scripts/check-paste-permissions.ts
检查项:Chrome、配置文件隔离、Bun、辅助功能、剪贴板、粘贴按键、Chrome 冲突。
如果任何检查失败,根据项目提供修复指导:
| 检查项 | 修复方法 |
|---|---|
| Chrome | 安装 Chrome 或设置 X_BROWSER_CHROME_PATH 环境变量 |
| 配置文件目录 | 确保 ~/.local/share/x-browser-profile 可写 |
| Bun 运行时 | `curl -fsSL https://bun.sh/install |
| 辅助功能 (macOS) | 系统设置 → 隐私与安全性 → 辅助功能 → 启用终端应用 |
| 剪贴板复制 | 确保 Swift/AppKit 可用(macOS Xcode CLI 工具:xcode-select --install) |
| 粘贴按键 (macOS) | 同上(辅助功能修复) |
| 粘贴按键 (Linux) | 安装 xdotool (X11) 或 ydotool (Wayland) |
references/regular-posts.md 了解手动工作流程、故障排除和技术细节references/articles.md 了解长篇文章发布指南文本 + 最多 4 张图片。
npx -y bun ${SKILL_DIR}/scripts/x-browser.ts "Hello!" --image ./photo.png
参数:
| 参数 | 描述 |
|---|---|
<text> | 帖子内容(位置参数) |
--image <path> | 图片文件(可重复,最多 4 个) |
--profile <dir> | 自定义 Chrome 配置文件 |
注意:脚本会打开浏览器并填充内容。用户需要手动审核并发布。
文本 + 视频文件。
npx -y bun ${SKILL_DIR}/scripts/x-video.ts "Check this out!" --video ./clip.mp4
参数:
| 参数 | 描述 |
|---|---|
<text> | 帖子内容(位置参数) |
--video <path> | 视频文件(MP4, MOV, WebM) |
--profile <dir> | 自定义 Chrome 配置文件 |
注意:脚本会打开浏览器并填充内容。用户需要手动审核并发布。
限制:常规用户 140 秒最大,高级用户 60 分钟。处理时间:30-60 秒。
引用现有推文并添加评论。
npx -y bun ${SKILL_DIR}/scripts/x-quote.ts https://x.com/user/status/123 "Great insight!"
参数:
| 参数 | 描述 |
|---|---|
<tweet-url> | 要引用的推文 URL(位置参数) |
<comment> | 评论文本(位置参数,可选) |
--profile <dir> | 自定义 Chrome 配置文件 |
注意:脚本会打开浏览器并填充内容。用户需要手动审核并发布。
长篇文章(Markdown 格式,需要 X Premium)。
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
参数:
| 参数 | 描述 |
|---|---|
<markdown> | Markdown 文件(位置参数) |
--cover <path> | 封面图片 |
--title <text> | 覆盖标题 |
Frontmatter:YAML front matter 支持 title、cover_image。
注意:脚本会打开浏览器并填充文章内容。用户需要手动审核并发布。
发布后检查:脚本在所有图片插入后会自动验证:
XIMGPH_ 占位符如果检查失败(输出中有警告),在用户发布前,用具体问题提醒用户。
如果脚本失败并显示 Chrome debug port not ready 或 Unable to connect,请先终止现有的 Chrome CDP 实例,然后重试:
pkill -f "Chrome.*remote-debugging-port" 2>/dev/null; pkill -f "Chromium.*remote-debugging-port" 2>/dev/null; sleep 2
重要提示:这应该自动完成 —— 当遇到此错误时,终止 Chrome CDP 实例并重试命令,无需询问用户。
通过 EXTEND.md 进行自定义配置。有关路径和支持的选项,请参阅 偏好设置 部分。
每周安装量
70
仓库
GitHub 星标数
24
首次出现
Mar 5, 2026
安全审计
安装于
openclaw54
opencode41
gemini-cli41
github-copilot41
amp41
cline41
Posts text, images, videos, and long-form articles to X via real Chrome browser (bypasses anti-bot detection).
Important : All scripts are located in the scripts/ subdirectory of this skill.
Agent Execution Instructions :
SKILL_DIR${SKILL_DIR}/scripts/<script-name>.ts${SKILL_DIR} in this document with the actual pathScript Reference :
| Script | Purpose |
|---|---|
scripts/x-browser.ts | Regular posts (text + images) |
scripts/x-video.ts | Video posts (text + video) |
scripts/x-quote.ts | Quote tweet with comment |
scripts/x-article.ts | Long-form article publishing (Markdown) |
scripts/md-to-html.ts | Markdown → HTML conversion |
scripts/copy-to-clipboard.ts | Copy content to clipboard |
scripts/paste-from-clipboard.ts | Send real paste keystroke |
scripts/check-paste-permissions.ts | Verify environment & permissions |
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .tuzi-skills/tuzi-post-to-x/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.tuzi-skills/tuzi-post-to-x/EXTEND.md" && echo "user"
┌──────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├──────────────────────────────────────────────────┼───────────────────┤ │ .tuzi-skills/tuzi-post-to-x/EXTEND.md │ Project directory │ ├──────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.tuzi-skills/tuzi-post-to-x/EXTEND.md │ User home │ └──────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports : Default Chrome profile
bun runtimeBefore first use, suggest running the environment check. User can skip if they prefer.
npx -y bun ${SKILL_DIR}/scripts/check-paste-permissions.ts
Checks: Chrome, profile isolation, Bun, Accessibility, clipboard, paste keystroke, Chrome conflicts.
If any check fails , provide fix guidance per item:
| Check | Fix |
|---|---|
| Chrome | Install Chrome or set X_BROWSER_CHROME_PATH env var |
| Profile dir | Ensure ~/.local/share/x-browser-profile is writable |
| Bun runtime | `curl -fsSL https://bun.sh/install |
| Accessibility (macOS) | System Settings → Privacy & Security → Accessibility → enable terminal app |
| Clipboard copy | Ensure Swift/AppKit available (macOS Xcode CLI tools: xcode-select --install) |
| Paste keystroke (macOS) | Same as Accessibility fix above |
| Paste keystroke (Linux) | Install xdotool (X11) or (Wayland) |
references/regular-posts.md for manual workflow, troubleshooting, and technical detailsreferences/articles.md for long-form article publishing guideText + up to 4 images.
npx -y bun ${SKILL_DIR}/scripts/x-browser.ts "Hello!" --image ./photo.png
Parameters :
| Parameter | Description |
|---|---|
<text> | Post content (positional) |
--image <path> | Image file (repeatable, max 4) |
--profile <dir> | Custom Chrome profile |
Note : Script opens browser with content filled in. User reviews and publishes manually.
Text + video file.
npx -y bun ${SKILL_DIR}/scripts/x-video.ts "Check this out!" --video ./clip.mp4
Parameters :
| Parameter | Description |
|---|---|
<text> | Post content (positional) |
--video <path> | Video file (MP4, MOV, WebM) |
--profile <dir> | Custom Chrome profile |
Note : Script opens browser with content filled in. User reviews and publishes manually.
Limits : Regular 140s max, Premium 60min. Processing: 30-60s.
Quote an existing tweet with comment.
npx -y bun ${SKILL_DIR}/scripts/x-quote.ts https://x.com/user/status/123 "Great insight!"
Parameters :
| Parameter | Description |
|---|---|
<tweet-url> | URL to quote (positional) |
<comment> | Comment text (positional, optional) |
--profile <dir> | Custom Chrome profile |
Note : Script opens browser with content filled in. User reviews and publishes manually.
Long-form Markdown articles (requires X Premium).
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
Parameters :
| Parameter | Description |
|---|---|
<markdown> | Markdown file (positional) |
--cover <path> | Cover image |
--title <text> | Override title |
Frontmatter : title, cover_image supported in YAML front matter.
Note : Script opens browser with article filled in. User reviews and publishes manually.
Post-Composition Check : The script automatically verifies after all images are inserted:
XIMGPH_ placeholders in editor contentIf the check fails (warnings in output), alert the user with the specific issues before they publish.
If a script fails with Chrome debug port not ready or Unable to connect, kill existing Chrome CDP instances first, then retry:
pkill -f "Chrome.*remote-debugging-port" 2>/dev/null; pkill -f "Chromium.*remote-debugging-port" 2>/dev/null; sleep 2
Important : This should be done automatically — when encountering this error, kill Chrome CDP instances and retry the command without asking the user.
Custom configurations via EXTEND.md. See Preferences section for paths and supported options.
Weekly Installs
70
Repository
GitHub Stars
24
First Seen
Mar 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
openclaw54
opencode41
gemini-cli41
github-copilot41
amp41
cline41
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
46,600 周安装
Better Auth 身份验证技能指南:为 TypeScript/JavaScript 应用添加认证
13,500 周安装
图像压缩工具 - 使用 sips, cwebp, ImageMagick, Sharp 优化图片大小
13,600 周安装
AI 产品需求文档(PRD)生成指南:GitHub Copilot 技能,高效撰写技术规范
13,600 周安装
X转Markdown工具:将推文和文章转换为带元数据的Markdown格式
13,900 周安装
Vite 8 前端构建工具指南:配置、插件、SSR 与 Rolldown 迁移
14,900 周安装
Google Calendar API CLI 工具 - gws-calendar 命令行操作日历事件与资源
15,100 周安装
ydotool