x-post
Skill1 starsChanged 15 days agoMITView on GitHub
Publish a tweet or a multi-post thread (with images) to X/Twitter using the login stored in the agent-chrome profile x-main (real Chrome over CDP): no API key, no cookie copying. Dry-run first (compose + screenshot for human review), then `--post`. Use when the user says 发 X, 发推, 发到 X, 发个线程, post to X, tweet this, publish on Twitter, or hands you post text to send.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- terryso/ego-skillstheir own version, first seen Nov 8, 2026
- schroneko/skillstheir own version, first seen Oct 29, 2026
- belzoralolbtw/x-agent-skilltheir own version, first seen Oct 25, 2026
- swayamdhawan/x-agenttheir own version, first seen Oct 20, 2026
- razbakov/skillstheir own version, first seen Oct 17, 2026
- Jakeschincariol/x-agent-skilltheir own version, first seen Sep 29, 2026
Used with
Projects with it also use x-dm, x-human and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
JakeschincariolSkillx-dm
Write X DMs that get answered - the first message, the two follow-ups - and triage the user's DM inbox and message requests. Use when the user says "DM this person", "cold DM", "outreach on X", "how do I follow up", "what do I say to this DM", "go through my message requests", or is reaching out to someone specific on X.
Also in 3 projects that use this
JakeschincariolSkillx-human
Strip the machine fingerprint out of any draft - em dashes, AI slop words, invisible watermark characters, thread boilerplate - and score it against a five-check detection panel before it goes out. Use whenever text needs to sound human, when the user says humanize, "does this sound like AI", "remove the em dashes", "de-slop this", "this sounds like ChatGPT", or before any post, thread, reply or DM from this pack is shown to the user.
Also in 3 projects that use this
lleqsnoomSkillx-plan
Plan before coding — research the project and the web first, ask short plain questions until the user is sure, propose three approaches with trade-offs, then write a layered spec (contract, invariant, test) as a graph-driven scenario with guards and a memory file; gate on user approval
Also in 3 projects that use this
lxyang20131208-starSkillx-audit
Audit a draft X (Twitter) post or thread against the open-source X algorithm BEFORE publishing. Use when the user shares a tweet draft and wants feedback, asks "will this do well on X / Twitter", "review my post", "is this good to post", or wants to improve reach before posting. Returns a PASS / FLAG / BLOCK verdict per dimension plus a concrete rewrite.
Also in 3 projects that use this
lxyang20131208-starSkillx-reply
Build a reply-based growth strategy for a new or small X (Twitter) account, and draft high-quality replies. Use when the user has few followers, asks "how do I grow on X from zero", "my account is new", "who should I reply to", "help me write a reply to this tweet", or wants a cold-start plan. Returns an anchor-account strategy and concrete reply drafts.
Also in 3 projects that use this
- +1 more from Jakeschincariol
- +2 more from lxyang20131208-star
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- publora/skills★ 68same name
- terryso/ego-skills★ 34same name
- rameerez/claude-code-startup-skills★ 30same name
- SpaceZephyr/allSkills★ 14same name
- win4r/x-post-skill★ 12same name
- tonydzi/second-brain-starter-kit★ 6same name
- anneheartrecord/x-operation-skills★ 4same name
- Jakeschincariol/x-agent-skill★ 4same name
- razbakov/skills★ 4same name
- anneheartrecord/charles-skill★ 3same name
7 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-chromeSkill
- audio-inboxSkill
- ci-reviewSkill
- doc-readerSkill
- do-somethingSkill
- gpt-image2-prompt-directorSkill
- harnessSkill
- hkr-renderSkill
- hook-test-kitSkill
- launch-videoSkill
- md2viewSkill
- model-guardSkill
- model-prompt-auditSkill
- pdf-triptychSkill
- readme-craftSkill
- repo-mapSkill
- repo-tidySkill
- scanned-book-ocrSkill
- session-handoffSkill
- wechat-article-md-localSkill
- x-article-downloadSkill
- xiaohongshuSkill
The file
Files
x-post
把一段文字或一条线程(主帖 + 若干回复,可配图)发到 X。登录态只存在 agent-chrome 的 x-main profile 里:脚本先 agent_chrome.py up x --headless 拉起正式 Chrome,再用 agent-browser --cdp <port> 驱动 X 网页编辑器发出,最后回到帖子页核对段数与配图;这次运行拉起的 Chrome 结束时 down,已在跑的不动。默认只预览不发布,人审过截图后再加 --post。
前置检查(先做,缺一不可)
- macOS;
agent-browser、python3、Node ≥ 22 在 PATH 中;同仓库的agent-chromeskill 已安装(脚本按自身真实路径找../../agent-chrome/scripts/agent_chrome.py),且已登记x-main(agent_chrome.py ls)。 - 先跑
--check-login确认账号名:
node "$(dirname "$(readlink -f "$0")")/scripts/x_post.mjs" --check-login返回 {"loggedIn":true,"account":"<handle>"}。登录失效时脚本会打印两条修复命令:agent_chrome.py up x-main(有头窗口,用户扫码登录后 down x-main),或 agent_chrome.py seed x-main --from-main --domains x.com,twitter.com(从主 Chrome 引导一次 cookie;会读钥匙串,首次可能弹授权框)。--profile 可换成别的已登记 X 账号(如 x-alt)。
执行步骤
- 把内容写成文件(不要把长文本塞进命令行参数)。格式:帖子之间用单独一行
---分隔,第一段是主帖;image: 相对路径给该段配图,最多 4 张,只支持主帖配图。
主帖正文,可多行,可含 emoji
image: ./card.png
---
第一条回复
---
第二条回复- 先预览:
node "<skill>/scripts/x_post.mjs" --file posts.md --out ./x-post-out脚本会:up x --headless(加 --headed 则开后台窗口、不抢焦点)→ 打开 x.com/home → 校验已登录 → 填主帖、上传图片 → 每多一段点一次"+"(此时草稿会移入弹窗)→ 逐段回读文本、数附件、查发布按钮是否可用 → 截图到 x-post-out/dry-run.png → 输出 JSON → 关掉本次拉起的 Chrome。
- 给用户看截图和四段原文,拿到明确同意。对外发布不可撤回,没有同意不要进入下一步。
- 发布:同一命令加
--post。脚本重新组稿、点击 Post/Post all、等弹窗关闭,再去个人主页找到新帖,打开帖子页核对:自己发的段数 = 输入段数,配图存在。输出:
{"mode":"posted","account":"...","url":"https://x.com/<handle>/status/<id>","verified":{"posts":4,"expectedPosts":4,"image":true,"expectedImage":true}}- 记录链接:仓库若有
docs/launch-posts.md("已发布"表),把日期、渠道、链接、备注补进去;运营账本另记。
字数
X 按加权长度限 280:URL 记 23,中日韩字符和 emoji 记 2,其余记 1。中文纯文本上限约 140 字。脚本会在组稿前拒绝超限段落;Premium 账号可 --allow-long。写中文帖时按 140 字一段规划,线程比硬塞更好读。
已踩过的坑(脚本已处理,改脚本时别退回去)
- 点"+"后草稿进入
div[role="dialog"]弹窗,首页内联编辑器仍留在页面上:不限定弹窗作用域时tweetTextarea_0会命中两个元素报 strict mode violation,内联的 Post 按钮显示 disabled 也不代表弹窗里的 Post all 不可用。校验和点击都要以弹窗为根。 - 文本用
keyboard inserttext,不用type/fill:编辑器是 Draft.js,fill不触发状态更新,type对 emoji 和换行不稳。 agent-browser eval对对象只打印末行且是 JSON 编码后的字符串,脚本里用JSON.stringify包一层再解析两次。- 不要再从主 Chrome 解密 cookie 注入、也不要让 agent-browser 自己起浏览器或用
--session-name存登录态:登录态只存x-main一份,所有调用都--cdp <port>连 agent-chrome 起的 Chrome。agent-browser close在--cdp下只断开连接,关浏览器用agent_chrome.py down(走 Browser.close,cookie 才会落盘)。 - 发出后不要用首页判断成功,去个人主页按主帖前 20 字定位新帖,再打开帖子页数段数。
- zsh 下
rm /tmp/x-*.sqlite这种无匹配的通配会让整行命令中止;清理用脚本,不用 shell 通配。
边界
- 只做发布,不做定时、不做回复别人的帖子、不做删帖。需要回复某条帖子时另写流程。
- 图片只支持主帖;视频、投票、GIF 搜索不支持。
- 依赖 X 网页的
data-testid,改版即失效;失效时先跑--check-login与预览,看截图定位哪一步断了,再改选择器。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

