x
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesex — read & post on X (Twitter) via your own cookies
x — 通过自有Cookie读取和发布X(Twitter)内容
Drives the user's real X account through X's internal web API via
, authenticated by the login cookie they
captured with the ACE extension. No official API key, no cost.
twikit⚠️ Not yet E2E-verified. Built against twikit's documented API but not run against a live account at build time. The first live run is the verification — if X's internal API drifted it surfaces as a clear error, not silent breakage.
The connector injects the cookie jar as an env var:
- — a JSON array of cookies (needs at least
X_COOKIES+auth_token). Secret — full account access. Never echo or print it.ct0
通过调用X的内部Web API来操作用户的真实X账户,使用用户通过ACE扩展捕获的登录Cookie进行身份验证。无需官方API密钥,完全免费。
twikit⚠️ 尚未完成端到端验证。基于twikit文档化的API构建,但在构建阶段未针对真实账户运行。首次实际运行即为验证过程——如果X的内部API发生变更,会直接显示明确错误,而非静默失效。
连接器会将Cookie Jar作为环境变量注入:
- — Cookie的JSON数组(至少需要
X_COOKIES+auth_token)。 保密提示:拥有完整账户访问权限。切勿回显或打印该变量。ct0
Setup — install twikit once per session
配置步骤——每个会话安装一次twikit
twikitsh
python3 -c "import twikit" 2>/dev/null || pip install --user --quiet twikit 2>/dev/null || true
X=$SKILL_DIR/scripts/x.py
python3 $X whoami # who is logged intwikitsh
python3 -c "import twikit" 2>/dev/null || pip install --user --quiet twikit 2>/dev/null || true
X=$SKILL_DIR/scripts/x.py
python3 $X whoami # 查看当前登录账户Read commands (run directly)
读取类命令(直接运行)
sh
python3 $X whoami # the logged-in account
python3 $X search --query "ai agents" --product Latest --limit 20 # Top | Latest | Media
python3 $X search-users --query "openai" --limit 10
python3 $X timeline --limit 20 # my home timeline
python3 $X user-tweets --user elonmusk --type Tweets --limit 20 # Tweets|Replies|Media|Likes
python3 $X tweet --id 1234567890123456789 # single tweet detail
python3 $X trends --category trending --limit 20 # trending|for-you|news|sports|entertainment--user@screen_name@sh
python3 $X whoami # 当前登录账户信息
python3 $X search --query "ai agents" --product Latest --limit 20 # 搜索选项:Top | Latest | Media
python3 $X search-users --query "openai" --limit 10
python3 $X timeline --limit 20 # 我的主页时间线
python3 $X user-tweets --user elonmusk --type Tweets --limit 20 # 推文类型:Tweets|Replies|Media|Likes
python3 $X tweet --id 1234567890123456789 # 单条推文详情
python3 $X trends --category trending --limit 20 # 趋势分类:trending|for-you|news|sports|entertainment--user@screen_nameVerify the connection first
先验证连接
sh
python3 $X whoamish
python3 $X whoami→ {"id": "...", "screen_name": "...", "followers_count": ...}
→ {"id": "...", "screen_name": "...", "followers_count": ...}
On an auth error the cookie is expired — have the user reconnect at
<https://auth.acedata.cloud/user/connections>. Do **not** loop-retry.
如果出现身份验证错误,说明Cookie已过期——请用户前往<https://auth.acedata.cloud/user/connections>重新连接。**请勿循环重试**。Write commands — GATED (dry-run unless trailing --confirm
)
--confirm写入类命令——受保护(无末尾--confirm
则为试运行)
--confirmEvery state-changing command (, , , , ,
, , , ) dry-runs without a trailing
. is honored only as the last argument, so a tweet
body that merely contains "--confirm" can never silently post. Always show the
dry-run, get an explicit "yes" on the exact text, then re-run with .
postthreadlikeunlikeretweetunretweetfollowunfollowdelete--confirm--confirm--confirmsh
python3 $X post --text "hello world" # dry-run
python3 $X post --text "hello world" --confirm # LIVE tweet
python3 $X post --text "look at this" --media a.jpg,b.png --confirm # up to 4 images (or 1 video)
python3 $X post --text "great point" --reply-to 123456 --confirm # reply
python3 $X post --text "worth reading" --quote-url https://x.com/u/status/123 --confirm # quote
python3 $X thread --text "1/2 first" --text "2/2 second" --confirm # thread (2+ segments)
python3 $X like --id 123456 --confirm
python3 $X retweet --id 123456 --confirm
python3 $X follow --user elonmusk --confirm
python3 $X delete --id 123456 --confirm # delete one of MY tweets- A confirmed /
postis immediately PUBLIC on the user's real account — there is no draft step. Always confirm the exact text first.thread - takes comma-separated file paths. X allows up to 4 images OR 1 video/GIF per tweet; for a thread the media attaches to the first segment only.
--media
所有会改变状态的命令(、、、、、、、、)如果末尾没有参数,则仅为试运行。仅在作为最后一个参数时生效,因此推文内容中即使包含"--confirm"也不会意外发布。请始终先展示试运行结果,获取用户对确切内容的明确确认,再添加参数重新运行。
postthreadlikeunlikeretweetunretweetfollowunfollowdelete--confirm--confirm--confirmsh
python3 $X post --text "hello world" # 试运行
python3 $X post --text "hello world" --confirm # 发布真实推文
python3 $X post --text "look at this" --media a.jpg,b.png --confirm # 最多支持4张图片(或1个视频)
python3 $X post --text "great point" --reply-to 123456 --confirm # 回复推文
python3 $X post --text "worth reading" --quote-url https://x.com/u/status/123 --confirm # 引用推文
python3 $X thread --text "1/2 first" --text "2/2 second" --confirm # 发布线程推文(2段及以上)
python3 $X like --id 123456 --confirm
python3 $X retweet --id 123456 --confirm
python3 $X follow --user elonmusk --confirm
python3 $X delete --id 123456 --confirm # 删除我的某条推文- 确认后的/
post会立即在用户的真实账户上公开——没有草稿步骤。请务必先确认确切内容。thread - 接受逗号分隔的文件路径。X允许每条推文最多附加4张图片或1个视频/GIF;对于线程推文,媒体仅会附加到第一段内容。
--media
Gotchas
注意事项
- This is the user's real X account. Confirm before any write — posts are immediate and public.
- Not E2E-verified (see the warning above) — expect to validate the first run.
- twikit is a scraper of X's non-public API. It can break when X changes its
internal endpoints. A / transaction-id error means twikit needs upgrading:
Couldn't get KEY_BYTE indices. An auth error means the cookie expired → reconnect.pip install --user -U twikit - ToS / rate-limit / ban risk. This acts through the web API, not the official API — high-frequency automation can get the account rate-limited or suspended. Keep volume human-like.
- Never print — it is full account access.
X_COOKIES - DMs are intentionally not exposed by this skill.
- 这是用户的真实X账户。在执行任何写入操作前请确认——发布内容是即时且公开的。
- 尚未完成端到端验证(见上方警告)——首次运行时需进行验证。
- twikit是X非公开API的爬虫工具。当X更改内部端点时,该工具可能失效。如果出现/transaction-id错误,说明需要升级twikit:
Couldn't get KEY_BYTE indices。如果出现身份验证错误,说明Cookie已过期→重新连接。pip install --user -U twikit - 存在服务条款违规/速率限制/账号封禁风险。本工具通过Web API而非官方API运行——高频自动化操作可能导致账号被限流或封禁。请保持操作频率接近人类行为。
- 切勿打印——它拥有完整的账户访问权限。
X_COOKIES - 本技能刻意不支持私信功能。
Record the output
记录输出结果
After you successfully publish and obtain the live result URL, call the built-in
tool ONCE so the user can track this deliverable in My Outputs:
publish_artifactpublish_artifact(kind="message", channel="x", title="<title>", url="<the REAL returned URL>", status="delivered")Use the real returned URL — never fabricate one. Call it once per published item,
only after delivery is confirmed; skip it (or use ) if publishing failed.
See .
status="failed"_shared/artifacts.md成功发布并获取真实结果URL后,调用内置的工具一次,以便用户在「我的输出」中跟踪该交付成果:
publish_artifactpublish_artifact(kind="message", channel="x", title="<title>", url="<the REAL returned URL>", status="delivered")请使用真实返回的URL——切勿伪造。每个发布项仅调用一次,且仅在确认交付成功后调用;如果发布失败,请跳过(或使用)。详情请参阅。
status="failed"_shared/artifacts.md