publish-cn

publish-cn is a skill for Claude Code, Codex from LienJack/learn-agent. It costs 21 tokens per session (975 once invoked), scanned A, original, MIT.

A publishing workflow that creates Chinese-language drafts for WeChat Official Accounts, Juejin, and Zhihu from Markdown articles. It checks article requirements and handles platform-specific formatting and images.

In plain words
What is it for?
Use it to turn Markdown articles into reviewable drafts on WeChat, Juejin, and Zhihu without publishing them automatically.
Why use it?
It removes repetitive copying, formatting, image uploading, and draft creation across three Chinese publishing platforms. It also records which platforms succeeded or failed.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lienjack/learn-agent/publish-cn
Any agent
npx skills add LienJack/learn-agent --skill publish-cn
Clone the repo
git clone --depth 1 https://github.com/LienJack/learn-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for publish-cn

README.md
[![agentmods](https://agentmods.dev/badge/skills/lienjack/learn-agent/publish-cn.svg)](https://agentmods.dev/skills/lienjack/learn-agent/publish-cn)
Your own site
<a href="https://agentmods.dev/skills/lienjack/learn-agent/publish-cn"><img src="https://agentmods.dev/badge/skills/lienjack/learn-agent/publish-cn.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 975 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00021 $0.00975
Opus 5 $0.00010 $0.00487
Sonnet 5 $0.00004 $0.00195
Haiku 4.5 $0.00002 $0.00097

Measured 5d ago against content hash c7a4a66894c4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

publish-cn scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

publish/skills/publish-cn/SKILL.md · 74 lines

How it starts

The opening of the file, as written. The whole thing — 74 lines — stays where its author put it; the contents beside it link to each section on GitHub.

中文发布 Skill

本 skill 只能通过显式引用本文件路径触发,不依赖全局安装、symlink 或 $skill-name 自动发现。

输入要求

  • 用户必须提供一个或多个中文 Markdown 文章路径。
  • 如果没有提供文章路径,先要求用户补充,不要猜测最近文件。
  • 默认目标平台是微信公众号、掘金、知乎。

执行流程

  1. 阅读 publish/README.mdpublish/platforms/cn.md
  2. 运行 publish/bin/publish-cn <article.md> [...] 做前置检查、命令计划、验收字段和运行记录。
  3. 对每篇文章检查封面路径;缺失则跳过该文,不继续三平台发布。
  4. 如果公众号标题超过 32 字且没有 wechatTitle / shortTitle / wechat_title,先要求补短标题。
  5. 微信公众号必须按 md2wechat 棕色主题链路处理:discovery -> config validate -> inspect -> convert --mode ai --theme autumn-warm -> 静态检查 -> upload_image -> test-draft。不使用 Wechatsync 作为公众号最终稿路径。
  6. 检查微信 HTML 的代码块处理:text 围栏必须是说明块,真实代码必须保留语言、缩进和长行可读性;必要时使用逐行 &nbsp; fallback。
  7. 掘金和知乎必须分别运行单平台 Wechatsync:先 --dry-run,再正式创建草稿。含本地图片时不要合并 -p zhihu,juejin
  8. 某个平台失败时记录失败平台、失败命令和错误输出;继续下一篇,但最终汇总不能误报整批成功。
  9. 将草稿链接、draft id、人工动作、图片上传数量、失败原因和“未点击正式发布”确认写入本次 publish/runs/ 记录。

必须使用的命令形态

md2wechat inspect "article.md"
md2wechat convert "article.md" --mode ai --theme autumn-warm --title "短标题" -o "article-wechat.html"
md2wechat upload_image "path/to/local-image.png" --json
md2wechat test-draft "article-wechat.html" "cover.jpg" --json
rg -n "mdnice编辑器|pre class=\"custom\"|code class=\"hljs\"|&nbsp;|overflow-x:auto|note-block" "article-wechat.html"

WECHATSYNC_TOKEN="$WECHATSYNC_TOKEN" wechatsync sync "article.md" -p juejin --title "标题" --cover "cover.jpg" --dry-run
WECHATSYNC_TOKEN="$WECHATSYNC_TOKEN" wechatsync sync "article.md" -p zhihu --title "标题" --cover "cover.jpg" --dry-run
WECHATSYNC_TOKEN="$WECHATSYNC_TOKEN" wechatsync sync "article.md" -p juejin --title "标题" --cover "cover.jpg"
WECHATSYNC_TOKEN="$WECHATSYNC_TOKEN" wechatsync sync "article.md" -p zhihu --title "标题" --cover "cover.jpg"

真实 token 只能来自环境变量,不要写入文件或回复。

安全边界

  • 默认只创建草稿。
  • 不点击正式发布、提交审核或公开发布。
  • 不把 token、cookie、浏览器私密响应写入运行记录。
  • 单个平台失败时,不得把三平台整体标记为成功。

完成回复模板

已完成草稿发布:

- 微信公众号:成功/失败,链接:...
- 掘金:成功/失败,链接:...
- 知乎:成功/失败,链接:...

图片处理:
- 本地图片 N 张。
- 封面:cover.jpg。
- weixin 上传 N 成功,0 失败。
- juejin 上传 N 成功,0 失败。
- zhihu 上传 N 成功,0 失败。

注意事项:
- 本次是否使用 md2wechat 棕色 HTML。
- 如果没有,说明原因和降级路径。
- 确认没有点击正式发布。

Read the full file on GitHub · 74 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 74 lines · 21 tokens per session scan A c7a4a66894c4

Subscribe to this mod's changes

publish-cn is a skill published in the GitHub repository LienJack/learn-agent (23 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 975 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.