multi-poster
New多平台文章统一发布工具。支持 CSDN、51CTO、博客园、掘金四个平台。 用户指定任意子集也能处理。本 skill 完全自包含:所有执行脚本在 scripts/ 目录, 各平台注意事项在 docs/ 目录。
Summary
Multi-poster is a unified publishing tool that lets you post articles to CSDN, 51CTO, Blog Park, and Juejin simultaneously or in any subset.
- It handles platform-specific formatting and authentication, saving you the repetitive work of manually uploading content to each site.
Overview
多平台统一发布 Skill
目录结构
multi-poster/
├── SKILL.md
├── .env ← 各平台凭证
├── scripts/
│ ├── csdn_poster.py
│ ├── 51cto_poster.py
│ ├── cnblogs_poster.py
│ └── juejin_poster.py
└── docs/
├── csdn.md
├── 51cto.md
├── cnblogs.md
└── juejin.md所有命令在 multi-poster/ 目录下执行,使用相对路径引用脚本和临时文件。
统一临时文件
../temp/publish.mdAgent 先将文章 Markdown 正文写入此文件,然后逐平台调用脚本读取。各脚本内部自动处理 Markdown→HTML 转换。
发布流程
1. 明确需求
向用户确认:
- •标题
- •正文(对话上下文或用户提供)
- •目标平台(全部四个,或指定子集)
- •各平台特定参数(详见下方各平台步骤)
2. 生成内容预览
标题: <标题>
目标平台: CSDN, 51CTO, 博客园, 掘金
正文预览:
<前 300 字>3. 前置检查
检查 multi-poster/.env 是否存在且包含目标平台的配置项:
# 检查 .env 是否存在
ls -la .env
# 检查各平台关键配置
grep "CSDN_COOKIES=" .env
grep "51CTO_COOKIES=" .env
grep "CNBLOGS_COOKIES=" .env
grep "JUEJIN_COOKIES=" .env如果 .env 不存在或缺少某项,需要先参考 docs/<平台>.md 获取凭证。
4. 准备临时文件
将正文以 Markdown 格式 写入临时文件:
mkdir -p ../temp
cat > ../temp/publish.md << 'EOF'
<Markdown 正文>
EOF5. 按序发布
按以下顺序逐个发布,失败不中断。每个平台执行后记录状态。
所有命令从 multi-poster/ 目录执行。
内容格式:Markdown(加 --format markdown 让脚本自动转 HTML)
python scripts/csdn_poster.py post \
--title "<标题>" \
--file ../temp/publish.md \
--format markdown \
--tags "标签1,标签2" \
--categories "分类名" \
--publish可选参数:
- •
--desc "摘要"— 自定义摘要 - •
--type original|reprint|translated— 文章类型 - •
--read-type public|private|fans— 阅读权限 - •不加
--publish则存为草稿
- •成功标志:返回
发布成功!+链接: https://blog.csdn.net/... - •失败:查看
docs/csdn.md
内容格式:Markdown(脚本自动转 HTML)
python scripts/51cto_poster.py post \
--title "<标题>" \
--file ../temp/publish.md \
--tags "标签1,标签2"可选参数:
- •
--type original|reprint|translated— 默认 original - •
--draft— 存草稿
- •成功标志:返回
发布成功!+链接: https://blog.51cto.com/... - •失败:查看
docs/51cto.md
内容格式:原生 Markdown(博客园 isMarkdown=true,不需要转 HTML)
python scripts/cnblogs_poster.py post \
--title "<标题>" \
--file ../temp/publish.md \
--tags "标签1,标签2"可选参数:
- •
--category "分类ID"— 多个用逗号分隔 - •
--draft— 存草稿
- •成功标志:返回
发布成功!+链接: https://www.cnblogs.com/... - •失败:查看
docs/cnblogs.md
内容格式:原生 Markdown(掘金的 mark_content 字段原生支持 Markdown) 鉴权方式:仅需 Cookie(无需 CSRF 请求头,只需在 .env 中配置 JUEJIN_COOKIES 即可)
python scripts/juejin_poster.py post \
--title "<标题>" \
--file ../temp/publish.md \
--brief "摘要(50-100 字)"可选参数:
- •
--tags 标签ID1 标签ID2— 传数字 ID(非标签名),见docs/juejin.md参考表 - •
--draft-only— 仅存草稿,不发布
- •成功标志:返回
发布成功!+链接: https://juejin.cn/post/... - •失败:查看
docs/juejin.md
6. 汇总结果
所有平台执行完毕后,按此格式汇总给用户:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
多平台发布结果汇总
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ CSDN 发布成功 https://blog.csdn.net/...
✅ 51CTO 发布成功 https://blog.51cto.com/...
❌ 博客园 失败 错误信息摘要
✅ 掘金 发布成功 https://juejin.cn/post/...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━失败的平台引导用户查看 docs/<平台>.md 了解原因和解决方法。
各平台内容格式速查
| 平台 | 输入格式 | 脚本处理方式 |
|---|---|---|
| CSDN | Markdown | 自动转 HTML(需加 --format markdown) |
| 51CTO | Markdown | 自动转 HTML |
| 博客园 | Markdown | 原生支持,直传 Markdown |
| 掘金 | Markdown | 原生支持,直传 Markdown |
注意事项
- 失败不中断:一个平台失败不影响其他平台继续发布
- 临时文件:发布完成后不自动删除
../temp/publish.md,保留供用户复查 - Cookie 过期:各平台 Cookie 过期时间不同,发布失败时优先检查
.env中的凭证 - CSDN 审核:部分内容可能触发人工审核,发布后不保证即时可见
- 掘金频率限制:发布过于频繁会返回
err_no: 1002,需等待 30 秒以上重试 - 凭证配对:掘金的 Cookie 和 CSRF Token 必须来自同一次浏览器会话,不可混用
Install & Usage
mkdir -p .claude/skillsmkdir -p .claude/skills && curl -o .claude/skills/multi-poster.md https://raw.githubusercontent.com/lainXXX/blog-auto-poster-skill/main/SKILL.md/multi-posterUse Cases
Usage Examples
/multi-poster Publish my article titled 'Getting Started with Rust' to CSDN and Juejin.
Post the content from ../temp/publish.md to all four platforms with tags 'rust, tutorial'.
Publish a draft to CSDN only, with type 'original' and read-type 'public'.
Security Audits
Frequently Asked Questions
What is multi-poster?
Multi-poster is a unified publishing tool that lets you post articles to CSDN, 51CTO, Blog Park, and Juejin simultaneously or in any subset. It handles platform-specific formatting and authentication, saving you the repetitive work of manually uploading content to each site.
How to install multi-poster?
To install multi-poster: create the skills directory (mkdir -p .claude/skills), then run: mkdir -p .claude/skills && curl -o .claude/skills/multi-poster.md https://raw.githubusercontent.com/lainXXX/blog-auto-poster-skill/main/SKILL.md. Finally, /multi-poster in Claude Code.
What is multi-poster best for?
multi-poster is a skill categorized under Documentation. Created by lainXXX.
What can I use multi-poster for?
multi-poster is useful for: Publish a technical tutorial to all four platforms at once to maximize audience reach.; Republish an existing blog post to a single platform like Juejin without manual reformatting.; Schedule a draft post to CSDN while simultaneously publishing the final version to other platforms.; Quickly cross-post a series of articles across multiple Chinese developer communities.; Test a new article by publishing only to 51CTO and Blog Park, then later expanding to all platforms..