x-post SKILL.md skillA
x-post from hanzhangzzz/agent-skills-zh is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add hanzhangzzz/agent-skills-zh/x-post@v1.0.0Pins v1.0.0 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- hanzhangzzz/agent-skills-zh
- Path
x-post/SKILL.md- Versions recorded
- 1
- Latest version
- v1.0.0, committed Sep 30, 2026
- Size
- 5,056 bytes
- Repository stars
- 2
- License
- MIT
Publish a tweet or a multi-post thread (with images) to X/Twitter using the login that already exists in the user's local Chrome profile: no API key, no manual 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.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# x-post
把一段文字或一条线程(主帖 + 若干回复,可配图)发到 X。登录态直接取自用户本机 Chrome 已登录的 profile,脚本解密 cookie 注入独立的 agent-browser 会话,用 X 网页编辑器发出,最后回到帖子页核对段数与配图。**默认只预览不发布**,人审过截图后再加 `--post`。
## 前置检查(先做,缺一不可)
- macOS;`agent-browser`、`sqlite3`、`security`、Node ≥ 20 在 PATH 中。
- 用户的 Chrome 某个 profile 已登录目标 X 账号。先跑 `--check-login` 确认账号名,不要猜 profile:
```bash
node "$(dirname "$(readlink -f "$0")")/scripts/x_post.mjs" --check-login --profile Default
```
返回 `{"loggedIn":true,"account":"<handle>"}`。若报无登录 cookie,换 `--profile "Profile 1"` 等重试;仍无则让用户在 Chrome 里登录 x.com 后重来。
- 第一次读取钥匙串会弹 macOS 授权框,用户点"允许"即可;这是 Chrome Safe Storage 密码,脚本不落盘。
## 执行步骤
1. **把内容写成文件**(不要把长文本塞进命令行参数)。格式:帖子之间用单独一行 `---` 分隔,第一段是主帖;`image: 相对路径` 给该段配图,最多 4 张,**只支持主帖配图**。
```
主帖正文,可多行,可含 emoji
image: ./card.png
---
第一条回复
---
第二条回复
```
2. **先预览**:
```bash
node "<skill>/scripts/x_post.mjs" --file posts.md --profile Default --out ./x-post-out
```
脚本会:解密 cookie → 打开 x.com/home(带界面窗口)→ 校验已登录 → 填主帖、上传图片 → 每多一段点一次"+"(此时草稿会移入弹窗)→ 逐段回读文本、数附件、查发布按钮是否可用 → 截图到 `x-post-out/dry-run.png` → 输出 JSON。编辑器保持打开,用户可在窗口里看。
3. **给用户看**截图和四段原文,拿到明确同意。对外发布不可撤回,没有同意不要进入下一步。
…Read the whole file at its exact version.
How to install
mdr add hanzhangzzz/agent-skills-zh/x-post@sha256:5a549b8fdd74a420The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_qu6ludlufl4i74g5)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Sep 30, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (5056 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
hanzhangzzz/agent-skills-zh · 2 stars · license MIT · pushed 2026-10-19 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_qu6ludlufl4i74g5 GET https://markdownregistry.com/api/v1/resolve?ref=hanzhangzzz/agent-skills-zh/x-post GET https://markdownregistry.com/api/v1/blob/5a549b8fdd74a4202f3bc8af975c85c2740f6f3eb4aaea6e7a24cf567fda2bbd
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from hanzhangzzz/agent-skills-zh
Every file in hanzhangzzz/agent-skills-zh